source: pkg/main/pygobject/trunk/debian/rules @ 2355

Revision 2355, 2.4 KB checked in by alanbach-guest, 7 years ago (diff)

pygobject: Re-Sync'd with Debian 2.14.0-2

  • Property svn:executable set to *
Line 
1#!/usr/bin/make -f
2
3include /usr/share/cdbs/1/rules/simple-patchsys.mk
4include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
5-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
6
7CFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
8
9DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
11
12configure_flags += \
13                --prefix=/usr \
14                --enable-thread \
15                --build=$(DEB_BUILD_GNU_TYPE)
16
17ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
18        configure_flags += --host=$(DEB_HOST_GNU_TYPE)
19endif
20
21PYVERS := $(shell pyversions -vs)
22
23build-%/configure-stamp:
24        dh_testdir
25        mkdir -p build-$*
26        cd build-$* && \
27                PYTHON=/usr/bin/python$* CFLAGS="$(CFLAGS)" \
28                        $(CURDIR)/configure $(configure_flags)
29        touch $@
30
31build-%/build-stamp: build-%/configure-stamp
32        dh_testdir
33        $(MAKE) -C build-$*
34        touch $@
35
36build: apply-patches $(PYVERS:%=build-%/build-stamp)
37
38install-clean:
39        dh_testdir
40        dh_testroot
41        dh_clean -k
42
43install-%: build-%/build-stamp
44        dh_testdir
45        dh_testroot
46        $(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/python-gobject-dev
47
48install: build install-clean $(PYVERS:%=install-%)
49        dh_testdir
50        dh_testroot
51        find debian/python-gobject-dev -name \*.la -exec rm -f \{\} \;
52        mkdir -p debian/python-gobject/usr/lib
53        mv debian/python-gobject-dev/usr/lib/python* debian/python-gobject/usr/lib/
54
55clean:: reverse-patches
56        dh_testdir
57        dh_testroot
58        rm -Rf build-*
59        -test -f config.sub && \
60          test -r /usr/share/misc/config.sub && \
61          cp -f /usr/share/misc/config.sub config.sub
62        -test -f config.guess && \
63          test -r /usr/share/misc/config.guess && \
64          cp -f /usr/share/misc/config.guess config.guess
65        dh_clean *.pyc */*.pyc
66
67binary-indep: build install
68        dh_testdir
69        dh_testroot
70        dh_installdocs -i
71        dh_installexamples -i
72        dh_installchangelogs ChangeLog -i
73        dh_link -i
74        dh_compress -i -X.py
75        dh_fixperms -i
76        # More permission fixing
77        chmod 755 `grep -rl "^#\!.*python" debian/python-gobject-dev/usr`
78        dh_pysupport -i
79        dh_installdeb -i
80        dh_gencontrol -i
81        dh_md5sums -i
82        dh_builddeb -i
83
84binary-arch: build install
85        dh_testdir
86        dh_testroot
87        dh_installdocs -a
88        dh_installexamples -a
89        dh_installchangelogs ChangeLog -a
90        dh_strip -a
91        dh_link -a
92        dh_compress -a -X.py
93        dh_fixperms -a
94        dh_pysupport -a
95        dh_installdeb -a
96        dh_shlibdeps -a
97        dh_gencontrol -a
98        dh_md5sums -a
99        dh_builddeb -a
100
101binary: binary-arch binary-indep
102.PHONY: build clean binary-indep binary-arch binary build install
Note: See TracBrowser for help on using the repository browser.