~jderose/ubuntu/precise/dbus-python/oneiric-backport

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Simon McVittie
  • Date: 2011-07-25 12:51:22 UTC
  • mfrom: (2.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20110725125122-1yv9c7dj95622lcx
Tags: 0.84.0-2
* Separate build-arch from build-indep, and do an extra build pass with the
  default version of Python to build the documentation
* Apply patch from Barry Warsaw to switch to dh_python2
  (Closes: #634346, #634859)
* Mark the current version of python-qt4-dbus as broken by this version
  (assuming that 4.8.3-3 will fix #634860)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Copyright � 2003 Daniel Stone <daniels@debian.org>
4
4
# Copyright � 2006 Sjoerd Simons <sjoerd@debian.org>
5
5
 
6
 
DEB_PYTHON_SYSTEM := pysupport
7
 
 
8
6
# These are used for cross-compiling and for saving the configure script
9
7
# from having to guess our platform (since we know it already)
10
8
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
25
23
        --prefix=/usr \
26
24
        --docdir=/usr/share/doc/deleteme
27
25
 
28
 
# Don't bother building documentation if the Python version is not Debian's
29
 
# default. We want to build the documentation exactly once, and the Debian
30
 
# default version is as good as any.
 
26
# We build the documentation using Debian's default Python version, as an
 
27
# extra build pass.
31
28
build-%/configure-stamp:
32
29
        dh_testdir
33
30
        mkdir -p build-$*
38
35
                        ;; \
39
36
        esac; \
40
37
        maybe_disable_doc="--disable-html-docs --disable-api-docs"; \
41
 
        if test $(PYDEFAULTVER) = $*; then \
 
38
        PYTHON="/usr/bin/python$*"; \
 
39
        if test doc = $*; then \
42
40
                maybe_disable_doc=""; \
 
41
                PYTHON="/usr/bin/python"; \
43
42
        fi; \
44
 
        cd build-$* && PYTHON=/usr/bin/python$* ../configure \
 
43
        cd build-$* && PYTHON=$$PYTHON ../configure \
45
44
                $(CONFIGURE_FLAGS) $$maybe_disable_doc
46
45
        touch $@
47
46
 
50
49
        PYTHON=/usr/bin/python$* $(MAKE) -C build-$*
51
50
        touch $@
52
51
 
53
 
build: $(PYVERS:%=build-%/build-stamp) $(PYVERS:%=build-%-dbg/build-stamp)
54
 
        ln -s build-$(PYDEFAULTVER) build-default
 
52
build-doc/build-doc-stamp: build-doc/configure-stamp
 
53
        dh_testdir
 
54
        PYTHON=/usr/bin/python $(MAKE) -C build-doc
 
55
        touch $@
 
56
 
 
57
build: build-arch
 
58
#build: build-indep
 
59
build-arch: $(PYVERS:%=build-%/build-stamp) $(PYVERS:%=build-%-dbg/build-stamp)
 
60
build-indep: build-doc/build-doc-stamp
55
61
 
56
62
install-clean:
57
63
        dh_testdir
74
80
        find debian/python-dbus-dbg ! -type d ! -name '*.so' -print0 | xargs -0 rm -f
75
81
        find debian/python-dbus-dbg -depth -empty -exec rmdir {} \;
76
82
 
77
 
install: build install-clean $(PYVERS:%=install-%) $(PYVERS:%=dbg-install-%)
78
 
        rm -f debian/python-dbus/usr/lib/python*/site-packages/*.la
 
83
install-arch: build-arch install-clean $(PYVERS:%=install-%) $(PYVERS:%=dbg-install-%)
 
84
        rm -f debian/python-dbus/usr/lib/python*/*-packages/*.la
79
85
        rm -rf debian/python-dbus/usr/share/doc/deleteme
 
86
        rm -f debian/python-dbus-dbg/usr/lib/python*/*-packages/*.la
 
87
        rm -rf debian/python-dbus-dbg/usr/share/doc/deleteme
80
88
        # compare installed .pc and .h, asserting that the ones all versions
81
89
        # wanted are the same as what we ended up with
82
90
        for v in $(PYVERS); do \
105
113
        find dbus -name '*.py[co]' -print0 | xargs -0 rm -f
106
114
        dh_clean
107
115
 
108
 
binary-indep: build install
 
116
binary-indep: build-indep
109
117
        dh_testdir
110
118
        dh_testroot
111
119
        dh_install -i
121
129
        dh_builddeb -i
122
130
 
123
131
# Build architecture-dependent files here.
124
 
binary-arch: build install
 
132
binary-arch: build-arch install-arch
125
133
        dh_testdir
126
134
        dh_testroot
127
135
        dh_install -s
133
141
        dh_link -s
134
142
        dh_compress -s -X.py -X.js
135
143
        dh_fixperms -s
136
 
        dh_pysupport -s
 
144
        dh_python2 -s
137
145
        dh_installdeb -s
138
146
        dh_shlibdeps -s
139
147
        dh_gencontrol -s
141
149
        dh_builddeb -s
142
150
 
143
151
binary: binary-arch binary-indep
144
 
.PHONY: build clean binary-indep binary-arch binary install install-clean
 
152
.PHONY: build clean binary-indep binary-arch binary install-arch install-clean