File: rules

package info (click to toggle)
nitpic 0.1-11
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 212 kB
  • ctags: 298
  • sloc: cpp: 2,212; ansic: 408; asm: 144; makefile: 50; sh: 3
file content (73 lines) | stat: -rwxr-xr-x 1,888 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
66
67
68
69
70
71
72
73
#! /usr/bin/make -f

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

package = nitpic
d=$(shell pwd)/debian/tmp
STRIP=strip --strip-unneeded --remove-section=.note --remove-section=.comment

Makefile: Imakefile
	xmkmf

build: checkdir Makefile
	$(MAKE)

clean: checkdir Makefile
	$(MAKE) clean
	$(RM) -r debian/{files,substvars,tmp}
	$(RM) Makefile
	find . -name \*~ -print0 | xargs -0 $(RM)

binary-indep:	checkdir build checkroot

binary-arch:	checkdir build checkroot
	$(RM) -r $(d)

	install -d $(d)/DEBIAN
	install -d $(d)/usr/bin
	install -d $(d)/etc/X11/app-defaults
	install -d $(d)/usr/share/doc/$(package)
	install -d $(d)/usr/share/man/man1
	

	install -c debian/conffiles $(d)/DEBIAN/
	install -m 755 -c debian/prerm $(d)/DEBIAN/

	install -c debian/changelog $(d)/usr/share/doc/$(package)/changelog.Debian
	install -c README $(d)/usr/share/doc/$(package)
	install -c test.* $(d)/usr/share/doc/$(package)
	gzip -9vf $(d)/usr/share/doc/$(package)/*
	install -c debian/copyright $(d)/usr/share/doc/$(package)/copyright

	install -c nitpic $(d)/usr/bin
	install -c XPICsim $(d)/etc/X11/app-defaults/

	install -d $(d)/usr/share/$(package)/
	install -c *.xbm $(d)/usr/share/nitpic/
	
	
	install nitpic.man $(d)/usr/share/man/man1/nitpic.1
	gzip -9vf $(d)/usr/share/man/man1/nitpic.1
	
	install -d $(d)/usr/share/lintian/overrides
	install -c debian/lintian.overrides $(d)/usr/share/lintian/overrides/$(package)
	
	chown -fR root.root $(d)
	find $(d) -type f -print0 | xargs -0 chmod 644
	find $(d) -type d -print0 | xargs -0 chmod 755
	chmod a+x $(d)/usr/bin/* $(d)/DEBIAN/prerm

	$(STRIP) $(d)/usr/bin/nitpic
	dpkg-shlibdeps $(d)/usr/bin/*
	dpkg-gencontrol -isp -p$(package) -P$(d)
	dpkg --build $(d) ..

binary:	binary-indep binary-arch

checkdir:
	test -f ic.cc

checkroot:
	test "`whoami`" = "root"

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