File: rules

package info (click to toggle)
pine-docs 1998-02-15-2
  • links: PTS
  • area: non-free
  • in suites: hamm, potato, slink
  • size: 164 kB
  • ctags: 6
  • sloc: makefile: 34
file content (44 lines) | stat: -rwxr-xr-x 979 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
#!/usr/bin/make -f

PWD = $(shell pwd)
package = pine-docs
docdir = debian/tmp/usr/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 $(docdir) && tar xvf $(PWD)/Getting_Started.html.tar
	cp -p user-guide.txt debian/copyright $(docdir)
	cp -p debian/changelog $(docdir)/changelog.Debian
	cd $(docdir) && gzip -9 changelog.Debian user-guide.txt
	dpkg-gencontrol
	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