File: rules

package info (click to toggle)
plan 1.10.1-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 2,752 kB
  • ctags: 3,339
  • sloc: ansic: 25,066; perl: 1,361; sh: 1,165; makefile: 531; yacc: 121; sed: 17
file content (95 lines) | stat: -rwxr-xr-x 2,557 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
#!/usr/bin/make -f

export LC_ALL=C

package=plan

debdir=$(shell pwd)/debian
DESTDIR=${debdir}/tmp
relmandir=usr/share/man
relpkgdir=usr/lib/plan
mandir=/${relmandir}

configure: configure-stamp
include /usr/share/quilt/quilt.make
configure-stamp: $(QUILT_STAMPFN)
	dh_testdir
	cd src && ./configure 4
	touch configure-stamp


build-indep:

build-arch: build
build: build-stamp
build-stamp: configure-stamp
	dh_testdir
	make -C src linux CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)"
	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 build-stamp

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

	install -d ${DESTDIR}${mandir}/man1 ${DESTDIR}${mandir}/man4 \
		${DESTDIR}${mandir}/man8

	install -D -m 644 debian/plan.desktop debian/plan/usr/share/applications/plan.desktop

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

# FHS
	mkdir -p ${DESTDIR}/${relpkgdir}
	mkdir -p ${DESTDIR}/var/lib/plan/netplan.dir ${DESTDIR}/etc/plan
	dh_link -pplan etc/plan/holiday ${relpkgdir}/holiday
	dh_link -pnetplan etc/plan/netplan-acl var/lib/plan/netplan.dir/.netplan-acl

	mv ${DESTDIR}${mandir}/man1/netplan.1 ${DESTDIR}${mandir}/man8/netplan.8
	mkdir -p ${DESTDIR}/usr/share/doc/plan/examples/holiday
	cp debian/dot.xsession ${DESTDIR}/usr/share/doc/plan/examples
	cp holiday/holiday_* ${DESTDIR}/usr/share/doc/plan/examples/holiday
#	cd ${DESTDIR} && rmdir usr/sbin ${relmandir}/man8 
#	cd ${DESTDIR} && rmdir -p var/lib/plan/netplan.dir

	# Copied from sysvinit-utils version 2.88dsf-51
	install -D -m 755 debian/init-d-script debian/netplan/usr/share/netplan/init-d-script

	dh_install --sourcedir=${DESTDIR}

	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