How to create a debian package

method 1
see also
supposing anything-sync-daemon-5.76 contains all package's files

Than simply create anything-sync-daemon-5.76/DEBIAN/control file with a similar content:
Package: anything-sync-daemon
Version: 5.76
Section: Utilities
Priority: optional
Architecture: amd64
Maintainer: Gigi Kent <>
Description: anything sync daemon

then run
dpkg-deb --build anything-sync-daemon-5.76
dpkg-deb -c anything-sync-daemon-5.76.deb
sudo dpkg -i anything-sync-daemon-5.76.deb
method 2 (problem: will include only the doc files ...)
see also
sudo apt-get install build-essential
e.g. for anything-sync-daemon
ls -l /tmp/$NEW_BUILD_NAME-*
ls -l ~/ubuntu_packages/*/$NEW_BUILD_NAME-*
build command was something like this: make install DESTDIR=$NEW_BUILD_NAME_AND_VER

e.g. package anything-sync-daemon
at this point anything-sync-daemon-5.76.tgz must exists!
bzr dh-make anything-sync-daemon 5.76 anything-sync-daemon-5.76.tgz
find anything-sync-daemon
cd anything-sync-daemon/debian
rm *ex *EX
rm README.source README.Debian
take the Ubuntu release name
lsb_release -a | grep Codename | awk '{print $2}'
and use it here (e.g. wily):
sed -i s/"unstable"/"wily"/ changelog
sed -i s/"gigi <gigi@unknown>"/"Gigi Kent <>"/ changelog
sed -i s/"gigi <gigi@unknown>"/"Gigi Kent <>"/ control
sed -i s/"Section: unknown"/"Section: Utilities"/ control
also fill Description in control file

Finally commit the code to your packaging branch
cd ..
now you should be back to the anything-sync-daemon directory
bzr add debian/source/format
bzr commit -m "Initial commit of Debian packaging ($NEW_BUILD_NAME)."
building the package
bzr builddeb -- -us -uc
lesspipe ../anything-sync-daemon_5.76-1_amd64.deb
check deb file for errors
lintian ../anything-sync-daemon_5.76-1_amd64.deb -> for single binary
lintian ../anything-sync-daemon_5.76-1_all.deb -> for indep binary
list deb content
dpkg-deb -c ../anything-sync-daemon_5.76-1_amd64.deb
dpkg-deb -c ../anything-sync-daemon_5.76-1_all.deb

	bzr: ERROR: Unable to determine your name
	Please, set your name with the 'whoami' command.
	bzr whoami "firstname name <email address>"
	bzr whoami "Gigi Kent <>"

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.