File: rules

package info (click to toggle)
plan 1.8.7-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,196 kB
  • ctags: 1,971
  • sloc: ansic: 24,392; perl: 1,361; sh: 1,030; makefile: 514; yacc: 120; sed: 17
file content (89 lines) | stat: -rwxr-xr-x 2,360 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
#!/usr/bin/make -f

WARNFLAGS="-Wall -W -Wcast-align -Wmissing-declarations -Wmissing-prototypes \
  -Wstrict-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual"

export LC_ALL=C

package=plan

debdir=$(shell pwd)/debian
tmpdir=${debdir}/tmp
libdir=${tmpdir}/usr/lib/plan
_MANDIR=usr/share/man
mandir=${tmpdir}/${_MANDIR}

configure: configure-stamp
configure-stamp: patch-stamp
	dh_testdir
	cd src && ./configure 4
	touch configure-stamp

build: build-stamp
build-stamp: configure-stamp
	dh_testdir
	make -C src DEBUG="-O2 -g $(WARNFLAGS)"
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp src/Makefile.back
	make -C src clean
	-rm -f src/pland src/plan src/netplan src/notifier
	dh_clean

include /usr/share/dpatch/dpatch.make

binary-indep: build
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdirs

	make -C src install DESTDIR=${tmpdir}
	dh_link ${_MANDIR}/man1/plan.1.gz ${_MANDIR}/man1/pland.1.gz \
		usr/lib/plan/pland /usr/bin/pland

      # FHS
	mkdir -p ${tmpdir}/usr/lib/plan ${tmpdir}/var/lib/plan/netplan.dir ${tmpdir}/etc/plan
	dh_link etc/plan/holiday usr/lib/plan/holiday \
		etc/plan/netplan-acl var/lib/plan/netplan.dir/.netplan-acl
	mkdir -p ${debdir}/netplan/etc/plan

	mv debian/tmp/usr/share/man/man1/netplan debian/tmp/usr/share/man/man8/netplan.8
	mv debian/tmp/usr/share/man/man1/plan debian/tmp/usr/share/man/man1/plan.1
	mv debian/tmp/usr/share/man/man4/plan debian/tmp/usr/share/man/man4/plan.4
	mkdir -p ${tmpdir}/usr/share/doc/plan/examples/holiday
	cp debian/dot.xsession ${tmpdir}/usr/share/doc/plan/examples
	cp holiday/holiday_* ${tmpdir}/usr/share/doc/plan/examples/holiday

	dh_movefiles
	cd ${tmpdir} && rmdir usr/sbin usr/share/man/man8 
	cd ${tmpdir} && rmdir -p var/lib/plan/netplan.dir

	dh_installdocs
	dh_installmenu
	dh_installinit
	dh_installchangelogs HISTORY

	dh_strip
	# We want the holiday files uncompressed, for use in the postinst
	dh_compress -Xusr/share/doc/plan/examples/holiday/
	dh_fixperms
	dh_installdebconf

	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Below here is fairly generic really
binary:		binary-indep binary-arch
.PHONY: binary binary-arch binary-indep clean