this patch also appears to no longer be relevant
[debian/amanda] / packaging / deb / rules
index 279863b8d89b830f1aa95bdcbf7955402b089e8f..acf900c713255b50bbf1c6e0267261b708deb4f0 100755 (executable)
@@ -1,14 +1,13 @@
 #!/usr/bin/make -f
-# debian/rules for amanda using debhelper. GNU copyright 2008 by Dan Locks, 
+# debian/rules for amanda using debhelper. GNU copyright 2008 by Dan Locks,
 # based on work by Bdale Garbee.
-# requires automake 1.2d (from experimental tree)
 
 #      Warning - do *not* use -j on an SMP machine, or the build gets
-#              confused... some sort of race condition in the makefiles?
+#      confused... some sort of race condition in the makefiles?
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
-AMVER=2.6.2alpha
+AMVER=`cat FULL_VERSION`
 
 # These are variables that the user can override.  They get used in various
 # places during configure, build, and install.
@@ -46,13 +45,14 @@ DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 WD=$(shell pwd)
 
-build: build-stamp 
-build-stamp: /sbin/dump /usr/bin/smbclient 
+build: build-stamp
+build-stamp: /sbin/dump /usr/bin/smbclient
        dh_testdir
        ./configure \
                MAKEFLAGS="-j1 " \
                CFLAGS="-pipe " \
                MAILER=/usr/bin/mail \
+               --enable-as-needed \
                --quiet \
                --host=$(DEB_HOST_GNU_TYPE) \
                --build=$(DEB_BUILD_GNU_TYPE) \
@@ -76,19 +76,19 @@ build-stamp: /sbin/dump /usr/bin/smbclient
                --with-amandahosts \
                --with-smbclient=$(BINDIR)/smbclient \
                --with-debugging=$(LOGDIR) \
-               --with-tcpportrange=11000,11040 \
-                --with-low-tcpportrange=700,710 \
-               --with-udpportrange=700,740 \
                --with-ssh-security \
                --with-assertions \
                --enable-s3-device \
                --disable-installperms
        touch missing
-       # There's probably a better way to do this.  Preinst and postrm are the
-       # same for client and server, but we leave room for differences by just
-       # appending here.
+       # Preinst is the same for client and server, but we leave room for
+       # differences by just appending here.
        cat $(WD)/debian/preinst >> $(WD)/debian/amanda-backup-client.preinst
        cat $(WD)/debian/preinst >> $(WD)/debian/amanda-backup-server.preinst
+       # Postinst and postrm keep client/server differences to just variables;
+       # the postinst/postrm logic is otherwise the same.
+       cat $(WD)/debian/postinst >> $(WD)/debian/amanda-backup-client.postinst
+       cat $(WD)/debian/postinst >> $(WD)/debian/amanda-backup-server.postinst
        cat $(WD)/debian/postrm >> $(WD)/debian/amanda-backup-client.postrm
        cat $(WD)/debian/postrm >> $(WD)/debian/amanda-backup-server.postrm
        make -s LIBTOOLFLAGS=--silent
@@ -161,7 +161,8 @@ binary-arch: build
                $(server)/$(AMLIBEXECDIR)/calcsize \
                $(server)/$(AMLIBEXECDIR)/dumper \
                $(server)/$(AMLIBEXECDIR)/planner \
-               $(server)/usr/sbin/amcheck
+               $(server)/usr/sbin/amcheck \
+               $(server)/usr/sbin/amservice
        chmod u=srwx,g=rx,o=r \
                $(client)/$(AMLIBEXECDIR)/application/amgtar \
                $(client)/$(AMLIBEXECDIR)/application/amstar \
@@ -177,9 +178,10 @@ binary-arch: build
                $(server)$(AMLIBEXECDIR)/calcsize \
                $(server)$(AMLIBEXECDIR)/dumper \
                $(server)$(AMLIBEXECDIR)/planner \
-               $(server)/usr/sbin/amcheck
-       echo "Amanda version $(AMVER)" >  $(server)/$(AMANDAHOMEDIR)/amanda-release 
-       echo "Amanda version $(AMVER)" >  $(client)/$(AMANDAHOMEDIR)/amanda-release 
+               $(server)/usr/sbin/amcheck \
+               $(server)/usr/sbin/amservice
+       echo "Amanda version $(AMVER)" >  $(server)/$(AMANDAHOMEDIR)/amanda-release
+       echo "Amanda version $(AMVER)" >  $(client)/$(AMANDAHOMEDIR)/amanda-release
        install -o root -g root -m 0644 debian/amanda-backup-client.lintian \
                $(client)/usr/share/lintian/overrides/amanda-backup-client
        install -o root -g root -m 0644 debian/amanda-backup-server.lintian \
@@ -192,7 +194,7 @@ binary-arch: build
        dh_md5sums  >> $(log) 2>&1
        dh_builddeb  >> $(log) 2>&1
 
-source diff:                                                                  
+source diff:
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
 binary: binary-arch