On 01/19/2012 05:38 AM, Louigi Verona wrote:
Hello, Robin!
I apologize, I never created any debs. I did try to call
git-buildpackage, but it said home/louigi is not a repository,
Looks like you forgot to cd into the source-dir. more below.
so I guess I need to do some preparation, but most
importantly -
learn how to do this.
Maybe. If music is what you want to do, don't bother to become a DD.
OTOH (personal- and otherwise-) packages can save lots of time (e.g.
cleaning up /usr/local/ when a new project eventually hits your
distribution; or deploying custom software on more than one machine, and
sharing it easily)
Let's start at the end: building the package (from git)
cd /tmp/
git clone
git://github.com/x42/paulstretch_cpp.git
cd paulstretch_cpp/
git checkout -b upstream origin/upstream
git checkout master
git-buildpackage -rfakeroot -b -us
# ^ may complain about missing build-deps, apt-get install them
# and re-run git-buildpackage
ls ../*deb
sudo dpkg -i ../*deb
The options "-rfakeroot -b -us" options are passed on to `debuild`, or
`dpkg-buildpackage`: -b: build binary only; -us: don't GPG sign it.
To create a source (and binary) packages directly from git, but built
them in a dedicated folder outside the git-repo:
TMPDIR=/tmp/mybuild
mkdir ${TMPDIR}
git-buildpackage \
--git-upstream-branch=upstream --git-debian-branch=master \
--git-upstream-tree=branch \
--git-no-pristine-tar --git-force-create \
--git-export-dir=${TMPDIR}
-rfakeroot # -us -uc
#validate the package:
lintian -i --pedantic `ls -t ${TMPDIR}/*changes | head -n1`
#upload it somewhere -- ; man dput.cf; edit ~/.dput.cf
dput somehost `ls -t ${TMPDIR}/*changes | head -n1`
I remember I did want to do debs, but it turned out to
be a time consuming
and complex process.
It's less complex than you may think. As usual, the tricky part is the
politics - not technical issues. That's also the reason why PPAs have
become popular: don't bother about policy :)
For a minimal .deb package you /only/ need 4 files:
debian/changelog -- version-num, target-distribution, history
debian/control -- package-name, dependencies, description
debian/rules -- build instructions (makefile)
debian/compat -- just a number.
Just check out some existing packages, copy, paste, edit. There's also
lots of documentation and tutorials around. It may take you only an hour
or two to learn the basics.
`dh_make` is an easy way initially populate debian/* with example files.
Beyond the basics, it can indeed become an odyssey, esp. if you want to
create binaries for all architectures, multiple distributions, etc.
(pbuilder, cowbuilder) yourself. but one usually outsources that.
Also, shared-libs require a bit of special attention..
In my experience, the most time-consuming part in debian packaging is
writing man-pages!! Debian Policy section 12.1: "Each binary [..]
should have a manual page included in the same package". YMMV.
I do plan to learn how to use PPA at least. Creating a
PPA account might
be useful.
They are dead-useful.
robin