X-Git-Url: https://git.distorted.org.uk/~mdw/qmail/blobdiff_plain/2117e02ec495fdfd6e96b39778b701a5bcff8aa5..9312c29dd4ff4591809c01f71361d8cfe92db67c:/debian/build-qmail diff --git a/debian/build-qmail b/debian/build-qmail new file mode 100644 index 0000000..dfcf28b --- /dev/null +++ b/debian/build-qmail @@ -0,0 +1,45 @@ +#!/bin/sh -e + +NEWDIR=./qmail + +cat <<-'!END!' + + This script unpacks the qmail source in /usr/src/qmail-src + into a directory, and compiles it to produce a binary qmail*.deb file + The directory where this is done will end up containing the + source and package files for the qmail binary package, along + with a directory containing the unpacked source. + + !END! + +echo -n "Where would you like to do this [$NEWDIR] " +read line + +NEWDIR="${line:-$NEWDIR}" + +if test -d $NEWDIR +then + echo -n "'$NEWDIR' already exists, should I use it anyway ? [yN] " + read yn + test "$yn" = y -o "$yn" = Y || exit 1 +else + mkdir $NEWDIR +fi + +cd $NEWDIR +dpkg-source -x /usr/src/qmail-src/qmail_*.dsc +cd qmail-* + +BECOMEROOT=fakeroot +cat <<-'!END!' + + For some reason fakeroot causes install to hang on my system, so I'm + giving you the option of running sudo or fakeroot. Give fakeroot a try + but if it does not work use sudo instead. + + !END! +echo -n "Should I use sudo or fakeroot to build the package ? [sF] " +read yn +test "$yn" = s -o "$yn" = S && BECOMEROOT=sudo + +dpkg-buildpackage -us -uc -r$BECOMEROOT