File: rules

package info (click to toggle)
pixmap 2.6.6-1
  • links: PTS
  • area: main
  • in suites: bookworm, sid
  • size: 1,316 kB
  • sloc: ansic: 12,766; makefile: 74
file content (88 lines) | stat: -rwxr-xr-x 3,269 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
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
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
CFLAGS+=$(HARDENING_CFLAGS)
LDFLAGS+=$(HARDENING_LDFLAGS)

export DH_VERBOSE=1

override_dh_auto_configure:
	rm -rf X11
	xmkmf
	make Makefiles
	perl -i -pe 's/ ..SMLIB. ..ICELIB.//' Makefile # don't link with -lSM -lICE
	perl -i -pe 's/AR = ar clq/AR = ar cq/' Makefile SelFile/Makefile

override_dh_auto_build:
	make 'CCOPTIONS=$(CFLAGS)' 'EXTRA_LDOPTIONS=$(LDFLAGS)'

binary: binary-arch binary-indep
binary-indep: build
# nothing to do

binary-arch: build
	install -d -g root -m 755 -o root debian/pixmap
	chmod g-s debian/pixmap
	install -d -g root -m 755 -o root               \
                debian/pixmap/DEBIAN                       \
                debian/pixmap/usr/bin                      \
                debian/pixmap/usr/lib/X11                  \
                debian/pixmap/usr/lib/X11/Pixmap           \
                debian/pixmap/usr/share/doc/pixmap         \
                debian/pixmap/usr/share/applications       \
                debian/pixmap/usr/share/man/man1           \
                debian/pixmap/etc/X11/app-defaults
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	install -g root -m 755 -o root    pixmap debian/pixmap/usr/bin/pixmap
else
	# see changelog entry for 2.6pl4-13 about the strip here
	strip --remove-section=.comment --remove-section=.note pixmap
	install -g root -m 755 -o root -s pixmap debian/pixmap/usr/bin/pixmap
endif
	install -g root -m 644 -o root Pixmap.ad  \
		debian/pixmap/etc/X11/app-defaults/Pixmap
	install -g root -m 644 -o root debian/Pixmap-color  \
		debian/pixmap/etc/X11/app-defaults/Pixmap-color
	for file in Down Excl FlipHoriz FlipVert Fold Left Right RotateLeft \
		    RotateRight Stipple Term Up; do \
		install -g root -m 644 -o root $$file \
			debian/pixmap/usr/lib/X11/Pixmap/$$file; \
	done
	install -g root -m 644 -o root pixmap.man \
		debian/pixmap/usr/share/man/man1/pixmap.1
	-gzip -f -9n debian/pixmap/usr/share/man/man1/pixmap.1
	install -g root -m 644 -o root debian/pixmap.desktop \
		debian/pixmap/usr/share/applications/
	install -g root -m 644 -o root debian/changelog \
		debian/pixmap/usr/share/doc/pixmap/changelog.Debian
	install -g root -m 644 -o root CHANGES \
		debian/pixmap/usr/share/doc/pixmap/changelog
	-gzip -f -9n debian/pixmap/usr/share/doc/pixmap/*
	install -g root -m 644 -o root debian/copyright \
		debian/pixmap/usr/share/doc/pixmap/copyright
	install -g root -m 644 -o root debian/conffiles debian/pixmap/DEBIAN/.
	dpkg-shlibdeps debian/pixmap/usr/bin/pixmap
	dpkg-gencontrol -Pdebian/pixmap
	dh_md5sums
	chown -R root.root debian/pixmap
	chmod -R g-ws debian/pixmap
	find debian/pixmap -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
		xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
	dpkg --build debian/pixmap ..

	
clean:
	[ ! -f Makefile ] || $(MAKE) distclean || $(MAKE) clean
	rm -f Makefile Makefile.bak SelFile/Makefile SelFile/Makefile.bak
	rm -f dotpixmap .#pixmap Pixmap.ad pixmap._man
	rm -f stamp-build pixmap
	rm -rf debian/pixmap debian/files debian/substvars debian/pixmap
	dh_clean


%:
	dh $@

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