[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: native packages

On Tue, 23 Jan 2007 22:02:05 +1100
"Andrew Donnellan" <ajdlinux@gmail.com> wrote:

> So essentially, store debian/ etc in the upstream VCS, but keep it out
> of releases and only add the directory when building a Debian package?
> Does this mean I should create a snapshot of everything except the
> debian files, then copy the debian files in to make a diff?

I don't use anything as complex as that - or a svn branch.

I simply use 'make dist', copy the tarball to /opt/debian/foo, unpack
and then copy over the debian/ files. Here's a snippet from one of my
scripts for a project using CVS:

cp /opt/working/$project/$project-$version.tar.gz .
tar -xzf $project-$version.tar.gz
mkdir $debhomedir/debian
cd /opt/working/$project/debian/
tar -czf $debhomedir/debian/debian.tar.gz `find . -name '*CVS*' -prune -o -type d -o -print`
cd $debhomedir/debian
tar -xzf debian.tar.gz
rm debian.tar.gz
cd ../
debuild -us -uc

That copes with content in debian/patches, debian/lintian and
debian/linda etc.

The 'find' command simply prints the location of each file in debian/
or any directory beneath it that is not part of CVS. Do the same
for .svn content - both must be excluded from the package build area.

You can see the upstream debian/ files here:

Doing the work in a separate directory makes it easier to spot
omissions in the 'make dist' target or in your debian directory, plus
it helps to keep the .diff.gz cleaner.

It is NOT advisable to build packages within the svn/cvs tree without
using svn-buildpackage or cvs-buildpackage (which themselves build the
package in a separate build-area).


Neil Williams

Attachment: pgpgfewyuLIYq.pgp
Description: PGP signature

Reply to: