~ubuntu-branches/debian/lenny/python-uniconvertor/lenny

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Wenning
  • Date: 2008-03-18 01:37:28 UTC
  • Revision ID: james.westby@ubuntu.com-20080318013728-j0yhwssdo0x1clbr
Tags: 1.1.2-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
include /usr/share/dpatch/dpatch.make
 
3
 
 
4
p:=debian/python-uniconvertor
 
5
pd:=debian/python-uniconvertor-dbg
 
6
 
 
7
PYVERS  := $(shell pyversions -vs)
 
8
PYVER   := $(shell pyversions -vd)
 
9
 
 
10
build: clean patch-stamp build-stamp
 
11
        pod2man --section=1 --release=$(VERSION) debian/uniconvertor.pod > uniconvertor.1
 
12
        mkdir -p $(p)
 
13
 
 
14
build-stamp: $(PYVERS:%=build-python%) $(PYVERS:%=dbg-build-python%)
 
15
 
 
16
build-python%:
 
17
        python$* setup.py install --no-compile --root $(p)
 
18
 
 
19
dbg-build-python%:
 
20
        python$*-dbg setup.py install --no-compile --root $(pd)
 
21
 
 
22
clean: unpatch
 
23
        dh_testdir
 
24
        dh_clean -i -a
 
25
        python setup.py clean
 
26
        rm -rf build
 
27
        rm -f uniconvertor.1
 
28
 
 
29
install: build install-python dbg-install-python
 
30
 
 
31
install-python:
 
32
        mv $(p)/usr/bin/uniconv $(p)/usr/bin/uniconvertor
 
33
        chmod 755 `find $(p) -wholename "*/uniconvertor/__init__.py"`
 
34
        find $(p) -type f -name 'GNU_*GPL_v2' | xargs rm -f
 
35
        find $(p) -type f -name 'COPYRIGHTS' | xargs rm -f
 
36
 
 
37
dbg-install-python:
 
38
        find $(pd) ! -type d ! -name '*_d.so' | xargs rm -f
 
39
        find $(pd) -depth -empty -exec rmdir {} \;
 
40
        dh_link -ppython-uniconvertor-dbg /usr/share/doc/python-uniconvertor /usr/share/doc/python-uniconvertor-dbg
 
41
 
 
42
binary-indep:
 
43
        # Nothing to do.
 
44
 
 
45
binary-arch: install
 
46
        dh_testdir
 
47
        dh_testroot
 
48
        dh_installman uniconvertor.1
 
49
        dh_installdocs
 
50
        dh_installchangelogs
 
51
        dh_strip -ppython-uniconvertor --dbg-package=python-uniconvertor-dbg
 
52
        dh_compress -a -X.py
 
53
        dh_fixperms -a
 
54
        dh_pycentral -a
 
55
        dh_makeshlibs -a
 
56
        dh_installdeb -a
 
57
        dh_shlibdeps -a
 
58
        dh_gencontrol -a
 
59
        dh_md5sums -a
 
60
        dh_builddeb -a -- -Z bzip2
 
61
 
 
62
binary: binary-indep binary-arch
 
63
 
 
64
.PHONY: build clean binary binary-indep binary-arch install