Hi,
Am Mittwoch, den 21.01.2009, 12:37 -0600 schrieb John Goerzen:
> I maintain a number of my own Haskell libraries as Debian native
> packages.
>
> I do that because of convenience and because that is how I maintain
> them: they are Debian native, because building them as Debian packages
> is my development environment.
>
> After some suggestions here recently, I decided to try maintaining
> them as "regular" Debian packages. One branch (master) with the
> upstream code, and the debian/ branch containing nothing but the
> debian/ files as diffs atop master. The debian tar.gz file *is* the
> upstream file that I post for others to use.
>
> I found quickly this was seriously annoying. I'd go try to build a
> Debian package, and the build would fail somewhere. Somewhere that
> required a hack to a .cabal or .hs file. I'd have to remember to go
> switch to master branch to commit it, then switch back to debian
> branch, merge, and re-build. And if I forget to do that, more trouble
> later, for everyone not on Debian.
>
> My conclusion is that this is not a reasonable way to work. Does
> someone else have a suggestion?
you could develop it all in one branch, but before running
dpkg-buildpackage run a script that does (untested code)
UPSTREAM_VERSION=$(cat debian/changelog|some_grep_magic)
SOURCE_NAME=$(cat debian/control|some_grep_magic)
git archive --format=tar --prefix="$SOURCE_NAME-$UPSTREAM_VERSION" | \
tar --file - --delete "$SOURCE_NAME-$UPSTREAM_VERSION/debian" | \
gzip -9 > ../"$SOURCE_NAME_$UPSTREAM_VERSION".orig.tar.gz
This will place a nicely named tarball in the directory above, where
dpkg-buildpackage will find it and the only differences it will find are
the debian/ directory...
Does this sound viable?
Greetings,
Joachim
--
Joachim "nomeata" Breitner
Debian Developer
nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil