File: rules

package info (click to toggle)
gnome-python-extras 2.19.1-3.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,640 kB
  • ctags: 736
  • sloc: sh: 8,856; ansic: 5,031; xml: 1,319; python: 769; makefile: 460
file content (120 lines) | stat: -rwxr-xr-x 3,153 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

# Include pkg-gnome stuff.
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
# get-orig-source target
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

PYVERS=$(shell pyversions -vr debian/control 2>/dev/null)

apply-patches: debian/stamp-patched
debian/stamp-patched:
	if [ -r /usr/include/libgdl-1.0/gdl/gdl-icons.h ]; then sed -i '/03_gdl-icons.patch/s,^,#,'  debian/patches/series; fi
	QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null push -a || test $$? = 2
	# This file is not removed by the patch
	mv gtkmozembed/gtkmozembedmodule.c gtkmozembed/gtkmozembedmodule.c.save
	touch $@

reverse-patches:
	QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null pop -a || test $$? = 2
	test -f gtkmozembed/gtkmozembedmodule.c.save && mv gtkmozembed/gtkmozembedmodule.c.save gtkmozembed/gtkmozembedmodule.c || true
	rm -rf .pc
	rm -f debian/stamp-patched
	sed -i '/#03_gdl-icons.patch/s,^#,,'  debian/patches/series

build-%/configure-stamp: configure apply-patches
	dh_testdir
	mkdir -p build-$*
	cd build-$* && PYTHON=/usr/bin/python$* ../configure    \
		--host=$(DEB_HOST_GNU_TYPE)	     \
		--build=$(DEB_BUILD_GNU_TYPE)	   \
		--prefix=/usr \
		--with-gtkmozembed=xulrunner-1.9
	touch $@

build-%/build-stamp: build-%/configure-stamp
	dh_testdir
	$(MAKE) -C build-$*
	touch $@

build: $(PYVERS:%=build-%/build-stamp)

clean:: reverse-patches
	dh_testdir
	dh_testroot
	rm -rf build-* debian/tmp-*
	dh_clean

install-clean:
	dh_testdir
	dh_testroot
	dh_clean -k

install-%: build-%/build-stamp
	dh_testdir
	dh_testroot
	$(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/tmp-$*
	dh_install --sourcedir=debian/tmp-$*

install: build install-clean $(PYVERS:%=install-%)
	dh_installdirs

# Build architecture-independent files here.
binary-indep:
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i
	dh_installexamples -i
	dh_installmenu -i
	dh_installcron -i
	dh_installinfo -i
	dh_installchangelogs ChangeLog -i
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_pysupport -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a
	dh_installexamples -a
	dh_installmenu -a
	dh_installman -a
	dh_installinfo -a
	dh_installchangelogs ChangeLog -a
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_pysupport -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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