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 MAILER=/usr/bin/mail \
24 ./configure --prefix=/usr --bindir=/usr/sbin --mandir=/usr/share/man \
25 --libexecdir=/usr/lib/amanda --enable-shared\
26 --sysconfdir=/etc --localstatedir=/var/lib \
27 --with-gnutar-listdir=/var/lib/amanda/gnutar-lists \
28 --with-index-server=localhost \
29 --with-user=backup --with-group=backup \
30 --with-bsd-security --with-amandahosts \
31 --with-smbclient=/usr/bin/smbclient \
32 --with-tcpportrange=50000,50100 --with-udpportrange=840,860
34 make CFLAGS="-O2 -g -Wall \
35 -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' \
44 -rm -f build-stamp missing config/config.h common-src/genversion
45 -find . -type d -name .deps -exec rm -rf {} \;
47 -test -r /usr/share/misc/config.sub && \
48 cp -f /usr/share/misc/config.sub config/config.sub
49 -test -r /usr/share/misc/config.guess && \
50 cp -f /usr/share/misc/config.guess config/config.guess
54 # Build architecture-independent files here.
57 # Build architecture-dependent files here.
63 make install prefix=$(r)/usr bindir=$(r)/usr/sbin \
64 libexecdir=$(r)/usr/lib/amanda mandir=$(r)/usr/share/man
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-server.lintian \
110 $(server)/usr/share/lintian/overrides/amanda-server
113 dh_shlibdeps -a -l"debian/amanda-common/usr/lib:debian/amanda-client/usr/lib:debian/amanda-server/usr/lib"
114 # strip out the non-versioned amanda-common references, we need
115 # the versioned ones in the control file and dupes are ugly...
116 sed -e 's/amanda-common, //' < debian/amanda-server.substvars > debian/blah
117 mv debian/blah debian/amanda-server.substvars
118 sed -e 's/amanda-common, //' < debian/amanda-client.substvars > debian/blah
119 mv debian/blah debian/amanda-client.substvars
125 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
127 debian/po/templates.pot: debian/templates
130 binary: binary-indep binary-arch
131 .PHONY: build clean binary-indep binary-arch binary