File: rules

package info (click to toggle)
pine-docs 2000-09-02-2
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 128 kB
  • ctags: 6
  • sloc: sh: 39; makefile: 38
file content (48 lines) | stat: -rwxr-xr-x 1,150 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
#!/usr/bin/make -f

PWD = $(shell pwd)
package = pine-docs
docdir = debian/tmp/usr/share/doc/$(package)

build:
	$(checkdir)
	touch build

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

binary-arch: checkroot build
	$(checkdir)

binary-indep: checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	install -d debian/tmp/DEBIAN $(docdir)
	cd debian/tmp && install -d usr/share/doc-base
	cd $(docdir) && tar xvf $(PWD)/Getting_Started.html.tar
	install -m 755 debian/postinst debian/prerm debian/tmp/DEBIAN
	cp debian/pine-docs debian/tmp/usr/share/doc-base
	cp -p debian/copyright $(docdir)
	cp -p debian/changelog $(docdir)/changelog.Debian
	gzip -9 $(docdir)/changelog.Debian
	sh debian/mk-symlinks $(package)
	dpkg-gencontrol -isp
	cd debian/tmp && md5sum `find * -type f ! -regex "DEBIAN/.*"` >DEBIAN/md5sums
	chown -R root.root debian/tmp
	chmod -R 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