Merge branch 'lenny'
[debian/amanda] / debian / rules
index 98459e5b05d2115cfcc52087222f01112ea6221c..764713c38507ca9ba1cf3b014124b416594787d4 100755 (executable)
@@ -1,9 +1,6 @@
 #!/usr/bin/make -f
-# debian/rules for amanda using debhelper. GNU copyright 1998 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?
+# debian/rules for amanda using debhelper
+# Copyright 1998-2009 by Bdale Garbee.  License GPL v2
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -12,28 +9,46 @@ r=$(shell pwd)/debian/amanda-common
 s=$(shell pwd)/debian/amanda-server
 c=$(shell pwd)/debian/amanda-client
 
-build: build-stamp 
-build-stamp: /sbin/dump /usr/bin/smbclient debian/po/templates.pot
+configure: configure-stamp
+configure-stamp:
        dh_testdir
-#      automake --foreign
-#      autoconf -l config
+       # pick up latest config files provided by autotools-dev
+       cp -f /usr/share/misc/config.sub config/config.sub
+       cp -f /usr/share/misc/config.guess config/config.guess
+       # do we need --{htmldir,dvidir,pdfdir,psdir} to force subdirectories?
+       # should we re-craft this to use --without-server and --without-client,
+       #       and lose the amanda-common package?
        MAILER=/usr/bin/mail \
-       ./configure --prefix=/usr --bindir=/usr/sbin --mandir=/usr/share/man \
-               --libexecdir=/usr/lib/amanda --enable-shared\
-               --sysconfdir=/etc --localstatedir=/var/lib \
+       SSH=/usr/bin/ssh \
+       ./configure \
+               --prefix=/usr \
+               --bindir=/usr/sbin \
+               --libexecdir=/usr/lib/amanda \
+               --without-amlibexecdir \
+               --sysconfdir=/etc \
+               --sharedstatedir=/var/lib \
+               --localstatedir=/var/lib \
+               --with-user=backup \
+               --with-group=backup  \
+               --with-tcpportrange=50000,50100 \
+               --with-udpportrange=840,860 \
+               --with-debugging=/var/log/amanda \
                --with-gnutar-listdir=/var/lib/amanda/gnutar-lists \
                --with-index-server=localhost \
-               --with-user=backup --with-group=backup  \
-               --with-bsd-security --with-amandahosts \
+               --with-bsd-security \
                --with-smbclient=/usr/bin/smbclient \
-               --with-debugging=/var/log/amanda \
-               --with-dumperdir=/usr/lib/amanda/dumper.d \
-               --with-tcpportrange=50000,50100 --with-udpportrange=840,860 \
-               --with-maxtapeblocksize=256 \
+               --with-amandahosts \
                --with-ssh-security \
-               --with-bsdtcp-security --with-bsdudp-security \
+               --with-bsdtcp-security \
+               --with-bsdudp-security \
                --without-ipv6
+
        touch missing
+       touch configure-stamp
+
+build: build-stamp 
+build-stamp: configure-stamp
+       dh_testdir
        MAILER=/usr/bin/mail make CFLAGS="-O2 -g -Wall \
                -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' \
                -DIGNORE_TAR_ERRORS "
@@ -44,14 +59,8 @@ clean:
        dh_testroot
        [ ! -f Makefile ] || make clean
        [ ! -f Makefile ] || make distclean
-       -rm -f build-stamp missing config/config.h common-src/genversion
+       -rm -f build-stamp configure-stamp missing config/config.h common-src/genversion
        -find . -type d -name .deps -exec rm -rf {} \;
-
-       -test -r /usr/share/misc/config.sub && \
-               cp -f /usr/share/misc/config.sub config/config.sub
-       -test -r /usr/share/misc/config.guess && \
-               cp -f /usr/share/misc/config.guess config/config.guess
-
        dh_clean
 
 # call this before packaging for upload when updating template English text
@@ -59,10 +68,8 @@ updatepo:
        -rm -f debian/po/templates.pot
        debconf-updatepo
        
-# Build architecture-independent files here.
 binary-indep: build
 
-# Build architecture-dependent files here.
 binary-arch: build
        dh_testdir
        dh_testroot
@@ -131,8 +138,5 @@ binary-arch: build
 source diff:                                                                  
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
-debian/po/templates.pot:       debian/templates
-       @debconf-updatepo
-
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary