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
55 # Build architecture-independent files here.
58 # Build architecture-dependent files here.
64 make install DESTDIR=$(r)
65 install -m 644 debian/amanda.conf.in \
66 $(server)/etc/amanda/DailySet1/amanda.conf
67 install -m 644 debian/disklist $(server)/etc/amanda/DailySet1/disklist
68 install -m 644 debian/crontab.amanda $(server)/etc/amanda
69 install -m 644 debian/amandahosts $(r)/etc/amandahosts
71 install -d $(r)/usr/share/doc/amanda-common/examples
72 cp -a example/* $(r)/usr/share/doc/amanda-common/examples
73 cp ChangeLog $(r)/usr/share/doc/amanda-common/changelog
76 dh_installchangelogs -a
80 dh_movefiles -a --sourcedir=debian/amanda-common
81 rm $(server)/usr/lib/amanda/chg-mtx
84 chown -R backup:backup debian/*/var/lib/*
85 chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/*
86 chown -R backup:backup $(server)/var/log/amanda
87 chmod -R u=rwX,g=rwX,o-rwx $(server)/var/log/amanda
88 chown -R backup:backup $(server)/etc/amanda
89 chmod -R u=rwX,g=rwX,o-rwx $(server)/etc/amanda
90 chown -R backup:backup $(client)/var/lib/amanda/gnutar-lists
91 chmod -R u=rwX,g=rwX,o-rwx $(client)/var/lib/amanda/gnutar-lists
94 $(client)/usr/lib/amanda/killpgrp \
95 $(client)/usr/lib/amanda/rundump \
96 $(client)/usr/lib/amanda/runtar \
97 $(server)/usr/lib/amanda/dumper \
98 $(server)/usr/lib/amanda/planner \
99 $(server)/usr/sbin/amcheck
100 chmod u=srwx,g=rx,o=r \
101 $(client)/usr/lib/amanda/killpgrp \
102 $(client)/usr/lib/amanda/rundump \
103 $(client)/usr/lib/amanda/runtar \
104 $(server)/usr/lib/amanda/dumper \
105 $(server)/usr/lib/amanda/planner \
106 $(server)/usr/sbin/amcheck
107 install -o root -g root -m 0644 debian/amanda-client.lintian \
108 $(client)/usr/share/lintian/overrides/amanda-client
109 install -o root -g root -m 0644 debian/amanda-common.lintian \
110 $(common)/usr/share/lintian/overrides/amanda-common
111 install -o root -g root -m 0644 debian/amanda-server.lintian \
112 $(server)/usr/share/lintian/overrides/amanda-server
115 dh_shlibdeps -a -l"debian/amanda-common/usr/lib:debian/amanda-client/usr/lib:debian/amanda-server/usr/lib"
116 # strip out the non-versioned amanda-common references, we need
117 # the versioned ones in the control file and dupes are ugly...
118 sed -e 's/amanda-common, //' < debian/amanda-server.substvars > debian/blah
119 mv debian/blah debian/amanda-server.substvars
120 sed -e 's/amanda-common, //' < debian/amanda-client.substvars > debian/blah
121 mv debian/blah debian/amanda-client.substvars
127 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
129 debian/po/templates.pot: debian/templates
132 binary: binary-indep binary-arch
133 .PHONY: build clean binary-indep binary-arch binary