Creating a deb package for GNU Modula-2
This section documents an easy method of producing Debian packages for
GNU Modula-2. There are probably other ways to build Debian packages
but this method works well enough to produce the binary and source
packages described in earlier sections.
- firstly you need to create a pbuilder environment. I used the excellent
http://people.connexer.com/~roberto/howtos/debcustomize tutorial.
- before building GNU Modula-2 you should update your pbuilder environment by:
$ sudo pbuilder create
- now you can obtain the GNU Modula-2 source code.
$ apt-get source gm2
- before creating the package it is advisable to revise the version number.
This is should be done semi automatically via the following commands:
$ cd gm2-1.9.4
$ myrevdeb
the script myrevdeb is available from
http://floppsie.comp.glam.ac.uk/download/scripts/myrevdeb.
- if you just want to rebuild the rebuild the package with no
alterations you should skip this bullet point. However if you wish to
introduce a later gcc/gm2 source tree into the package you need to
download the desired version from
http://floppsie.comp.glam.ac.uk/download/c and extact and move
it into gm2-1.9.4. Now you should remove the old source
tree inside gm2-1.9.4 and then you will have to edit
gm2-1.9.4/Makefile.in and
gm2-1.9.4/debian/rules and change the references
to the previous source tree to your source new tree. Once this is
completed you must rebuild the Makefile by:
$ cd gm2-1.9.4
$ ./configure
- finally the package can be built using these commands:
$ cd gm2-1.9.4
$ mypdebbuild
which are available as a trivial script
http://floppsie.comp.glam.ac.uk/download/scripts/mypdebbuild.
Once this completes you should have a binary package and a
corresponding documentation package available in the directory
/usr/local/src/results.