X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=packaging%2Fdeb%2Frules;h=779c5461d2d1f9a272e60c0fa27023d38ccf5f7d;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hp=6fcae65c84d01641387ff3094f0de8c23cf00e87;hpb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;p=debian%2Famanda diff --git a/packaging/deb/rules b/packaging/deb/rules index 6fcae65..779c546 100755 --- a/packaging/deb/rules +++ b/packaging/deb/rules @@ -1,14 +1,13 @@ #!/usr/bin/make -f # 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? # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -AMVER=2.6.1 +AMVER=3.2alpha # These are variables that the user can override. They get used in various # places during configure, build, and install. @@ -22,7 +21,7 @@ MANDIR=$(PREFIX)/share/man DOCDIR=$(PREFIX)/share/doc SYSCONFDIR=/etc LOCALSTATEDIR=/var -AMHOMEDIR=$(LOCALSTATEDIR)/lib/amanda +AMANDAHOMEDIR=$(LOCALSTATEDIR)/lib/amanda LOGDIR=$(LOCALSTATEDIR)/log/amanda # Extract the perl site_lib directory. This is used to install amanda's perl # libs. If configure finds a different install or you specify a different path using @@ -33,7 +32,7 @@ AMANDAGROUP=disk WITHOUT_SERVER="False" WITHOUT_CLIENT="False" -r=$(shell pwd)/debian/amanda-common +r=$(shell pwd)/debian/tmp server=$(shell pwd)/debian/amanda-backup-server client=$(shell pwd)/debian/amanda-backup-client @@ -44,12 +43,14 @@ log=$(shell pwd)/debian/dpkg.log DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +WD=$(shell pwd) + build: build-stamp build-stamp: /sbin/dump /usr/bin/smbclient dh_testdir ./configure \ MAKEFLAGS="-j1 " \ - CFLAGS="-DIGNORE_TAR_ERRORS " \ + CFLAGS="-pipe " \ MAILER=/usr/bin/mail \ --quiet \ --host=$(DEB_HOST_GNU_TYPE) \ @@ -61,8 +62,8 @@ build-stamp: /sbin/dump /usr/bin/smbclient --enable-shared \ --sysconfdir=$(SYSCONFDIR) \ --localstatedir=$(LOCALSTATEDIR) \ - --with-amdatadir=$(AMHOMEDIR) \ - --with-gnutar-listdir=$(AMHOMEDIR)/gnutar-lists \ + --with-amdatadir=$(AMANDAHOMEDIR) \ + --with-gnutar-listdir=$(AMANDAHOMEDIR)/gnutar-lists \ --with-index-server=localhost \ --with-tape-server=localhost \ --with-user=$(AMANDAUSER) \ @@ -74,9 +75,6 @@ build-stamp: /sbin/dump /usr/bin/smbclient --with-amandahosts \ --with-smbclient=$(BINDIR)/smbclient \ --with-debugging=$(LOGDIR) \ - --with-tcpportrange=11000,11040 \ - --with-udpportrange=700,740 \ - --with-low-udpportrange=700,710 \ --with-ssh-security \ --with-assertions \ --enable-s3-device \ @@ -85,18 +83,18 @@ build-stamp: /sbin/dump /usr/bin/smbclient # 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. - cat $(shell pwd)/debian/preinst >> $(shell pwd)/debian/amanda-backup-client.preinst - cat $(shell pwd)/debian/preinst >> $(shell pwd)/debian/amanda-backup-server.preinst - cat $(shell pwd)/debian/postrm >> $(shell pwd)/debian/amanda-backup-client.postrm - cat $(shell pwd)/debian/postrm >> $(shell pwd)/debian/amanda-backup-server.postrm - make + cat $(WD)/debian/preinst >> $(WD)/debian/amanda-backup-client.preinst + cat $(WD)/debian/preinst >> $(WD)/debian/amanda-backup-server.preinst + cat $(WD)/debian/postrm >> $(WD)/debian/amanda-backup-client.postrm + cat $(WD)/debian/postrm >> $(WD)/debian/amanda-backup-server.postrm + make -s LIBTOOLFLAGS=--silent touch build-stamp clean: dh_testdir >> $(log) 2>&1 dh_testroot >> $(log) 2>&1 - -make clean - -make distclean + -make -s LIBTOOLFLAGS=--silent clean + -make -s LIBTOOLFLAGS=--silent distclean -rm -f build-stamp missing config/config.h common-src/genversion -find . -type d -name .deps -exec rm -rf {} \; -test -r /usr/share/misc/config.sub && \ @@ -115,24 +113,18 @@ binary-arch: build dh_clean -k >> $(log) 2>&1 echo "---->dh_installdirs: " >> $(log) dh_installdirs -v >> $(log) 2>&1 - make install DESTDIR=$(r) + make -s LIBTOOLFLAGS=--silent install DESTDIR=$(r) echo "---->dh_installdocs: " >> $(log) dh_installdocs -v >> $(log) 2>&1 install -d $(r)/$(DOCDIR)/amanda-common/examples cp -a example/* $(r)/$(DOCDIR)/amanda-common/examples cp ChangeLog $(r)/$(DOCDIR)/amanda-common/changelog - echo "---->dh_installmenu: " >> $(log) - dh_installmenu -v >> $(log) 2>&1 - echo "---->dh_installcron: " >> $(log) - dh_installcron >> $(log) 2>&1 echo "---->dh_installchangelogs: " >> $(log) dh_installchangelogs -v >> $(log) 2>&1 - echo "---->dh_installdebconf: " >> $(log) - dh_installdebconf -v >> $(log) 2>&1 # Here's how we get the perl modules installed into sitelib echo $(PERLSITELIB)/* >> debian/amanda-backup-server.install echo "---->dh_install -v --fail-missing: " >> $(log) - dh_install -v --sourcedir=debian/amanda-common >> $(log) 2>&1 + dh_install -v --sourcedir=$(r) >> $(log) 2>&1 echo "---->dh_strip: " >> $(log) dh_strip >> $(log) 2>&1 echo "---->dh_compress: " >> $(log) @@ -145,9 +137,10 @@ binary-arch: build chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(LOGDIR) $(server)/$(LOGDIR) #chmod -R u=rwX,g=rwX,o-rwx $(server)/$(LOGDIR) chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(SYSCONFDIR)/amanda $(server)/$(SYSCONFDIR)/amanda - #chmod -R u=rwX,g=rwX,o-rwx $(server)/$(SYSCONFDIR)/amanda - chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(AMHOMEDIR)/gnutar-lists $(server)/$(AMHOMEDIR)/gnutar-lists - chmod -R u=rwX,g=rwX,o-rwx $(client)/$(AMHOMEDIR)/gnutar-lists $(server)/$(AMHOMEDIR)/gnutar-lists + chmod -R u=rwX,g=rwX,o-rwx $(client)/$(SYSCONFDIR)/amanda + chmod -R u=rwX,g=rwX,o-rwx $(server)/$(SYSCONFDIR)/amanda + chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(AMANDAHOMEDIR)/gnutar-lists $(server)/$(AMANDAHOMEDIR)/gnutar-lists + chmod -R u=rwX,g=rwX,o-rwx $(client)/$(AMANDAHOMEDIR)/gnutar-lists $(server)/$(AMANDAHOMEDIR)/gnutar-lists # .. setuid chown root:disk \ $(client)/$(AMLIBEXECDIR)/application/amgtar \ @@ -181,24 +174,16 @@ binary-arch: build $(server)$(AMLIBEXECDIR)/dumper \ $(server)$(AMLIBEXECDIR)/planner \ $(server)/usr/sbin/amcheck - echo "Amanda version $(AMVER)" > $(server)/$(AMHOMEDIR)/amanda-release - echo "Amanda version $(AMVER)" > $(client)/$(AMHOMEDIR)/amanda-release + 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-common.lintian \ - # $(r)/usr/share/lintian/overrides/amanda-common install -o root -g root -m 0644 debian/amanda-backup-server.lintian \ $(server)/usr/share/lintian/overrides/amanda-backup-server dh_makeshlibs >> $(log) 2>&1 - dh_installdeb >> $(log) 2>&1 dh_perl >> $(log) 2>&1 - dh_shlibdeps -l"debian/$(r)/usr/lib:debian/$(client)/usr/lib:debian/$(server)/usr/lib" >> $(log) 2>&1 - # strip out the non-versioned amanda-common references, we need - # the versioned ones in the control file and dupes are ugly... - sed -e 's/amanda-common, //' < debian/amanda-backup-server.substvars > debian/blah - mv debian/blah debian/amanda-backup-server.substvars - sed -e 's/amanda-common, //' < debian/amanda-backup-client.substvars > debian/blah - mv debian/blah debian/amanda-backup-client.substvars + dh_shlibdeps -l"$(r)/usr/lib:$(client)/usr/lib:$(server)/usr/lib" >> $(log) 2>&1 + dh_installdeb >> $(log) 2>&1 dh_gencontrol >> $(log) 2>&1 dh_md5sums >> $(log) 2>&1 dh_builddeb >> $(log) 2>&1