File: rules

package info (click to toggle)
libpuzzle 0.11-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,092 kB
  • sloc: sh: 9,723; ansic: 1,811; makefile: 970; php: 269; sql: 148
file content (41 lines) | stat: -rwxr-xr-x 1,076 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -fPIE
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -fPIE -pie

UPSTREAMSTUFF  = INSTALL configure aclocal.m4 install-sh ltmain.sh missing
UPSTREAMSTUFF += $(shell find -iname '*.in' -o -iname '*.in.upstream' | sed 's/\.upstream//')

%:
	dh $@

override_dh_autoreconf:
	# Backup upstream stuff
	for file in $(UPSTREAMSTUFF); do \
 		if [ -e $$file ] && [ ! -e $$file.upstream ] ; then \
 			cp $$file $$file.upstream ; \
 		fi \
 	done
	dh_autoreconf

libpuzzle-build-stamp:
	dh_auto_build
	touch $@

override_dh_auto_build:
	pod2man --center "" --date "" --release "" --section=1 \
		debian/manpages/puzzle-diff.pod -o debian/puzzle-diff.1

execute_after_dh_auto_clean:
	rm -f debian/puzzle-diff.1 debian/libpuzzle.3 debian/puzzle_set.3
	find $(CURDIR) -name Makefile | xargs rm -f

execute_after_dh_clean:
	# Restore upstream stuff
	for file in $(UPSTREAMSTUFF); do \
		if [ -e $$file.upstream ] ; then \
			rm -f $$file; \
			mv $$file.upstream $$file; \
		fi \
	done