File: rules

package info (click to toggle)
libgtk2-perl 1%3A1.190-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,132 kB
  • ctags: 516
  • sloc: perl: 16,575; sh: 149; ansic: 148; makefile: 76
file content (101 lines) | stat: -rwxr-xr-x 1,987 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
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/make -f

# If set to a true value then MakeMaker's prompt function will
# always return the default without waiting for user input.
export PERL_MM_USE_DEFAULT=1

PACKAGE=$(shell dh_listpackages)

ifndef PERL
PERL = /usr/bin/perl
endif

TMP     =$(CURDIR)/debian/tmp

CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -O2
endif

patch: patch-stamp
patch-stamp:
	dpatch apply-all
	dpatch cat-all >patch-stamp

unpatch:
	dpatch deapply-all
	rm -rf patch-stamp debian/patched

build: build-stamp
build-stamp: patch-stamp
	dh_testdir
	
	$(PERL) Makefile.PL INSTALLDIRS=vendor
	$(MAKE) OPTIMIZE="$(CFLAGS)"
	
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	
	[ ! -f Makefile ] || $(MAKE) realclean
	
	dh_clean build-stamp install-stamp

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	
	xvfb-run -a $(MAKE) test
	
	$(MAKE) install PREFIX=$(TMP)/usr
	touch install-stamp

# Build architecture-independent files here.
binary-indep: install
	dh_testdir -i
	dh_testroot -i
	dh_install -i --sourcedir=debian/tmp	
	dh_installdocs -i
	dh_installexamples  -i
	dh_installchangelogs -i ChangeLog
	dh_link -i
	dh_fixperms -i
	dh_strip -i
	dh_compress -i
	dh_installdeb -i
	dh_perl  -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: install
	dh_testdir -a
	dh_testroot -a
	dh_install -a --sourcedir=debian/tmp
	dh_installdocs -a
	dh_installchangelogs -a ChangeLog
	dh_link -a
	dh_fixperms -a
	dh_strip -a
	dh_compress -a
	dh_makeshlibs -a
	dh_installdeb -a
	dh_perl  -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

binary: binary-indep binary-arch
.PHONY: build clean clean-unpatched patch unpatch binary-indep binary-arch binary