~ubuntu-branches/ubuntu/quantal/python-tz/quantal

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Brian Sutherland
  • Date: 2007-05-09 12:01:36 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070509120136-oi18syaota63tyzy
Tags: 2007d-1
* New upstream release (Closes: 415458)
* Revert patch ignoring arch files, it's not necessary any and conflicted
  with upstream.
* Patch upstream to use /usr/share/zoneinfo and remove the included version,
  also depend on tzdata package. (Closes: 416202)
* Write and install a testrunner that can run the pytz tests in
  /usr/lib/python-tz/test-pytxX.Y which tests pythonX.Y.
* Build depends on python-central > 0.5, debhelper > 5.0.38
* Remove workaround for python-central/debhelper breakage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
PACKAGE=python-tz
9
9
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog \
10
10
                             | grep ^Version: | cut -d ' ' -f 2 | cut -d '-' -f 1)
11
 
pycentraldir := $(shell pycentral pycentraldir python-tz)
12
11
 
13
12
build: $(PYVERS:%=build-python%)
14
13
        touch $@
36
35
        dh_testroot
37
36
        dh_clean -k
38
37
        dh_installdirs
39
 
        # Workaround dh_python/dh_pycentral breakage
40
 
        echo python:Provides=$(foreach pv,$(shell pyversions -s),$(pv)-tz)|sed 's/ /, /g' >> debian/python-tz.substvars
41
38
        $(MAKE) -f debian/rules $(PYVERS:%=install-python%)
42
39
 
43
40
install-python%:
45
42
        # Remove python and module version from .egg-info
46
43
        mv debian/$(PACKAGE)/usr/lib/python$*/site-packages/$(PYMOD)-$(DEB_UPSTREAM_VERSION)-py$*.egg-info \
47
44
           debian/$(PACKAGE)/usr/lib/python$*/site-packages/$(PYMOD).egg-info 
 
45
        # remove zoneinfo, our patch to pytz makes it use the one from tzdata
 
46
        rm -rf debian/$(PACKAGE)/usr/lib/python$*/site-packages/pytz/zoneinfo
 
47
        # install our testing package
 
48
        install -D debian/test-pytz \
 
49
           debian/$(PACKAGE)/usr/lib/python-tz/test-pytz$*
 
50
        sed -i 's/@PYVERSION@/$*/' debian/$(PACKAGE)/usr/lib/python-tz/test-pytz$*
48
51
 
49
52
.PHONY: binary-common
50
53
binary-common:
54
57
        dh_installdocs
55
58
        dh_installexamples
56
59
        dh_installman
 
60
        dh_link
 
61
        dh_strip
57
62
        dh_compress
58
63
        dh_fixperms
59
64
        dh_pycentral
60
 
        rm -rf debian/python-tz/$(pycentraldir)/site-packages/pytz/zoneinfo
61
 
        ln -s /usr/share/zoneinfo debian/python-tz/$(pycentraldir)/site-packages/pytz/zoneinfo
62
65
        dh_makeshlibs
63
66
        dh_installdeb
 
67
        dh_shlibdeps
64
68
        dh_gencontrol
65
69
        dh_md5sums
66
70
        dh_builddeb
71
75
 
72
76
.PHONY: binary-arch
73
77
binary-arch: install
74
 
# nothing to do
 
78
        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
75
79
 
76
80
.PHONY: binary
77
81
binary: binary-indep binary-arch