2 # Copyright 1998-2011 by Bdale Garbee. License GPL v2
6 r=$(shell pwd)/debian/amanda-common
7 s=$(shell pwd)/debian/amanda-server
8 c=$(shell pwd)/debian/amanda-client
10 configure: configure-stamp
13 # pick up latest config files provided by autotools-dev
14 cp -f /usr/share/misc/config.sub config/config.sub
15 cp -f /usr/share/misc/config.guess config/config.guess
16 # do we need --{htmldir,dvidir,pdfdir,psdir} to force subdirectories?
17 # should we re-craft this to use --without-server and --without-client,
18 # and lose the amanda-common package?
19 MAILER=/usr/bin/mail \
24 --libexecdir=/usr/lib/amanda \
25 --without-amlibexecdir \
28 --sharedstatedir=/var/lib \
29 --localstatedir=/var/lib \
32 --with-tcpportrange=50000,50100 \
33 --with-udpportrange=840,860 \
34 --with-debugging=/var/log/amanda \
35 --with-gnutar-listdir=/var/lib/amanda/gnutar-lists \
36 --with-index-server=localhost \
38 --with-smbclient=/usr/bin/smbclient \
41 --with-bsdtcp-security \
42 --with-bsdudp-security \
49 build: build-arch build-indep
50 build-arch: build-stamp
51 build-indep: build-stamp
52 build-stamp: configure-stamp
54 MAILER=/usr/bin/mail $(MAKE) CFLAGS="-O2 -g -Wall \
55 -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' \
62 [ ! -f Makefile ] || make clean
63 [ ! -f Makefile ] || make distclean
64 -rm -f build-stamp configure-stamp missing config/config.h common-src/genversion
65 -find . -type d -name .deps -exec rm -rf {} \;
68 # call this before packaging for upload when updating template English text
70 -rm -f debian/po/templates.pot
80 make install DESTDIR=$(r)
81 sed -i "/dependency_libs/ s/'.*'/''/" `find $(r)/usr/lib/amanda/ -name '*.la'`
82 install -m 644 debian/amandahosts $(r)/etc/amandahosts
85 cp ChangeLog $(r)/usr/share/doc/amanda-common/changelog
86 cp example/xinetd.amandaserver $(r)/etc/xinetd.d/amanda
89 dh_installchangelogs -a
93 dh_movefiles -a --sourcedir=debian/amanda-common
94 rm -r $(r)/usr/share/amanda
97 chown -R backup:backup debian/*/var/lib/*
98 chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/*
99 chown -R backup:backup $(s)/var/log/amanda
100 chmod -R u=rwX,g=rwX,o-rwx $(s)/var/log/amanda
101 chown -R backup:backup $(s)/etc/amanda
102 chmod -R u=rwX,g=rwX,o-rwx $(s)/etc/amanda
103 chown -R backup:backup $(c)/var/lib/amanda/gnutar-lists
104 chmod -R u=rwX,g=rwX,o-rwx $(c)/var/lib/amanda/gnutar-lists
107 $(c)/usr/lib/amanda/application/amgtar \
108 $(c)/usr/lib/amanda/application/amstar \
109 $(c)/usr/lib/amanda/calcsize \
110 $(c)/usr/lib/amanda/killpgrp \
111 $(c)/usr/lib/amanda/rundump \
112 $(c)/usr/lib/amanda/runtar \
113 $(s)/usr/lib/amanda/dumper \
114 $(s)/usr/lib/amanda/planner \
115 $(s)/usr/sbin/amcheck
116 chmod u=srwx,g=rx,o=r \
117 $(c)/usr/lib/amanda/application/amgtar \
118 $(c)/usr/lib/amanda/application/amstar \
119 $(c)/usr/lib/amanda/calcsize \
120 $(c)/usr/lib/amanda/killpgrp \
121 $(c)/usr/lib/amanda/rundump \
122 $(c)/usr/lib/amanda/runtar \
123 $(s)/usr/lib/amanda/dumper \
124 $(s)/usr/lib/amanda/planner \
125 $(s)/usr/sbin/amcheck
126 install -o root -g root -m 0644 debian/amanda-client.lintian \
127 $(c)/usr/share/lintian/overrides/amanda-client
128 install -o root -g root -m 0644 debian/amanda-common.lintian \
129 $(r)/usr/share/lintian/overrides/amanda-common
130 install -o root -g root -m 0644 debian/amanda-server.lintian \
131 $(s)/usr/share/lintian/overrides/amanda-server
132 dh_makeshlibs -pamanda-common --noscripts
134 dh_perl -a usr/lib/amanda/perl
135 dh_shlibdeps -a -l"debian/amanda-common/usr/lib:debian/amanda-client/usr/lib:debian/amanda-server/usr/lib"
136 # strip out the non-versioned amanda-common references, we need
137 # the versioned ones in the control file and dupes are ugly...
138 sed -e 's/amanda-common, //' < debian/amanda-server.substvars > debian/blah
139 mv debian/blah debian/amanda-server.substvars
140 sed -e 's/amanda-common, //' < debian/amanda-client.substvars > debian/blah
141 mv debian/blah debian/amanda-client.substvars
147 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
149 binary: binary-indep binary-arch
150 .PHONY: configure build-indep build-arch build clean binary-indep binary-arch binary