Skip to content

Instantly share code, notes, and snippets.

@bitsgalore
Created March 20, 2018 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitsgalore/79377335d9e0e012163a0e5fb9b60635 to your computer and use it in GitHub Desktop.
Save bitsgalore/79377335d9e0e012163a0e5fb9b60635 to your computer and use it in GitHub Desktop.

Debian packaging cheat sheet

(From old notes, circa 2013)

List contents

dpkg --contents PACKAGENAME

Remove package

sudo apt-get --purge remove PACKAGENAME

Include arbitrary files

Step 1: Create /debian/jpwrappa.install file. Each line represents source/destination path, e.g.:

jpwrappa/config.xml  etc/jpwrappa
jpwrappa/profiles/* etc/jpwrappa/profiles/

Do not prepend file paths by any '/' characters!

Step 2: Add destination directories to /debian/dirs, e.g.:

usr/bin
etc/jpwrappa
etc/jpwrappa/profiles

(Actually I'm not even 100% sure if this step is absolutely necessary - please try for yourself!)

Step 3: Add dh_install command to /debian/rules, e.g. like this:

# Build architecture-independent files here.
binary-indep: install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
	dh_install
	dh_installman
	dh_link
	dh_compresshttps://twitter.com/#
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

(Note: I have no idea about the 'proper' place to put this, but at least it works!).

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment