~ubuntu-branches/ubuntu/karmic/sonata/karmic

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2009-05-11 09:10:00 UTC
  • mfrom: (4.2.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090511091000-jzspxudws5ngxb5e
Tags: 1.6.2-1
New upstream version (Closes: #528045).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
 
include /usr/share/python/python.mk
 
3
-include /usr/share/python/python.mk
 
4
ifeq (,$(py_sitename))
 
5
  py_sitename = site-packages
 
6
  py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages
 
7
  py_sitename_sh = $(py_sitename)
 
8
  py_libdir_sh = $(py_libdir)
 
9
  py_setup_install_args =
 
10
endif
4
11
 
5
12
# Uncomment this to turn on verbose mode.
6
13
#export DH_VERBOSE=1
13
20
        CFLAGS += -O2
14
21
endif
15
22
 
16
 
PYVERSIONS=$(shell pyversions -r)
 
23
PYVERSIONS=$(shell pyversions -v -r)
 
24
PYDEF=$(shell pyversions -v -d)
 
25
 
 
26
$(subst $(PYDEF),python,$*)
 
27
 
 
28
override_dh_auto_build-%:
 
29
        python$* setup.py build
 
30
 
 
31
override_dh_auto_build: $(PYVERSIONS:%=override_dh_auto_build-%)
 
32
        python setup.py build
 
33
 
 
34
override_dh_auto_install-%:
 
35
        python$* setup.py install \
 
36
                 --no-compile --root=$(CURDIR)/debian/tmp $(py_setup_install_args)
 
37
 
 
38
override_dh_auto_install: $(PYVERSIONS:%=override_dh_auto_install-%)
 
39
        python setup.py install \
 
40
                 --no-compile --root=$(CURDIR)/debian/tmp $(py_setup_install_args)
17
41
 
18
42
build: build-stamp
19
43
 
20
44
build-stamp:
21
 
        dh_testdir
 
45
        dh build
22
46
        chmod -x sonata/pixmaps/*
23
 
        set -e; \
24
 
        for python in $(PYVERSIONS) ; do \
25
 
                PKG_CONFIG_PATH=${PKGCONFIGPATH}:/usr/lib/pkgconfig/$$python \
26
 
                                        $$python setup.py build ; \
27
 
        done
28
47
        touch $@
29
48
 
30
49
clean:
31
 
        dh_testdir
32
 
        dh_testroot
33
 
        rm -f build-stamp
34
 
        rm -rf build 
35
 
        find . -name '*.pyc' -print0 | xargs -0 -r rm -f
36
 
        dh_clean 
 
50
        dh $@
37
51
 
38
52
install: build
39
 
        dh_testdir
40
 
        dh_testroot
41
 
        dh_clean -k 
42
 
        dh_installdirs
43
 
        set -e; \
44
 
        for python in $(PYVERSIONS) ; do \
45
 
                $$python setup.py install --no-compile --root=$(CURDIR)/debian/tmp $(py_setup_install_args); \
46
 
        done
47
 
        # Need to install default version as last to have proper #! line in main script
48
 
        python setup.py install --no-compile --root=$(CURDIR)/debian/tmp $(py_setup_install_args)
 
53
        dh $@
49
54
        # We install docs other way
50
 
        rm -rf $(CURDIR)/debian/tmp/usr/share/sonata
51
 
        install -m644 debian/sonata.xpm $(CURDIR)/debian/tmp/usr/share/pixmaps
 
55
        rm -rf $(CURDIR)/debian/sonata/usr/share/sonata
52
56
 
53
57
# Build architecture-independent files here.
54
58
binary-indep: build install
55
 
        dh_testdir -i
56
 
        dh_testroot -i
57
 
        dh_installchangelogs -i CHANGELOG
58
 
        dh_installdocs -i
59
 
        dh_install -i --sourcedir=debian/tmp
60
 
        dh_installmenu -i
61
 
        dh_pycentral -i
62
 
        dh_link -i
63
 
        dh_compress -i
64
 
        dh_fixperms -i
65
 
        dh_installdeb -i
66
 
        dh_gencontrol -i
67
 
        dh_md5sums -i
68
 
        dh_builddeb -i
 
59
        dh $@
69
60
 
70
61
# Build architecture-dependent files here.
71
62
binary-arch: build install
72
 
        dh_testdir -a
73
 
        dh_testroot -a
74
 
        dh_installchangelogs -a CHANGELOG
75
 
        dh_installdocs -a
76
 
        dh_install -a --sourcedir=debian/tmp
77
 
        dh_pycentral -a
78
 
        dh_link -a
79
 
        dh_strip -a
80
 
        dh_compress -a
81
 
        dh_fixperms -a
82
 
        dh_installdeb -a
83
 
        dh_shlibdeps -a
84
 
        dh_gencontrol -a
85
 
        dh_md5sums -a
86
 
        dh_builddeb -a
 
63
        dh $@
87
64
 
88
65
binary: binary-indep binary-arch
89
66
.PHONY: build clean binary-indep binary-arch binary install