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
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-tcpportrange=50000,50100 --with-udpportrange=840,860
32 make CFLAGS="-O2 -g -Wall \
33 -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' \
42 -rm -f build-stamp missing config/config.h common-src/genversion
43 -find . -type d -name .deps -exec rm -rf {} \;
45 -test -r /usr/share/misc/config.sub && \
46 cp -f /usr/share/misc/config.sub config/config.sub
47 -test -r /usr/share/misc/config.guess && \
48 cp -f /usr/share/misc/config.guess config/config.guess
52 # Build architecture-independent files here.
55 # Build architecture-dependent files here.
61 make install prefix=$(r)/usr bindir=$(r)/usr/sbin \
62 libexecdir=$(r)/usr/lib/amanda mandir=$(r)/usr/share/man
63 install -m 644 debian/amanda.conf.in \
64 $(server)/etc/amanda/DailySet1/amanda.conf
65 install -m 644 debian/disklist $(server)/etc/amanda/DailySet1/disklist
66 install -m 644 debian/crontab.amanda $(server)/etc/amanda
67 install -m 644 debian/amandahosts $(r)/etc/amandahosts
69 install -d $(r)/usr/share/doc/amanda-common/examples
70 cp -a example/* $(r)/usr/share/doc/amanda-common/examples
71 cp ChangeLog $(r)/usr/share/doc/amanda-common/changelog
74 dh_installchangelogs -a
78 dh_movefiles -a --sourcedir=debian/amanda-common
79 rm $(server)/usr/lib/amanda/chg-mtx
82 chown -R backup:backup debian/*/var/lib/*
83 chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/*
84 chown -R backup:backup $(server)/var/log/amanda
85 chmod -R u=rwX,g=rwX,o-rwx $(server)/var/log/amanda
86 chown -R backup:backup $(server)/etc/amanda
87 chmod -R u=rwX,g=rwX,o-rwx $(server)/etc/amanda
88 chown -R backup:backup $(client)/var/lib/amanda/gnutar-lists
89 chmod -R u=rwX,g=rwX,o-rwx $(client)/var/lib/amanda/gnutar-lists
92 $(client)/usr/lib/amanda/killpgrp \
93 $(client)/usr/lib/amanda/rundump \
94 $(client)/usr/lib/amanda/runtar \
95 $(server)/usr/lib/amanda/dumper \
96 $(server)/usr/lib/amanda/planner \
97 $(server)/usr/sbin/amcheck
98 chmod u=srwx,g=rx,o=r \
99 $(client)/usr/lib/amanda/killpgrp \
100 $(client)/usr/lib/amanda/rundump \
101 $(client)/usr/lib/amanda/runtar \
102 $(server)/usr/lib/amanda/dumper \
103 $(server)/usr/lib/amanda/planner \
104 $(server)/usr/sbin/amcheck
105 install -o root -g root -m 0644 debian/amanda-client.lintian \
106 $(client)/usr/share/lintian/overrides/amanda-client
107 install -o root -g root -m 0644 debian/amanda-server.lintian \
108 $(server)/usr/share/lintian/overrides/amanda-server
111 dh_shlibdeps -a -l"debian/amanda-common/usr/lib:debian/amanda-client/usr/lib:debian/amanda-server/usr/lib"
112 # strip out the non-versioned amanda-common references, we need
113 # the versioned ones in the control file and dupes are ugly...
114 sed -e 's/amanda-common, //' < debian/amanda-server.substvars > debian/blah
115 mv debian/blah debian/amanda-server.substvars
116 sed -e 's/amanda-common, //' < debian/amanda-client.substvars > debian/blah
117 mv debian/blah debian/amanda-client.substvars
123 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
125 debian/po/templates.pot: debian/templates
128 binary: binary-indep binary-arch
129 .PHONY: build clean binary-indep binary-arch binary