File: rules

package info (click to toggle)
zec 0.11.1-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 320 kB
  • ctags: 31
  • sloc: sh: 989; xml: 72; makefile: 58
file content (65 lines) | stat: -rwxr-xr-x 2,083 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

package=zec

INSTALL = install
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755

build:
	$(checkdir)
	./configure --prefix=/usr --bindir=/usr/games --mandir=/usr/share/man --datadir=/usr/share/games/zec
	$(MAKE)
	touch build

clean:
	$(checkdir)
	 [ ! -f Makefile ] || $(MAKE) distclean
	-rm -f build build-static
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp debian/files* core debian/substvars stamp-configure stamp-configure-static config.cache config.status obj obj-static

binary-indep:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	$(INSTALL_DIR) debian/tmp
	cd debian/tmp && $(INSTALL_DIR) `cat ../dirs` DEBIAN
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
	gzip -9frq debian/tmp/usr/share/man/man6/*.6

	$(INSTALL_SCRIPT) debian/prerm debian/tmp/DEBIAN/prerm
	$(INSTALL_SCRIPT) debian/postinst debian/tmp/DEBIAN/postinst
	$(INSTALL_SCRIPT) debian/postrm debian/tmp/DEBIAN/postrm
	$(INSTALL_FILE) debian/copyright debian/tmp/usr/share/doc/$(package)/copyright
	$(INSTALL_FILE) debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian
	$(INSTALL_FILE) ChangeLog debian/tmp/usr/share/doc/$(package)/changelog
	gzip -9frq debian/tmp/usr/share/doc/$(package)/changelog.Debian \
	           debian/tmp/usr/share/doc/$(package)/changelog
	$(INSTALL_FILE) debian/menu debian/tmp/usr/share/menu/$(package)

	$(INSTALL_FILE) AUTHORS NEWS README debian/tmp/usr/share/doc/$(package)

	cd debian/tmp && find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums

	dpkg-gencontrol -isp -p$(package) -Pdebian/tmp
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

binary-arch:

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

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

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