~ubuntu-branches/ubuntu/wily/pyzmq/wily

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2013-02-24 19:23:15 UTC
  • mfrom: (1.2.1) (9 sid)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: package-import@ubuntu.com-20130224192315-qhmwp3m3ymk8r60d
Tags: 2.2.0.1-1
* New upstream release
* relicense debian packaging to LGPL-3
* update watch file to use github directly
  thanks to Bart Martens for the file
* add autopkgtests
* drop obsolete DM-Upload-Allowed
* bump standard to 3.9.4, no changes required

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
 
2
 
 
3
PY3VERS = $(shell py3versions -rv)
 
4
DPKG_EXPORT_BUILDFLAGS = 1
 
5
include /usr/share/dpkg/buildflags.mk
 
6
 
 
7
 
2
8
%:
3
 
        dh --with python2 $@
 
9
        dh $@ --with python2,python3
 
10
 
 
11
override_dh_auto_build:
 
12
        dh_auto_build
 
13
        set -e && for pyv in $(PY3VERS); do \
 
14
          python$$pyvers setup.py build ; \
 
15
          python$${pyv}-dbg setup.py build ; \
 
16
        done
4
17
 
5
18
override_dh_auto_clean:
6
19
        -dh_auto_clean
7
 
        find zmq -name '*.c' -delete
 
20
        if [ -d zmq ]; then \
 
21
          find zmq -name '*.c' -delete; \
 
22
          find zmq -name '*.so' -delete; \
 
23
        fi
 
24
        rm -rf build
 
25
        find $(CURDIR) -name "*.pyc" -delete
 
26
        rm -f conf/*.pickle
 
27
        rm -f conf/*.json
8
28
 
9
29
override_dh_install:
10
30
        # Install everything excluding the *_d.so debug extensions to python-zmq
11
 
        dh_install -X"*_d.so" "debian/tmp/*" -p python-zmq
 
31
        dh_install -X"*_d.so" "debian/tmp/usr/lib/python2.*" -p python-zmq
12
32
 
13
33
        # Install the debug extensions to python-zmq-dbg
14
 
        dh_install "usr/lib/python*/*-packages/zmq/*/*_d.so" -p python-zmq-dbg
 
34
        dh_install "usr/lib/python2.*/*-packages/zmq/*/*_d.so" -p python-zmq-dbg
 
35
 
 
36
        # Install python3 files
 
37
        set -e && for pyv in $(PY3VERS); do \
 
38
          python$$pyv setup.py install --install-layout=deb \
 
39
                --force --no-compile -O0 --root=$(CURDIR)/debian/python3-zmq; \
 
40
          python$${pyv}-dbg setup.py install --install-layout=deb \
 
41
                --force --no-compile -O0 --root=$(CURDIR)/debian/python3-zmq-dbg; \
 
42
        done
 
43
        # remove a couple of header files already in python3-zmq
 
44
        find debian/python3-zmq-dbg/usr/lib/ ! -type d ! -name '*.so' -delete
 
45
 
15
46
 
16
47
        # Continue with regular dh_install
17
48
        dh_install
18
49
 
19
50
override_dh_auto_test:
20
 
# Almost all tests are broken because OpenPGM doesn't seem to be initialized
21
 
# correctly or there is not support for OpenPGM in libzmq0. I don't know if
22
 
# #566126 have something to do with this, anyway the affected tests are:
23
 
# zmq/tests/test_context.py
24
 
# zmq/tests/test_pair.py
25
 
# zmq/tests/test_poll.py
26
 
# zmq/tests/test_pubsub.py
27
 
# zmq/tests/test_reqrep.py
28
 
# zmq/tests/test_socket.py
29
 
#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
30
 
#       for python in $(shell pyversions -r); do \
31
 
#               $$python setup.py test; \
32
 
#               $$python-dbg setup.py test; \
33
 
#       done
34
 
#endif
 
51
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 
52
        -set -e; \
 
53
        for python in $(shell pyversions -r); do \
 
54
                for build in \  -dbg; do \
 
55
                        find zmq -name '*.so' -delete; \
 
56
                        $$python$$build setup.py build_ext --inplace; \
 
57
                        $$python$$build setup.py test; \
 
58
                done; \
 
59
        done
 
60
        -set -e; \
 
61
        for python in $(PY3VERS); do \
 
62
                for build in \  -dbg; do \
 
63
                        find zmq -name '*.so' -delete; \
 
64
                        python$$python$$build setup.py build_ext --inplace; \
 
65
                        python$$python$$build setup.py test; \
 
66
                done; \
 
67
        done
 
68
endif
35
69
 
36
70
override_dh_strip:
37
71
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
38
 
        dh_strip --dbg-package=python-zmq-dbg
39
 
        find debian/python-zmq-dbg/usr/lib/debug -name '*_d.so' -delete
 
72
        dh_strip -Xpython3 --dbg-package=python-zmq-dbg
 
73
        dh_strip -X"python2.*" --dbg-package=python3-zmq-dbg
40
74
endif
41
75
 
42
76
get-orig-source: