Skip to content
P. F. Chimento edited this page Feb 15, 2016 · 7 revisions

On this page are the instructions for building a binary package of Gnome Inform 7 for your Linux distribution.

You will do most of the work in a terminal, so open one before you begin. Any text in a shaded box is meant to be typed into the terminal window, unless otherwise indicated.

Obtaining a copy of the source code (all platforms)

When packaging, do not work from the officially released source code archive. It does not include certain distribution-specific files necessary for packaging. Instead, check out a working copy of the source code, and get it ready for compiling, like this:

git clone https://github.com/ptomato/gnome-inform7
cd gnome-inform7
git checkout 6L02
./autogen.sh

Replace 6L02 by the version you are packaging. Bear in mind that the instructions on this page might not be valid for versions earlier than 6L02.

If you are making a package, for your own use only, from the latest development version, then omit the git checkout 6L02 line. Do not distribute packages made from the master branch on the Inform site or on GitHub!

Remember to place the compiler binary (ni) in the src/ni subdirectory. (To get it, download the compiler package for Linux from the Inform website.) Ensure that it is the proper version. The version must match the version declared in configure.ac.

You may want to test the program before packaging it; to do this, type

./configure
make
sudo make install

Inform 7 should appear among your applications, and you can open it. When you are satisfied that it works, type

sudo make uninstall

to remove it again, because you will also want to test the package you are building, and you don't want to confuse this version with the version in your package.

Now skip to the section below that pertains to your distribution.

Regular old source code tarball

If you have previously configured to build an RPM or DEB package, first do

./configure --disable-rpm --disable-deb

Then

make dist
mv gnome-inform7-6L02.tar.xz Gnome_UI_Source_6L02.tar.xz

Renaming the file is because the Inform team prefers all the source code archives to have similar names.

To test the package, type

tar xJf Gnome_UI_Source_6L02.tar.xz
cp src/ni/ni gnome-inform7-6L02/src/ni
cd gnome-inform7-6L02
./configure
make
sudo make install

Inform 7 should appear in your applications menu. When you are satisfied that it works, type

sudo make uninstall

if you want to remove it again.

Arch Linux

Install inform7 build dependency (if not already installed):

wget https://aur.archlinux.org/packages/in/inform7/inform7.tar.gz
tar xzf inform7.tar.gz
(cd inform7; makepkg -i)

Build gnome-inform7 package:

wget https://aur.archlinux.org/packages/gn/gnome-inform7/gnome-inform7.tar.gz
tar xzf gnome-inform.tar.gz
cd gnome-inform
makepkg

If you are updating to a new version that is not yet available on the Arch User Repository (http://aur.archlinux.org/), you will need to edit the PKGBUILD file for inform7 and gnome-inform7:

  1. Change pkgver to the new version
  • Run "makepkg -g" to generate new checksums, then copy the checksum output and replace the checksums in the PKGBUILD
  • Make any additional changes to the PKGBUILD if needed (e.g. adding patches)
  • Run "makepkg" to generate the package (run "makepkg --source" if you want to generate a source package)

Fedora

Edit the gnome-inform7.spec file and change the version number and release number. The release number should consist of <release-version>.fc<fedora-version>, where <fedora-version> is the version of Fedora it was built from, and <release-version> is the sequential release number of this version of Inform on this platform. For example, if a second Fedora package was released of Inform 6E72, with corrected dependencies, then <release-version> would be 2.

./configure --enable-rpm
make rpm

To test the package for common mistakes, type

rpmlint -i gnome-inform7-6L02-1.fc20.i686.rpm

As of 6M62, there should only be 3 errors and 1 warning about the package:

  • E: statically-linked-binary /usr/libexec/gnome-inform7/ni
  • E: zero-length /usr/share/gnome-inform7/Resources/en/doc1.html
  • E: incorrect-fsf-address /usr/share/doc/gnome-inform7/frotz/COPYING
  • W: no-manual-page-for-binary gnome-inform7

If you feel like writing a manpage to eliminate the manpage warning, feel free. The other three are harmless and should be ignored. If other warnings appear, then you should consider fixing them before releasing the package.

You can also verify that everything works by installing the package and running Inform.

TECHNICAL INFO: This will first call make dist to create a clean source code archive, only with gnome-inform7.spec added to it. Then an RPM package is built using rpmbuild. It will generate a source RPM and a binary RPM. If the redhat-rpm-config package is installed, then it will also generate a debuginfo RPM.

Ubuntu

First, if you are packaging a new version, edit the debian/changelog file by giving the command dch, and put the version number of your release in it:

 gnome-inform7 (6L02-0ubuntu1) trusty; urgency=low

   * Updated to 6L02.

  -- Philip Chimento <[email protected]>  Sun, 04 Jul 2010 11:04:07 -0400

The version number consists of the Inform version number, a dash, then the number of the Debian release this is based on (if none, then 0), then ubuntu, then the Ubuntu sequential release number. Also replace trusty by the release name of your Ubuntu system, and my name and e-mail address by yours, and change the date.

If you are not packaging a new version, for example if you are packaging an already-released version for a different processor, then leave this file alone.

Then build the package:

./configure --enable-deb
make deb

To test the package for common mistakes, type

lintian -i gnome-inform7_6L02-0ubuntu1_i386.deb

This currently, as of 6M62, produces the following 1 error and 6 warnings:

  • E: statically-linked-binary usr/lib/x86_64-linux-gnu/gnome-inform7/ni
  • W: wrong-name-for-upstream-changelog usr/share/doc/gnome-inform7/ChangeLog.gz
  • W: extra-license-file usr/share/doc/gnome-inform7/COPYING.gz
  • W: extra-license-file usr/share/doc/gnome-inform7/frotz/COPYING.gz
  • W: extra-license-file usr/share/doc/gnome-inform7/inform6/licence.txt.gz
  • W: embedded-javascript-library usr/share/gnome-inform7/Templates/Parchment/jquery.min.js please use libjs-jquery
  • W: binary-without-manpage usr/bin/gnome-inform7

These are harmless, just ignore them. If new ones appear, consider fixing them.

TECHNICAL INFO: This will first call make dist to create a clean source code archive, unpack it, and copy the files from the debian directory into it. Then it will call dpkg-buildpackage -rfakeroot -D -us -uc to build the package.

Debian

For Debian Jessie (stable), proceed as for Ubuntu, with a slight change to how you should modify the debian/changelog file:

gnome-inform7 (6L02-1) jessie; urgency=low

  * Updated to 6L02.

 -- Philip Chimento <[email protected]>  Tue, 06 Jul 2010 13:41:18 +0200

OpenSUSE

Notes for building the openSUSE RPM:

  • prepare build folder:
mkdir -p $HOME/rpmbuild/SOURCES
  • make sure openSUSE is up to date (some deps are not up to date in a fresh install of openSUSE 13.2):
sudo zypper patch
  • install build env with dependencies:
sudo zypper install rpm-build autoconf automake libtool
sudo zypper install fdupes libgoocanvas3-devel graphviz gtksourceview2-devel gtkspell-devel intltool libwebkitgtk-devel gconf2-devel gstreamer-devel update-desktop-files gettext-runtime
rpmbuild -bb gnome-inform7.opensuse.spec