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 # This is the debhelper compatability version to use.
14 r=$(shell pwd)/debian/amanda-common
15 server=$(shell pwd)/debian/amanda-server
16 client=$(shell pwd)/debian/amanda-client
19 build-stamp: /sbin/dump /usr/bin/smbclient debian/po/templates.pot
23 ./configure --prefix=/usr --bindir=/usr/sbin --mandir=/usr/share/man \
24 --libexecdir=/usr/lib/amanda --enable-shared\
25 --sysconfdir=/etc --localstatedir=/var/lib \
26 --with-gnutar-listdir=/var/lib/amanda/gnutar-lists \
27 --with-index-server=localhost \
28 --with-user=backup --with-group=backup \
29 --with-bsd-security --with-amandahosts \
30 --with-smbclient=/usr/bin/smbclient \
31 --with-tcpportrange=50000,50100 --with-udpportrange=840,860
33 make CFLAGS="-O2 -g -Wall \
34 -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' \
43 -rm -f build-stamp missing config/config.h common-src/genversion
44 -find . -type d -name .deps -exec rm -rf {} \;
46 -test -r /usr/share/misc/config.sub && \
47 cp -f /usr/share/misc/config.sub config/config.sub
48 -test -r /usr/share/misc/config.guess && \
49 cp -f /usr/share/misc/config.guess config/config.guess
53 # Build architecture-independent files here.
56 # Build architecture-dependent files here.
62 make install prefix=$(r)/usr bindir=$(r)/usr/sbin \
63 libexecdir=$(r)/usr/lib/amanda mandir=$(r)/usr/share/man
64 install -m 644 debian/amanda.conf.in \
65 $(server)/etc/amanda/DailySet1/amanda.conf
66 install -m 644 debian/disklist $(server)/etc/amanda/DailySet1/disklist
67 install -m 644 debian/crontab.amanda $(server)/etc/amanda
68 install -m 644 debian/amandahosts $(r)/etc/amandahosts
70 install -d $(r)/usr/share/doc/amanda-common/examples
71 cp -a example/* $(r)/usr/share/doc/amanda-common/examples
72 cp ChangeLog $(r)/usr/share/doc/amanda-common/changelog
75 dh_installchangelogs -a
79 dh_movefiles -a --sourcedir=debian/amanda-common
80 rm $(server)/usr/lib/amanda/chg-mtx
83 chown -R backup:backup debian/*/var/lib/*
84 chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/*
85 chown -R backup:backup $(server)/var/log/amanda
86 chmod -R u=rwX,g=rwX,o-rwx $(server)/var/log/amanda
87 chown -R backup:backup $(server)/etc/amanda
88 chmod -R u=rwX,g=rwX,o-rwx $(server)/etc/amanda
89 chown -R backup:backup $(client)/var/lib/amanda/gnutar-lists
90 chmod -R u=rwX,g=rwX,o-rwx $(client)/var/lib/amanda/gnutar-lists
93 $(client)/usr/lib/amanda/killpgrp \
94 $(client)/usr/lib/amanda/rundump \
95 $(client)/usr/lib/amanda/runtar \
96 $(server)/usr/lib/amanda/dumper \
97 $(server)/usr/lib/amanda/planner \
98 $(server)/usr/sbin/amcheck
99 chmod u=srwx,g=rx,o=r \
100 $(client)/usr/lib/amanda/killpgrp \
101 $(client)/usr/lib/amanda/rundump \
102 $(client)/usr/lib/amanda/runtar \
103 $(server)/usr/lib/amanda/dumper \
104 $(server)/usr/lib/amanda/planner \
105 $(server)/usr/sbin/amcheck
106 install -o root -g root -m 0644 debian/amanda-client.lintian \
107 $(client)/usr/share/lintian/overrides/amanda-client
108 install -o root -g root -m 0644 debian/amanda-server.lintian \
109 $(server)/usr/share/lintian/overrides/amanda-server
112 dh_shlibdeps -a -l"debian/amanda-common/usr/lib:debian/amanda-client/usr/lib:debian/amanda-server/usr/lib"
113 # strip out the non-versioned amanda-common references, we need
114 # the versioned ones in the control file and dupes are ugly...
115 sed -e 's/amanda-common, //' < debian/amanda-server.substvars > debian/blah
116 mv debian/blah debian/amanda-server.substvars
117 sed -e 's/amanda-common, //' < debian/amanda-client.substvars > debian/blah
118 mv debian/blah debian/amanda-client.substvars
124 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
126 debian/po/templates.pot: debian/templates
129 binary: binary-indep binary-arch
130 .PHONY: build clean binary-indep binary-arch binary