Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
backup
>
amanda-enterprise
> debian.rules
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File debian.rules of Package amanda-enterprise
#!/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.3 # These are variables that the user can override. They get used in various # places during configure, build, and install. PREFIX=/usr BINDIR=$(PREFIX)/bin LIBDIR=$(PREFIX)/lib AMLIBDIR=$(LIBDIR)/amanda LIBEXECDIR=$(PREFIX)/libexec AMLIBEXECDIR=$(LIBEXECDIR)/amanda MANDIR=$(PREFIX)/share/man DOCDIR=$(PREFIX)/share/doc SYSCONFDIR=/etc LOCALSTATEDIR=/var AMHOMEDIR=$(LOCALSTATEDIR)/lib/amanda LOGDIR=$(LOCALSTATEDIR)/log/amanda AMANDAUSER=amandabackup AMANDAGROUP=disk WITHOUT_SERVER="False" WITHOUT_CLIENT="False" r=$(shell pwd)/debian/amanda-common server=$(shell pwd)/debian/amanda-backup-server client=$(shell pwd)/debian/amanda-backup-client log=$(shell pwd)/debian/dpkg.log # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) build: build-stamp build-stamp: /sbin/dump /usr/bin/smbclient dh_testdir ./configure \ MAKEFLAGS="-j1 " \ CFLAGS="-DIGNORE_TAR_ERRORS " \ MAILER=/usr/bin/mail \ --quiet \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=$(PREFIX) \ --bindir=$(BINDIR) \ --mandir=$(MANDIR) \ --libexecdir=$(LIBEXECDIR) \ --enable-shared \ --sysconfdir=$(SYSCONFDIR) \ --localstatedir=$(LOCALSTATEDIR)\ --with-star=/bin/star \ --with-gnutar=/bin/tar \ --with-gnutar-listdir=$(AMHOMEDIR)/gnutar-lists \ --with-index-server=localhost \ --with-tape-server=localhost \ --with-user=$(AMANDAUSER) \ --with-group=$(AMANDAGROUP) \ --with-fqdn \ --with-bsd-security \ --with-bsdtcp-security \ --with-bsdudp-security \ --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 \ --disable-s3-device \ --without-devpay \ --disable-installperms touch missing make touch build-stamp clean: dh_testdir >> $(log) 2>&1 dh_testroot >> $(log) 2>&1 -make clean -make 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 && \ 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 >> $(log) 2>&1 # Build architecture-dependent files here. binary-arch: build echo "---->dh_testdir: " >> $(log) dh_testdir >> $(log) 2>&1 echo "---->dh_testroot: " >> $(log) dh_testroot >> $(log) 2>&1 echo "---->dh_clean: " >> $(log) dh_clean -k >> $(log) 2>&1 echo "---->dh_installdirs: " >> $(log) dh_installdirs -v >> $(log) 2>&1 make 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 echo `pwd` >> $(log) echo "---->dh_install -v: " >> $(log) dh_install -v --sourcedir=debian/amanda-common >> $(log) 2>&1 echo "---->dh_strip: " >> $(log) dh_strip >> $(log) 2>&1 echo "---->dh_compress: " >> $(log) dh_compress >> $(log) 2>&1 echo "---->dh_movefiles: " >> $(log) dh_movefiles --sourcedir=debian/amanda-common >> $(log) 2>&1 echo "---->dh_fixperms: " >> $(log) dh_fixperms -v >> $(log) 2>&1 # fix perms manually chown -R $(AMANDAUSER):$(AMANDAGROUP) debian/*/var/lib/* #chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/* chown -R $(AMANDAUSER):$(AMANDAGROUP) $(server)/$(LOGDIR) #chmod -R u=rwX,g=rwX,o-rwx $(server)/$(LOGDIR) chown -R $(AMANDAUSER):$(AMANDAGROUP) $(server)/$(SYSCONFDIR)/amanda #chmod -R u=rwX,g=rwX,o-rwx $(server)/$(SYSCONFDIR)/amanda chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(AMHOMEDIR)/gnutar-lists chmod -R u=rwX,g=rwX,o-rwx $(client)/$(AMHOMEDIR)/gnutar-lists # .. setuid chown root:disk \ $(client)/$(AMLIBEXECDIR)/killpgrp \ $(client)/$(AMLIBEXECDIR)/rundump \ $(client)/$(AMLIBEXECDIR)/runtar \ $(client)/$(AMLIBEXECDIR)/calcsize \ $(server)/$(AMLIBEXECDIR)/killpgrp \ $(server)/$(AMLIBEXECDIR)/rundump \ $(server)/$(AMLIBEXECDIR)/runtar \ $(server)/$(AMLIBEXECDIR)/calcsize \ $(server)/$(AMLIBEXECDIR)/dumper \ $(server)/$(AMLIBEXECDIR)/planner \ $(server)/usr/sbin/amcheck chmod u=srwx,g=rx,o=r \ $(client)$(AMLIBEXECDIR)/killpgrp \ $(client)$(AMLIBEXECDIR)/rundump \ $(client)$(AMLIBEXECDIR)/runtar \ $(client)$(AMLIBEXECDIR)/calcsize \ $(server)$(AMLIBEXECDIR)/killpgrp \ $(server)$(AMLIBEXECDIR)/rundump \ $(server)$(AMLIBEXECDIR)/runtar \ $(server)$(AMLIBEXECDIR)/calcsize \ $(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 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_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_gencontrol >> $(log) 2>&1 dh_md5sums >> $(log) 2>&1 dh_builddeb >> $(log) 2>&1 source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-arch .PHONY: build clean binary-arch binary