# You can pass your own temp directory as an environment variable.
if [ -z $TMPDIR ]
then
- TMPDIR="/tmp/buildpkg.deb"
+ TMPDIR="`pwd`/buildpkg.deb"
fi
# This prefix is prepended to all directories during "make install"
FAKEROOT="${TMPDIR}/froot"
exit 1
fi
-if [ -z $AMVER ]
-then
- AMVER=amanda-2.6.0
-fi
-
-if [ -z $AMTARBALL ]
-then
- AMTARBALL=$AMVER.tar.gz
-fi
-
#### Build functions
-do_build() {
-
- echo "Running configure"
- ./configure --quiet \
- --prefix=${PREFIX} \
- --bindir=${BINDIR} \
- --sbindir=${SBINDIR} \
- --mandir=${MANDIR} \
- --libexecdir=${LIBEXECDIR} \
- --sysconfdir=${SYSCONFDIR} \
- --localstatedir=${LOCALSTATEDIR} \
- --with-star=/bin/star \
- --with-gnutar=/bin/tar \
- --with-gnutar-listdir=${AMANDAHOMEDIR}/gnutar-lists \
- --with-index-server=localhost \
- --with-tape-server=localhost \
- --with-user=${amanda_user} \
- --with-group=${amanda_group} \
- --with-owner=${amanda_user} \
- --with-fqdn \
- --with-bsd-security \
- --with-bsdtcp-security \
- --with-bsdudp-security \
- --with-amandahosts \
- --with-smbclient=/usr/bin/smbclient \
- --with-ssh-security \
- --with-udpportrange=${udpportrange} \
- --with-tcpportrange=${tcpportrange} \
- --with-low-tcpportrange=${low_tcpportrange} \
- --with-debugging=${LOGDIR} \
- --disable-installperms \
- --enable-s3-device \
- --with-assertions \
- || exit 1
-
+do_substitute() {
+ # We need to edit packaging/deb/changelog to reflect our current distro
+ # and release. This can't be done within the debian packaging system;
+ # dpkg assumes that packages will have the same name on all releases and
+ # that apt will prevent users from downloading the wrong build. We want
+ # this information helpfully obvious since we can't rely on apt.
+ /usr/bin/perl packaging/common/substitute.pl packaging/deb/changelog.src packaging/deb/changelog
}
do_resources() {
rm -rf debian
fi
cp -Rf packaging/deb debian
- if [ -d $AMVER ]; then
- rm -rf $AMVER
+ if [ -d $BUILDDIR ]; then
+ rm -rf $BUILDDIR
fi
- mkdir $AMVER
- cp -Rfp * $AMVER
+ mkdir -p $BUILDDIR
+ cp -Rfp * $BUILDDIR
}
do_package() {
echo "Building package"
- cd $AMVER
- # This assumes that you have loaded zmanda's GPG key into your keyring to
- # sign the packages.
- dpkg-buildpackage -rfakeroot -k3C5D1C92 -tc
-}
-
-
-do_all() {
- do_build $1
- do_resources $1
- do_package $1
+ cd $BUILDDIR
+ # Create unsigned packages
+ dpkg-buildpackage -rfakeroot -uc -us
}
-do_build
+do_substitute
do_resources
do_package