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 server=$(shell pwd)/debian/amanda-server
13 client=$(shell pwd)/debian/amanda-client
14 common=$(shell pwd)/debian/amanda-common
17 build-stamp: /sbin/dump /usr/bin/smbclient debian/po/templates.pot
21 MAILER=/usr/bin/mail \
22 ./configure --prefix=/usr --bindir=/usr/sbin --mandir=/usr/share/man \
23 --libexecdir=/usr/lib/amanda --enable-shared\
24 --sysconfdir=/etc --localstatedir=/var/lib \
25 --with-gnutar-listdir=/var/lib/amanda/gnutar-lists \
26 --with-index-server=localhost \
27 --with-user=backup --with-group=backup \
28 --with-bsd-security --with-amandahosts \
29 --with-smbclient=/usr/bin/smbclient \
30 --with-debugging=/var/log/amanda \
31 --with-dumperdir=/usr/lib/amanda/dumper.d \
32 --with-tcpportrange=50000,50100 --with-udpportrange=840,860 \
33 --with-maxtapeblocksize=256
35 make CFLAGS="-O2 -g -Wall \
36 -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' \
45 -rm -f build-stamp missing config/config.h common-src/genversion
46 -find . -type d -name .deps -exec rm -rf {} \;
48 -test -r /usr/share/misc/config.sub && \
49 cp -f /usr/share/misc/config.sub config/config.sub
50 -test -r /usr/share/misc/config.guess && \
51 cp -f /usr/share/misc/config.guess config/config.guess
56 # Build architecture-independent files here.
59 # Build architecture-dependent files here.
65 make install DESTDIR=$(r)
66 install -m 644 debian/amanda.conf.in \
67 $(server)/etc/amanda/DailySet1/amanda.conf
68 install -m 644 debian/disklist $(server)/etc/amanda/DailySet1/disklist
69 install -m 644 debian/crontab.amanda $(server)/etc/amanda
70 install -m 644 debian/amandahosts $(r)/etc/amandahosts
72 install -d $(r)/usr/share/doc/amanda-common/examples
73 cp -a example/* $(r)/usr/share/doc/amanda-common/examples
74 cp ChangeLog $(r)/usr/share/doc/amanda-common/changelog
77 dh_installchangelogs -a
81 dh_movefiles -a --sourcedir=debian/amanda-common
82 rm $(server)/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 $(server)/var/log/amanda
88 chmod -R u=rwX,g=rwX,o-rwx $(server)/var/log/amanda
89 chown -R backup:backup $(server)/etc/amanda
90 chmod -R u=rwX,g=rwX,o-rwx $(server)/etc/amanda
91 chown -R backup:backup $(client)/var/lib/amanda/gnutar-lists
92 chmod -R u=rwX,g=rwX,o-rwx $(client)/var/lib/amanda/gnutar-lists
95 $(client)/usr/lib/amanda/killpgrp \
96 $(client)/usr/lib/amanda/rundump \
97 $(client)/usr/lib/amanda/runtar \
98 $(server)/usr/lib/amanda/dumper \
99 $(server)/usr/lib/amanda/planner \
100 $(server)/usr/sbin/amcheck
101 chmod u=srwx,g=rx,o=r \
102 $(client)/usr/lib/amanda/killpgrp \
103 $(client)/usr/lib/amanda/rundump \
104 $(client)/usr/lib/amanda/runtar \
105 $(server)/usr/lib/amanda/dumper \
106 $(server)/usr/lib/amanda/planner \
107 $(server)/usr/sbin/amcheck
108 install -o root -g root -m 0644 debian/amanda-client.lintian \
109 $(client)/usr/share/lintian/overrides/amanda-client
110 install -o root -g root -m 0644 debian/amanda-common.lintian \
111 $(common)/usr/share/lintian/overrides/amanda-common
112 install -o root -g root -m 0644 debian/amanda-server.lintian \
113 $(server)/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