File: rules

package info (click to toggle)
amanda 1%3A2.4.0-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 3,228 kB
  • ctags: 3,359
  • sloc: ansic: 30,812; sh: 3,768; makefile: 616; perl: 591; awk: 331; lex: 121; yacc: 73
file content (98 lines) | stat: -rwxr-xr-x 3,135 bytes parent folder | download
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
#!/usr/bin/make -f
# debian/rules for amanda using debhelper. GNU copyright 1998 by Bdale Garbee.
# requires automake 1.2d (from experimental tree)

#	Warning - do *not* use -j on an SMP machine, or the build gets
#		confused... some sort of race condition in the makefiles?

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

r=$(shell pwd)/debian/tmp
server=$(shell pwd)/debian/amanda-server
client=$(shell pwd)/debian/amanda-client

build: build-stamp
build-stamp: 
	dh_testdir
	automake --foreign
	autoconf -l config
	./configure --prefix=/usr --bindir=/usr/sbin \
		--libexecdir=/usr/lib/amanda\
		--sysconfdir=/etc --localstatedir=/var/lib \
		--with-gnutar-listdir=/var/lib/amanda/gnutar-lists \
		--with-index-server=localhost \
		--with-user=backup --with-group=backup  \
		--with-bsd-security --with-amandahosts \
		--with-smbclient=/usr/bin/smbclient
	touch missing
	make CFLAGS="-O2 -g -Wall -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"'"
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-make clean
	-make distclean
	-rm -f build-stamp missing config/config.h common-src/genversion
	-find . -type d -name .deps -exec rm -rf {} \;
	dh_clean

# Build architecture-independent files here.
binary-indep: build

# Build architecture-dependent files here.
binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs -a
	make install prefix=$(r)/usr bindir=$(r)/usr/sbin \
		libexecdir=$(r)/usr/lib/amanda
	install debian/README.client.debian \
		$(client)/usr/doc/amanda-client
	install debian/README.server.debian $(server)/usr/doc/amanda-server
	install -m 644 debian/amanda.conf.in \
		$(server)/etc/amanda/DailySet1/amanda.conf
	install -m 644 debian/disklist $(server)/etc/amanda/DailySet1/disklist
	install -m 644 debian/crontab.amanda $(server)/etc/amanda
	dh_installdocs -a
	dh_installexamples -a
	dh_installmenu -a
	dh_installcron -a
	dh_undocumented -a
	dh_installchangelogs -a
	dh_strip -a
	dh_compress -a
	dh_movefiles -a
	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 $(server)/var/log/amanda
	chmod -R u=rwX,g=rwX,o-rwx $(server)/var/log/amanda
	chown -R backup:backup $(server)/etc/amanda
	chmod -R u=rwX,g=rwX,o-rwx $(server)/etc/amanda
	chown -R backup:backup $(client)/var/lib/amanda/gnutar-lists
	chmod -R u=rwX,g=rwX,o-rwx $(client)/var/lib/amanda/gnutar-lists
	# .. setuid
	chown root:backup $(server)/usr/lib/amanda/{dumper,planner}
	chmod u=srwx,g=rx,o=r $(server)/usr/lib/amanda/{dumper,planner}
	chown root:backup $(client)/usr/lib/amanda/runtar
	chmod u=srwx,g=rx,o=r $(client)/usr/lib/amanda/runtar
	chown root:backup $(server)/usr/sbin/amcheck
	chmod u=srwx,g=rx,o=r $(server)/usr/sbin/amcheck
	dh_suidregister -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_makeshlibs -a
	dh_du -a
	dh_md5sums -a
	dh_builddeb -a

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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