X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=debian%2Frules;h=d8c11ee369e0d982bf9b50f8ba4aadca2f467f25;hb=HEAD;hp=8d4592bf2d27aa70f3fa3ce9e7c94f45d946e712;hpb=433ed330db63d8c4e06e046d2e3e820ceb7947a2;p=debian%2Famanda diff --git a/debian/rules b/debian/rules index 8d4592b..d8c11ee 100755 --- a/debian/rules +++ b/debian/rules @@ -1,39 +1,60 @@ #!/usr/bin/make -f -# debian/rules for amanda using debhelper. GNU copyright 1998 by Bdale Garbee. -# requires automake 1.2d (from experimental tree) +# Copyright 1998-2011 by Bdale Garbee. License GPL v2 -# Warning - do *not* use -j on an SMP machine, or the build gets -# confused... some sort of race condition in the makefiles? +export DH_VERBOSE=1 -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +DPKG_EXPORT_BUILDFLAGS = 1 +-include /usr/share/dpkg/buildflags.mk 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 \ + --without-amperldir \ + --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 \ + --enable-s3-device + touch missing - MAILER=/usr/bin/mail make CFLAGS="-O2 -g -Wall \ + touch configure-stamp + +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp +build-stamp: configure-stamp + dh_testdir + MAILER=/usr/bin/mail $(MAKE) CFLAGS="$(CFLAGS) -O2 -g -Wall \ -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' \ -DIGNORE_TAR_ERRORS " touch build-stamp @@ -43,55 +64,51 @@ clean: dh_testroot [ ! -f Makefile ] || make clean [ ! -f Makefile ] || make distclean - -rm -f build-stamp missing config/config.h common-src/genversion - -rm -f debian/po/templates.pot + -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 - - debconf-updatepo dh_clean -# Build architecture-independent files here. +# call this before packaging for upload when updating template English text +updatepo: + -rm -f debian/po/templates.pot + debconf-updatepo + binary-indep: build -# Build architecture-dependent files here. binary-arch: build dh_testdir dh_testroot dh_clean -k dh_installdirs -a make install DESTDIR=$(r) + sed -i "/dependency_libs/ s/'.*'/''/" `find $(r)/usr/lib/amanda/ -name '*.la'` install -m 644 debian/amandahosts $(r)/etc/amandahosts dh_installdocs -a dh_installexamples -a cp ChangeLog $(r)/usr/share/doc/amanda-common/changelog - cp debian/xinetd.d/amandaidx $(s)/etc/xinetd.d - cp debian/xinetd.d/amidxtape $(s)/etc/xinetd.d - cp debian/xinetd.d/amanda $(r)/etc/xinetd.d + cp example/xinetd.amandaserver $(r)/etc/xinetd.d/amanda dh_installmenu -a dh_installcron -a dh_installchangelogs -a dh_installdebconf -a + dh_installman -a dh_strip -a dh_compress -a dh_movefiles -a --sourcedir=debian/amanda-common - rm $(s)/usr/lib/amanda/chg-mtx + rm -r $(r)/usr/share/amanda dh_fixperms -av # fix perms manually chown -R backup:backup debian/*/var/lib/* chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/* - chown -R backup:backup $(s)/var/log/amanda - chmod -R u=rwX,g=rwX,o-rwx $(s)/var/log/amanda chown -R backup:backup $(s)/etc/amanda chmod -R u=rwX,g=rwX,o-rwx $(s)/etc/amanda chown -R backup:backup $(c)/var/lib/amanda/gnutar-lists chmod -R u=rwX,g=rwX,o-rwx $(c)/var/lib/amanda/gnutar-lists # .. setuid chown root:backup \ + $(c)/usr/lib/amanda/application/amgtar \ + $(c)/usr/lib/amanda/application/amstar \ + $(c)/usr/lib/amanda/calcsize \ $(c)/usr/lib/amanda/killpgrp \ $(c)/usr/lib/amanda/rundump \ $(c)/usr/lib/amanda/runtar \ @@ -99,6 +116,9 @@ binary-arch: build $(s)/usr/lib/amanda/planner \ $(s)/usr/sbin/amcheck chmod u=srwx,g=rx,o=r \ + $(c)/usr/lib/amanda/application/amgtar \ + $(c)/usr/lib/amanda/application/amstar \ + $(c)/usr/lib/amanda/calcsize \ $(c)/usr/lib/amanda/killpgrp \ $(c)/usr/lib/amanda/rundump \ $(c)/usr/lib/amanda/runtar \ @@ -111,8 +131,9 @@ binary-arch: build $(r)/usr/share/lintian/overrides/amanda-common install -o root -g root -m 0644 debian/amanda-server.lintian \ $(s)/usr/share/lintian/overrides/amanda-server - dh_makeshlibs -a + dh_makeshlibs -pamanda-common --noscripts dh_installdeb -a + dh_perl -a usr/lib/amanda/perl dh_shlibdeps -a -l"debian/amanda-common/usr/lib:debian/amanda-client/usr/lib:debian/amanda-server/usr/lib" # strip out the non-versioned amanda-common references, we need # the versioned ones in the control file and dupes are ugly... @@ -127,8 +148,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 +.PHONY: configure build-indep build-arch build clean binary-indep binary-arch binary