File: rules

package info (click to toggle)
nitpic 0.1-17
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 352 kB
  • sloc: cpp: 3,845; ansic: 1,016; asm: 144; makefile: 55
file content (78 lines) | stat: -rwxr-xr-x 2,168 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
74
75
76
77
78
#! /usr/bin/make -f

.PHONY: build build-indep build-arch 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

export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)

build: build-arch
build-indep:
build-arch: checkdir Makefile
	$(MAKE)

clean: checkdir Makefile
	$(MAKE) clean
	$(RM) -r debian/files debian/substvars debian/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 -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 -9nvf $(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 -9nvf $(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 ! -path $(d)/usr/bin/nitpic -print0 | xargs -0 chmod 644
	find $(d) -type d -print0 | xargs -0 chmod 755
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	$(STRIP) $(d)/usr/bin/nitpic
endif
	dpkg-shlibdeps $(d)/usr/bin/*
	dpkg-gencontrol -isp -p$(package) -P$(d)
	find $(d) -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
		xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
	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