2 # debian/rules for amanda using debhelper. GNU copyright 1998 by Bdale Garbee.
3 # requires automake 1.2d (from experimental tree)
5 # Warning - do *not* use -j on an SMP machine, or the build gets
6 # confused... some sort of race condition in the makefiles?
8 # Uncomment this to turn on verbose mode.
11 r=$(shell pwd)/debian/amanda-common
12 s=$(shell pwd)/debian/amanda-server
13 c=$(shell pwd)/debian/amanda-client
15 configure: configure-stamp
18 # pick up latest config files provided by autotools-dev
19 cp -f /usr/share/misc/config.sub config/config.sub
20 cp -f /usr/share/misc/config.guess config/config.guess
23 MAILER=/usr/bin/mail \
24 ./configure --prefix=/usr --bindir=/usr/sbin --mandir=/usr/share/man \
25 --with-amlibexecdir=/usr/lib/amanda --enable-shared \
26 --sysconfdir=/etc --localstatedir=/var/lib \
27 --with-gnutar-listdir=/var/lib/amanda/gnutar-lists \
28 --with-index-server=localhost \
29 --with-user=backup --with-group=backup \
30 --with-bsd-security --with-amandahosts \
31 --with-smbclient=/usr/bin/smbclient \
32 --with-debugging=/var/log/amanda \
33 --with-dumperdir=/usr/lib/amanda/dumper.d \
34 --with-tcpportrange=50000,50100 --with-udpportrange=840,860 \
35 --with-maxtapeblocksize=256 \
37 --with-bsdtcp-security --with-bsdudp-security
42 build-stamp: configure-stamp
44 MAILER=/usr/bin/mail make CFLAGS="-O2 -g -Wall \
45 -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' \
52 [ ! -f Makefile ] || make clean
53 [ ! -f Makefile ] || make distclean
54 -rm -f build-stamp configure-stamp missing config/config.h common-src/genversion
55 -find . -type d -name .deps -exec rm -rf {} \;
58 # call this before packaging for upload when updating template English text
60 -rm -f debian/po/templates.pot
70 make install DESTDIR=$(r)
71 install -m 644 debian/amandahosts $(r)/etc/amandahosts
74 cp ChangeLog $(r)/usr/share/doc/amanda-common/changelog
75 cp debian/xinetd.d/amandaidx $(s)/etc/xinetd.d
76 cp debian/xinetd.d/amidxtape $(s)/etc/xinetd.d
77 cp debian/xinetd.d/amanda $(r)/etc/xinetd.d
80 dh_installchangelogs -a
84 dh_movefiles -a --sourcedir=debian/amanda-common
85 rm $(s)/usr/lib/amanda/chg-mtx
88 chown -R backup:backup debian/*/var/lib/*
89 chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/*
90 chown -R backup:backup $(s)/var/log/amanda
91 chmod -R u=rwX,g=rwX,o-rwx $(s)/var/log/amanda
92 chown -R backup:backup $(s)/etc/amanda
93 chmod -R u=rwX,g=rwX,o-rwx $(s)/etc/amanda
94 chown -R backup:backup $(c)/var/lib/amanda/gnutar-lists
95 chmod -R u=rwX,g=rwX,o-rwx $(c)/var/lib/amanda/gnutar-lists
98 $(c)/usr/lib/amanda/killpgrp \
99 $(c)/usr/lib/amanda/rundump \
100 $(c)/usr/lib/amanda/runtar \
101 $(s)/usr/lib/amanda/dumper \
102 $(s)/usr/lib/amanda/planner \
103 $(s)/usr/sbin/amcheck
104 chmod u=srwx,g=rx,o=r \
105 $(c)/usr/lib/amanda/killpgrp \
106 $(c)/usr/lib/amanda/rundump \
107 $(c)/usr/lib/amanda/runtar \
108 $(s)/usr/lib/amanda/dumper \
109 $(s)/usr/lib/amanda/planner \
110 $(s)/usr/sbin/amcheck
111 install -o root -g root -m 0644 debian/amanda-client.lintian \
112 $(c)/usr/share/lintian/overrides/amanda-client
113 install -o root -g root -m 0644 debian/amanda-common.lintian \
114 $(r)/usr/share/lintian/overrides/amanda-common
115 install -o root -g root -m 0644 debian/amanda-server.lintian \
116 $(s)/usr/share/lintian/overrides/amanda-server
119 dh_shlibdeps -a -l"debian/amanda-common/usr/lib:debian/amanda-client/usr/lib:debian/amanda-server/usr/lib"
120 # strip out the non-versioned amanda-common references, we need
121 # the versioned ones in the control file and dupes are ugly...
122 sed -e 's/amanda-common, //' < debian/amanda-server.substvars > debian/blah
123 mv debian/blah debian/amanda-server.substvars
124 sed -e 's/amanda-common, //' < debian/amanda-client.substvars > debian/blah
125 mv debian/blah debian/amanda-client.substvars
131 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
133 binary: binary-indep binary-arch
134 .PHONY: build clean binary-indep binary-arch binary