~bennabiy/+junk/python-xlib

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Andrew Shadura, Ramkumar Ramachandra, Andrew Shadura
  • Date: 2015-08-13 08:14:19 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20150813081419-hdefinnghp2iydkx
Tags: 0.14+20091101-3
[ Ramkumar Ramachandra ]
* Remove useless debugging output (Closes: #565996)

[ Andrew Shadura ]
* Switch to 3.0 (quilt) format.
* Rename patches.
* Use debhelper 9 in its short form.
* Use pybuild.
* Bump Standards-Version.
* Don't build or install PostScript documentation and info files.
* Use system-provided texi2html instead of a shipped version
  (Closes: #795057).
* Update debian/copyright (Closes: #795057).
* Don't install Makefile or texi2html with the documentation.
* Set executable bit for examples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
#-*- makefile -*-
3
 
# Made with the aid of dh_make, by Craig Small
4
 
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
5
 
# Some lines taken from debmake, by Christoph Lameter.
6
3
 
7
4
# Uncomment this to turn on verbose mode.
8
5
#export DH_VERBOSE=1
9
6
 
10
 
include /usr/share/quilt/quilt.make
11
 
 
12
 
PYVERS:=$(shell pyversions -r)
13
 
PY3VERS:=$(shell py3versions -r)
14
 
 
15
 
build: build-stamp
16
 
build-stamp: patch
17
 
        dh_testdir
18
 
        set -e; \
19
 
        for py in $(PYVERS) $(PY3VERS); do  \
20
 
            $$py setup.py build; \
21
 
        done
22
 
        make -C doc
23
 
        touch $@
24
 
 
25
 
clean: unpatch
26
 
        dh_testdir
27
 
        dh_testroot
28
 
        dh_clean
29
 
        -for py in $(PYVERS) $(PY3VERS); do  \
30
 
            $$py setup.py clean; \
31
 
        done
32
 
        rm -f install-stamp build-stamp
33
 
        find Xlib -name \*.pyc | xargs rm -f
34
 
        rm -rf build
 
7
export PYBUILD_NAME=xlib
 
8
 
 
9
%:
 
10
        dh $@ --with python2,python3 --buildsystem=pybuild
 
11
 
 
12
override_dh_auto_build:
 
13
        dh_auto_build
 
14
        make -C doc html
 
15
 
 
16
override_dh_auto_clean:
 
17
        dh_auto_clean
35
18
        make -C doc clean
36
19
 
37
 
install: install-stamp
38
 
install-stamp:
39
 
        dh_testdir
40
 
        dh_testroot
41
 
        dh_clean -k
42
 
        dh_installdirs
43
 
        set -e; \
44
 
        for py in $(PYVERS); do  \
45
 
            $$py setup.py install --root=debian/python-xlib; \
46
 
        done
47
 
        for py in $(PY3VERS); do  \
48
 
            $$py setup.py install --root=debian/python3-xlib; \
49
 
        done
50
 
        dh_installdocs -A
51
 
        dh_installexamples -A examples/*.py
 
20
override_dh_installdocs:
 
21
        dh_installdocs
 
22
        rm debian/*/usr/share/doc/*/*/Makefile debian/*/usr/share/doc/*/*/texi2html
 
23
 
 
24
override_dh_installexamples:
 
25
        dh_installexamples
52
26
        # adjust python3 examples hashbang
53
27
        sed -i '1 s/python$$/python3/' debian/python3-xlib/usr/share/doc/*/examples/*.py
54
 
        dh_installinfo doc/info/*.info
55
 
 
56
 
        touch install-stamp
57
 
 
58
 
binary-arch: build install
59
 
# We have nothing to do by default.
60
 
 
61
 
binary-indep: build install
62
 
        dh_testdir
63
 
        dh_testroot
64
 
        dh_installchangelogs NEWS
 
28
        # set all examples executable
 
29
        chmod +x debian/python*-xlib/usr/share/doc/*/examples/*.py
 
30
 
 
31
override_dh_compress:
65
32
        dh_compress -X.py
66
 
        dh_fixperms
67
 
        dh_python2
68
 
        dh_python3
69
 
        dh_installdeb
70
 
        dh_gencontrol
71
 
        dh_md5sums
72
 
        dh_builddeb
73
33
 
74
 
binary: binary-indep binary-arch
75
 
.PHONY: build clean binary-indep binary-arch binary install
 
34
.PHONY: override_dh_auto_build override_dh_auto_clean override_dh_installexamples override_dh_compress