Debian Source Package Build

Place the following files in a working directory

bsu_3.0.1-1.diff.gz  (<--if any exists)
bsu_3.0.1.orig.tar.gz
bsu_3.0.1-1.dsc

You should have installed both Fortran and C compilers. It is also good to have helper packages installed (debhelper, dpkg-dev, dh-make, devscripts, lintian). Unpack the source with the following command:


dpkg-source -x bsu_3.0.1-1.dsc


Your screen will output the following (assuming a *.diff.gz file exists)


dpkg-source: extracting bsu in bsu-3.0.1
dpkg-source: unpacking bsu_3.0.1.orig.tar.gz
dpkg-source: applying ./bsu_3.0.1-1.diff.gz


Then change into the debian directory and use your favorite editor (like vi) to edit the changelog file:


cd bsu-3.0.1
cd debian
vi changelog


The changelog file will look something like this:


bsu (3.0.1-1) stable; urgency=low

  * Initial release (Closes: #0000)

 -- P. Michaels <pm@cgiss.boisestate.edu>  Wed, 09 Apr 2009 16:14:28 -0600


Modify the first line with some ID to indicate that the package has been built by you. Let's say your initials are ``JMS'', then the modified file would look like this:


bsu (2.0.1-1JMS) stable; urgency=low

  * Initial release (Closes: #0000)

 -- P. Michaels <pm@cgiss.boisestate.edu>  Wed, 09 Apr 2009 16:14:28 -0600


This would be the minimum change. Changelog files have a rigorous format, so quit while you are ahead, and save the modified file. Then move up a directory and execute the build command:


cd ..
dpkg-buildpackage -rfakeroot -uc -us


If all goes well, you will have a *.deb binary file built (it will be located in the same directory as the *.dsc file). The new *.deb file can be installed as above in section 2.6.1. If all does not go well, it probably will mean that you need to install a package or compiler, or something that BSU needs. Just read the error message.

pm 2018-04-08