Created
January 18, 2012 05:00
-
-
Save thomaslee/1631057 to your computer and use it in GitHub Desktop.
Building Debian Packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notes from here: http://www.webupd8.org/2010/01/how-to-create-deb-package-ubuntu-debian.html | |
This assumes you're using autotools to build your project. | |
1. sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder | |
2. We want a source folder with the pattern: <package>-<version> | |
$ cd ginvoke | |
$ git archive --format=tar --prefix=ginvoke-$(date +'%Y%m%d')/ master | tar xvf - -C .. | |
$ cd .. | |
3. Create a tarball from this source folder with the pattern: <package>-<version>.tar.gz | |
$ tar cfz ginvoke-$(date +'%Y%m%d').tar.gz ginvoke-$(date +'%Y%m%d') | |
4. Debianize the source package: | |
$ cd ginvoke-$(date +'%Y%m%d') | |
$ dh_make -e [email protected] -f ../ginvoke-$(date +'%Y%m%d) | |
When prompted for a project type, choose "single binary" unless you know what you're doing. | |
5. Edit the debian/control file. Be sure to specify a home page and a section (e.g. x11) | |
6. Run dpkg-depcheck to determine your package dependencies. | |
$ dpkg-depcheck -d ./configure | |
The list of packages needed will be printed out. Add these to the Build-Depends line. | |
(XXX really? the *Build*-Depends line?) | |
7. Update your debian/changelog. | |
Ensure the email address used here matches your GPG key (if any). | |
8. Build the .deb | |
$ dpkg-buildpackage -rfakeroot | |
9. Check the package using lintian | |
$ lintian -Ivi ../ginvoke-$(date +'%Y%m%d').changes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment