File: rules

package info (click to toggle)
sharutils 1:4.2-6
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,436 kB
  • ctags: 587
  • sloc: ansic: 6,313; perl: 1,742; makefile: 563; sh: 495; pascal: 293; sed: 93
file content (58 lines) | stat: -rwxr-xr-x 1,671 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
#!/usr/bin/make -f

package = sharutils
docdir = debian/tmp/usr/doc/$(package)

build:
	$(checkdir)
	CFLAGS="-O2 -g -Wall" ./configure --prefix=/usr --with-gnu-gettext
	make
	touch build

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

binary-indep: checkroot build
	$(checkdir)

binary-arch: checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	install -d debian/tmp/DEBIAN $(docdir)
	cd debian/tmp && install -d usr/bin
	make install install-man prefix=`pwd`/debian/tmp/usr
	cd debian && install -m 755 preinst postinst postrm tmp/DEBIAN
	cp -p README TODO NEWS THANKS debian/copyright $(docdir)
	cp -p ChangeLog $(docdir)/changelog
	cp -p debian/changelog $(docdir)/changelog.Debian
	cd $(docdir) && gzip -9 changelog changelog.Debian
	dpkg-shlibdeps debian/tmp/usr/bin/*
	cd debian/tmp/usr/bin && strip shar unshar uuencode uudecode
	gzip -9 debian/tmp/usr/info/*
	gzip -r9 debian/tmp/usr/man
	rm -f debian/tmp/usr/man/man1/uudecode.1.gz
	ln -s uuencode.1.gz debian/tmp/usr/man/man1/uudecode.1.gz
	ln -s ../man7/undocumented.7.gz debian/tmp/usr/man/man1/mailshar.1.gz
	ln -s ../man7/undocumented.7.gz debian/tmp/usr/man/man1/remsync.1.gz
	ln -s ../man7/undocumented.7.gz debian/tmp/usr/man/man1/mail-files.1.gz
	dpkg-gencontrol
	cd debian/tmp && md5sum `find * -type f ! -regex "DEBIAN/.*"` >DEBIAN/md5sums
	chown -R root.root debian/tmp
	chmod -R u+w,go=rX debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules
endef

binary: binary-indep binary-arch

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

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