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
16 build-stamp: /sbin/dump /usr/bin/smbclient debian/po/templates.pot
20 MAILER=/usr/bin/mail \
21 ./configure --prefix=/usr --bindir=/usr/sbin --mandir=/usr/share/man \
22 --libexecdir=/usr/lib/amanda --enable-shared\
23 --sysconfdir=/etc --localstatedir=/var/lib \
24 --with-gnutar-listdir=/var/lib/amanda/gnutar-lists \
25 --with-index-server=localhost \
26 --with-user=backup --with-group=backup \
27 --with-bsd-security --with-amandahosts \
28 --with-smbclient=/usr/bin/smbclient \
29 --with-debugging=/var/log/amanda \
30 --with-dumperdir=/usr/lib/amanda/dumper.d \
31 --with-tcpportrange=50000,50100 --with-udpportrange=840,860 \
32 --with-maxtapeblocksize=256 \
34 --with-bsdtcp-security --with-bsdudp-security
36 MAILER=/usr/bin/mail make CFLAGS="-O2 -g -Wall \
37 -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' \
44 [ ! -f Makefile ] || make clean
45 [ ! -f Makefile ] || make distclean
46 -rm -f build-stamp missing config/config.h common-src/genversion
47 -rm -f debian/po/templates.pot
48 -find . -type d -name .deps -exec rm -rf {} \;
50 -test -r /usr/share/misc/config.sub && \
51 cp -f /usr/share/misc/config.sub config/config.sub
52 -test -r /usr/share/misc/config.guess && \
53 cp -f /usr/share/misc/config.guess config/config.guess
58 # Build architecture-independent files here.
61 # Build architecture-dependent files here.
67 make install DESTDIR=$(r)
68 install -m 644 debian/amandahosts $(r)/etc/amandahosts
71 cp ChangeLog $(r)/usr/share/doc/amanda-common/changelog
72 cp debian/xinetd.d/amandaidx $(s)/etc/xinetd.d
73 cp debian/xinetd.d/amidxtape $(s)/etc/xinetd.d
74 cp debian/xinetd.d/amanda $(r)/etc/xinetd.d
77 dh_installchangelogs -a
81 dh_movefiles -a --sourcedir=debian/amanda-common
82 rm $(s)/usr/lib/amanda/chg-mtx
85 chown -R backup:backup debian/*/var/lib/*
86 chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/*
87 chown -R backup:backup $(s)/var/log/amanda
88 chmod -R u=rwX,g=rwX,o-rwx $(s)/var/log/amanda
89 chown -R backup:backup $(s)/etc/amanda
90 chmod -R u=rwX,g=rwX,o-rwx $(s)/etc/amanda
91 chown -R backup:backup $(c)/var/lib/amanda/gnutar-lists
92 chmod -R u=rwX,g=rwX,o-rwx $(c)/var/lib/amanda/gnutar-lists
95 $(c)/usr/lib/amanda/killpgrp \
96 $(c)/usr/lib/amanda/rundump \
97 $(c)/usr/lib/amanda/runtar \
98 $(s)/usr/lib/amanda/dumper \
99 $(s)/usr/lib/amanda/planner \
100 $(s)/usr/sbin/amcheck
101 chmod u=srwx,g=rx,o=r \
102 $(c)/usr/lib/amanda/killpgrp \
103 $(c)/usr/lib/amanda/rundump \
104 $(c)/usr/lib/amanda/runtar \
105 $(s)/usr/lib/amanda/dumper \
106 $(s)/usr/lib/amanda/planner \
107 $(s)/usr/sbin/amcheck
108 install -o root -g root -m 0644 debian/amanda-client.lintian \
109 $(c)/usr/share/lintian/overrides/amanda-client
110 install -o root -g root -m 0644 debian/amanda-common.lintian \
111 $(r)/usr/share/lintian/overrides/amanda-common
112 install -o root -g root -m 0644 debian/amanda-server.lintian \
113 $(s)/usr/share/lintian/overrides/amanda-server
116 dh_shlibdeps -a -l"debian/amanda-common/usr/lib:debian/amanda-client/usr/lib:debian/amanda-server/usr/lib"
117 # strip out the non-versioned amanda-common references, we need
118 # the versioned ones in the control file and dupes are ugly...
119 sed -e 's/amanda-common, //' < debian/amanda-server.substvars > debian/blah
120 mv debian/blah debian/amanda-server.substvars
121 sed -e 's/amanda-common, //' < debian/amanda-client.substvars > debian/blah
122 mv debian/blah debian/amanda-client.substvars
128 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
130 debian/po/templates.pot: debian/templates
133 binary: binary-indep binary-arch
134 .PHONY: build clean binary-indep binary-arch binary