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="/tmp/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)."
57 AMTARBALL=$AMVER.tar.gz
64 echo "Running configure"
68 --sbindir=${SBINDIR} \
70 --libexecdir=${LIBEXECDIR} \
71 --sysconfdir=${SYSCONFDIR} \
72 --localstatedir=${LOCALSTATEDIR} \
73 --with-star=/bin/star \
74 --with-gnutar=/bin/tar \
75 --with-gnutar-listdir=${AMANDAHOMEDIR}/gnutar-lists \
76 --with-index-server=localhost \
77 --with-tape-server=localhost \
78 --with-user=${amanda_user} \
79 --with-group=${amanda_group} \
80 --with-owner=${amanda_user} \
83 --with-bsdtcp-security \
84 --with-bsdudp-security \
86 --with-smbclient=/usr/bin/smbclient \
88 --with-udpportrange=${udpportrange} \
89 --with-tcpportrange=${tcpportrange} \
90 --with-low-tcpportrange=${low_tcpportrange} \
91 --with-debugging=${LOGDIR} \
92 --disable-installperms \
100 # Setup directories and files as dpkg-buildpkg expects.
101 if [ -d debian ]; then
104 cp -Rf packaging/deb debian
105 if [ -d $AMVER ]; then
114 echo "Building package"
116 # Create unsigned packages
117 dpkg-buildpackage -rfakeroot -uc -us