File: rules

package info (click to toggle)
twpsk 2.1-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 944 kB
  • ctags: 1,477
  • sloc: cpp: 9,057; makefile: 187; sh: 4
file content (109 lines) | stat: -rwxr-xr-x 3,100 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
99
100
101
102
103
104
105
106
107
108
109
#!/usr/bin/make -f
#
# Ugh. After a lot of fighting with deb-make I found a reasonable easy
# to configure rules file in the svgalib-dummy package. Thanks to the
# person who wrote, Anyway, it's my first multiple binary package.

ARCH = $(shell dpkg --print-gnu-build-architecture)

packp = psk31lx
packt = twpsk
tmpp = debian/tmp-psk31lx
tmpt = debian/tmp-twpsk
docp = $(tmpp)/usr/share/doc/$(packp)
doct = $(tmpt)/usr/share/doc/$(packt)
manp = $(tmpp)/usr/share/man/man1
mant = $(tmpt)/usr/share/man/man1
menup = $(tmpp)/usr/lib/menu
menut = $(tmpt)/usr/lib/menu
pixt = $(tmpt)/usr/share/pixmaps/
pixp = $(tmpp)/usr/share/pixmaps/

build:
	$(checkdir)
	make
	touch build

clean:
	$(checkdir)
	-rm -f build
	-make clean
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp* debian/files* core debian/substvars

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

binary-arch: psk31lx twpsk

psk31lx: checkroot build
	$(checkdir)
	-rm -rf $(tmpp)
	install -d $(tmpp)/DEBIAN
	make install DESTDIR=`pwd`/$(tmpp)
	install -m 644 debian/control $(tmpp)/DEBIAN
	install -m 755 debian/postinst.psk31lx $(tmpp)/DEBIAN/postinst
	install -m 755 debian/prerm.psk31lx $(tmpp)/DEBIAN/prerm
	install -m 755 debian/postrm.psk31lx $(tmpp)/DEBIAN/postrm
	install -d $(docp)
	install -m 644 debian/changelog $(docp)/changelog.Debian
	install -m 644 debian/README.debian $(docp)
	gzip -9f $(docp)/*
	gzip -9f $(manp)/*
	install -m 644 debian/copyright $(docp)
	install -d $(menup)
	install -m 644 debian/menu.psk31lx $(menup)/psk31lx
	install -d $(pixp)
	install -m 0644 psk31.xpm $(pixp)
	dpkg-shlibdeps $(tmpp)/usr/bin/*
	dpkg-gencontrol -isp -p$(packp) -P$(tmpp)/
	chown -R root:root $(tmpp)
	chmod -R go=rX $(tmpp)
	dpkg --build $(tmpp) ..

twpsk: checkroot build
	$(checkdir)
	-rm -rf $(tmpt)
	install -d $(tmpt)/DEBIAN
	make install_twpsk DESTDIR=`pwd`/$(tmpt)
	install -m 644 debian/control $(tmpt)/DEBIAN
	install -m 644 debian/conffiles.twpsk $(tmpt)/DEBIAN/conffiles
	install -m 755 debian/postinst.twpsk $(tmpt)/DEBIAN/postinst
	install -m 755 debian/prerm.twpsk $(tmpt)/DEBIAN/prerm
	install -m 755 debian/postrm.twpsk $(tmpt)/DEBIAN/postrm
	install -d $(doct)
	install -m 644 debian/changelog $(doct)/changelog.Debian
	install -m 644 debian/README.debian $(doct)
	gzip -9f $(doct)/*
	gzip -9f $(mant)/*
	install -m 644 debian/copyright $(doct)
	install -d $(menut)
	install -m 644 debian/menu.twpsk $(menut)/twpsk
	install -d $(pixt)
	install -m 644 user-twpsk/sine1.xpm $(pixt)
	install -m 644 mini.sine1.xpm $(pixt)
	dpkg-shlibdeps $(tmpt)/usr/bin/*
	dpkg-gencontrol -isp -p$(packt) -P$(tmpt)/
	chown -R root:root $(tmpt)
	chmod -R go=rX $(tmpt)
	dpkg --build $(tmpt) ..

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

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

checkroot:
	$(checkdir)
	test root = "`whoami`"

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