File: rules.old

package info (click to toggle)
amanda 1:3.5.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 30,724 kB
  • sloc: ansic: 265,630; perl: 114,269; xml: 16,058; sh: 8,667; makefile: 2,795; awk: 502; lex: 407; yacc: 347; javascript: 135; tcl: 118; sql: 19; sed: 16; php: 2
file content (147 lines) | stat: -rwxr-xr-x 4,249 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/usr/bin/make -f
# Copyright 1998-2011 by Bdale Garbee.  License GPL v2
#           2016 by Jose M Calhariz. License GPL v2

export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk

r=$(CURDIR)/debian/amanda-common
s=$(CURDIR)/debian/amanda-server
c=$(CURDIR)/debian/amanda-client

configure: configure-stamp
configure-stamp:
	dh_testdir
	# pick up latest config files provided by autotools-dev
	cp -f /usr/share/misc/config.sub config/config.sub
	cp -f /usr/share/misc/config.guess config/config.guess
	dh_autoreconf
	# do we need --{htmldir,dvidir,pdfdir,psdir} to force subdirectories?
	# should we re-craft this to use --without-server and --without-client,
	#	and lose the amanda-common package?
	MAILER=/usr/bin/mail \
	SSH=/usr/bin/ssh \
	./configure \
		--prefix=/usr \
		--bindir=/usr/sbin \
		--libexecdir=/usr/lib/amanda \
		--without-amlibexecdir \
		--without-amperldir \
		--sysconfdir=/etc \
		--sharedstatedir=/var/lib \
		--localstatedir=/var/lib \
		--with-user=backup \
		--with-group=backup  \
		--with-tcpportrange=50000,50100 \
		--with-udpportrange=840,860 \
		--with-debugging=/var/log/amanda \
		--with-gnutar-listdir=/var/lib/amanda/gnutar-lists \
		--with-amandates=/var/lib/amanda/amandates \
		--with-index-server=localhost \
		--with-bsd-security \
		--with-smbclient=/usr/bin/smbclient \
		--with-amandahosts \
		--with-ssh-security \
		--with-bsdtcp-security \
		--with-bsdudp-security \
		--without-ipv6 \
		--enable-s3-device

	touch missing
	touch configure-stamp

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp
	dh_testdir
	MAILER=/usr/bin/mail $(MAKE) CFLAGS="$(CFLAGS) -O2 -g -Wall \
		-DIGNORE_TAR_ERRORS "
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || make clean
	[ ! -f Makefile ] || make distclean
	-rm -f build-stamp configure-stamp missing config/config.h common-src/genversion
	-find . -type d -name .deps -exec rm -rf {} \;
	rm -f config/config.sub config/config.guess
	dh_autoreconf_clean
	dh_clean

# call this before packaging for upload when updating template English text
updatepo:
	-rm -f debian/po/templates.pot
	debconf-updatepo

binary-indep: build

binary-arch: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs -a
	make install DESTDIR=$(r)
	sed -i "/dependency_libs/ s/'.*'/''/" `find $(r)/usr/lib/amanda/ -name '*.la'`
	install -m 644 debian/amandahosts $(r)/etc/amandahosts
	install -m 644 debian/amanda-security.conf $(c)/etc/
	dh_installdocs -a
	dh_installexamples -a
	cp ChangeLog $(r)/usr/share/doc/amanda-common/changelog
	cp example/xinetd.amandaserver $(r)/etc/xinetd.d/amanda
	dh_installmenu -a
	dh_installcron -a
	dh_installchangelogs -a
	dh_installdebconf -a
	dh_installman -a
	dh_strip -a
	dh_compress -a
	dh_movefiles -a --sourcedir=debian/amanda-common
	dh_install -a -X.in
	dh_link -a
	rm -r $(r)/usr/share/amanda
	dh_fixperms -av
	# fix perms manually
	chown -R backup:backup debian/*/var/lib/*
	chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/*
	chown -R backup:backup $(s)/etc/amanda
	chmod -R u=rwX,g=rwX,o-rwx $(s)/etc/amanda
	chown -R backup:backup $(c)/var/lib/amanda/gnutar-lists
	chmod -R u=rwX,g=rwX,o-rwx $(c)/var/lib/amanda/gnutar-lists
	# .. setuid
	chown root:backup \
		$(c)/usr/lib/amanda/application/amgtar \
		$(c)/usr/lib/amanda/application/amstar \
		$(c)/usr/lib/amanda/calcsize \
		$(c)/usr/lib/amanda/killpgrp \
		$(c)/usr/lib/amanda/rundump \
		$(c)/usr/lib/amanda/runtar \
		$(s)/usr/lib/amanda/dumper \
		$(s)/usr/lib/amanda/planner \
		$(s)/usr/sbin/amcheck
	chmod u=srwx,g=rx,o=r \
		$(c)/usr/lib/amanda/application/amgtar \
		$(c)/usr/lib/amanda/application/amstar \
		$(c)/usr/lib/amanda/calcsize \
		$(c)/usr/lib/amanda/killpgrp \
		$(c)/usr/lib/amanda/rundump \
		$(c)/usr/lib/amanda/runtar \
		$(s)/usr/lib/amanda/dumper \
		$(s)/usr/lib/amanda/planner \
		$(s)/usr/sbin/amcheck
	dh_lintian
	dh_makeshlibs -pamanda-common --noscripts
	dh_installdeb -a
	dh_perl -a usr/lib/amanda/perl
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: configure build-indep build-arch build clean binary-indep binary-arch binary