#! /bin/bash
set -x
#### Configure variables. Feel free to change these, but be careful!
-SRCDIR=$(pwd)
+SRCDIR=$PWD
# You can pass your own temp directory as an environment variable.
-if [ -z $TMPDIR ]
-then
- TMPDIR="`pwd`/buildpkg.deb"
-fi
# This prefix is prepended to all directories during "make install"
-FAKEROOT="${TMPDIR}/froot"
+FAKEROOT="${SRCDIR}/froot"
# Configure and Compilation directory.
-BUILDDIR="${TMPDIR}/build"
+BUILDDIR="${SRCDIR}/build"
# Config variables to mirror those in RPM .spec file
amanda_user=amandabackup
amanda_group=admin
-udpportrange="700,740"
-tcpportrange="11000,11040"
-low_tcpportrange="700,710"
PREFIX="/usr"
EPREFIX="${PREFIX}"
BINDIR="${EPREFIX}/bin"
exit 1
fi
+# Until we get package revisioning in community.
+[ -f "PKG_REV" ] || echo "1" > PKG_REV
+
#### Build functions
do_substitute() {
# 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
+ file_list="packaging/deb/changelog \
+ packaging/deb/postinst \
+ packaging/deb/postrm \
+ packaging/deb/preinst"
+ for file in ${file_list}; do
+ /usr/bin/perl packaging/common/substitute.pl \
+ ${file}.src ${file} || exit 1
+ done
}
do_resources() {