try using --without-ipv6
[debian/amanda] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for amanda using debhelper. GNU copyright 1998 by Bdale Garbee.
3 # requires automake 1.2d (from experimental tree)
4
5 #       Warning - do *not* use -j on an SMP machine, or the build gets
6 #               confused... some sort of race condition in the makefiles?
7
8 # Uncomment this to turn on verbose mode.
9 #export DH_VERBOSE=1
10
11 r=$(shell pwd)/debian/amanda-common
12 s=$(shell pwd)/debian/amanda-server
13 c=$(shell pwd)/debian/amanda-client
14
15 build: build-stamp 
16 build-stamp: /sbin/dump /usr/bin/smbclient debian/po/templates.pot
17         dh_testdir
18 #       automake --foreign
19 #       autoconf -l config
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-dumperdir=/usr/lib/amanda/dumper.d \
31                 --with-tcpportrange=50000,50100 --with-udpportrange=840,860 \
32                 --with-maxtapeblocksize=256 \
33                 --with-ssh-security \
34                 --with-bsdtcp-security --with-bsdudp-security \
35                 --without-ipv6
36         touch missing
37         MAILER=/usr/bin/mail make CFLAGS="-O2 -g -Wall \
38                 -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' \
39                 -DIGNORE_TAR_ERRORS "
40         touch build-stamp
41
42 clean:
43         dh_testdir
44         dh_testroot
45         [ ! -f Makefile ] || make clean
46         [ ! -f Makefile ] || make distclean
47         -rm -f build-stamp missing config/config.h common-src/genversion
48         -find . -type d -name .deps -exec rm -rf {} \;
49
50         -test -r /usr/share/misc/config.sub && \
51                 cp -f /usr/share/misc/config.sub config/config.sub
52         -test -r /usr/share/misc/config.guess && \
53                 cp -f /usr/share/misc/config.guess config/config.guess
54
55         dh_clean
56
57 # call this before packaging for upload when updating template English text
58 updatepo:
59         -rm -f debian/po/templates.pot
60         debconf-updatepo
61         
62 # Build architecture-independent files here.
63 binary-indep: build
64
65 # Build architecture-dependent files here.
66 binary-arch: build
67         dh_testdir
68         dh_testroot
69         dh_clean -k
70         dh_installdirs -a
71         make install DESTDIR=$(r)
72         install -m 644 debian/amandahosts $(r)/etc/amandahosts
73         dh_installdocs -a
74         dh_installexamples -a
75         cp ChangeLog $(r)/usr/share/doc/amanda-common/changelog
76         cp debian/xinetd.d/amandaidx $(s)/etc/xinetd.d
77         cp debian/xinetd.d/amidxtape $(s)/etc/xinetd.d
78         cp debian/xinetd.d/amanda $(r)/etc/xinetd.d                     
79         dh_installmenu -a
80         dh_installcron -a
81         dh_installchangelogs -a
82         dh_installdebconf -a
83         dh_strip -a
84         dh_compress -a
85         dh_movefiles -a --sourcedir=debian/amanda-common
86         rm $(s)/usr/lib/amanda/chg-mtx
87         dh_fixperms -av
88         # fix perms manually
89         chown -R backup:backup debian/*/var/lib/*
90         chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/*
91         chown -R backup:backup $(s)/var/log/amanda
92         chmod -R u=rwX,g=rwX,o-rwx $(s)/var/log/amanda
93         chown -R backup:backup $(s)/etc/amanda
94         chmod -R u=rwX,g=rwX,o-rwx $(s)/etc/amanda
95         chown -R backup:backup $(c)/var/lib/amanda/gnutar-lists
96         chmod -R u=rwX,g=rwX,o-rwx $(c)/var/lib/amanda/gnutar-lists
97         # .. setuid
98         chown root:backup \
99                 $(c)/usr/lib/amanda/killpgrp \
100                 $(c)/usr/lib/amanda/rundump \
101                 $(c)/usr/lib/amanda/runtar \
102                 $(s)/usr/lib/amanda/dumper \
103                 $(s)/usr/lib/amanda/planner \
104                 $(s)/usr/sbin/amcheck
105         chmod u=srwx,g=rx,o=r \
106                 $(c)/usr/lib/amanda/killpgrp \
107                 $(c)/usr/lib/amanda/rundump \
108                 $(c)/usr/lib/amanda/runtar \
109                 $(s)/usr/lib/amanda/dumper \
110                 $(s)/usr/lib/amanda/planner \
111                 $(s)/usr/sbin/amcheck
112         install -o root -g root -m 0644 debian/amanda-client.lintian \
113                 $(c)/usr/share/lintian/overrides/amanda-client
114         install -o root -g root -m 0644 debian/amanda-common.lintian \
115                 $(r)/usr/share/lintian/overrides/amanda-common
116         install -o root -g root -m 0644 debian/amanda-server.lintian \
117                 $(s)/usr/share/lintian/overrides/amanda-server
118         dh_makeshlibs -a
119         dh_installdeb -a
120         dh_shlibdeps -a -l"debian/amanda-common/usr/lib:debian/amanda-client/usr/lib:debian/amanda-server/usr/lib"
121         # strip out the non-versioned amanda-common references, we need
122         # the versioned ones in the control file and dupes are ugly...
123         sed -e 's/amanda-common, //' < debian/amanda-server.substvars > debian/blah
124         mv debian/blah debian/amanda-server.substvars
125         sed -e 's/amanda-common, //' < debian/amanda-client.substvars > debian/blah
126         mv debian/blah debian/amanda-client.substvars
127         dh_gencontrol -a
128         dh_md5sums -a
129         dh_builddeb -a
130
131 source diff:                                                                  
132         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
133
134 debian/po/templates.pot:        debian/templates
135         @debconf-updatepo
136
137 binary: binary-indep binary-arch
138 .PHONY: build clean binary-indep binary-arch binary