3 #### Configure variables. Feel free to change these, but be careful!
5 # You can pass your own temp directory as an environment variable.
8 TMPDIR="`pwd`/buildpkg.deb"
10 # This prefix is prepended to all directories during "make install"
11 FAKEROOT="${TMPDIR}/froot"
12 # Configure and Compilation directory.
13 BUILDDIR="${TMPDIR}/build"
14 # Config variables to mirror those in RPM .spec file
15 amanda_user=amandabackup
17 udpportrange="700,740"
18 tcpportrange="11000,11040"
19 low_tcpportrange="700,710"
22 BINDIR="${EPREFIX}/bin"
23 SBINDIR="${EPREFIX}/sbin"
24 LIBEXECDIR="${EPREFIX}/lib/amanda"
25 DATADIR="${PREFIX}/share"
28 AMANDAHOMEDIR="${LOCALSTATEDIR}/lib/amanda"
29 LIBDIR="${EPREFIX}/lib"
30 INCLUDEDIR="${PREFIX}/include"
31 INFODIR="${PREFIX}/info"
32 MANDIR="${DATADIR}/man"
33 LOGDIR="${LOCALSTATEDIR}/log/amanda"
37 if [ ! -f common-src/amanda.h ]
39 echo "'buildpkg' must be run from the root of an otherwise unused amanda source directory." >&2
45 echo "The source directory has not been autogen'd -- please download a source distribution tarball or run ./autogen."
46 echo "You will need autoconf, automake, and libtool to run autogen (but not to compile from a distribution tarball)."
53 # We need to edit packaging/deb/changelog to reflect our current distro
54 # and release. This can't be done within the debian packaging system;
55 # dpkg assumes that packages will have the same name on all releases and
56 # that apt will prevent users from downloading the wrong build. We want
57 # this information helpfully obvious since we can't rely on apt.
58 /usr/bin/perl packaging/common/substitute.pl packaging/deb/changelog.src packaging/deb/changelog
62 # Setup directories and files as dpkg-buildpkg expects.
63 if [ -d debian ]; then
66 cp -Rf packaging/deb debian
67 if [ -d $BUILDDIR ]; then
76 echo "Building package"
78 # Create unsigned packages
79 dpkg-buildpackage -rfakeroot -uc -us