~ubuntu-branches/ubuntu/gutsy/matplotlib/gutsy

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2007-07-31 23:04:56 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070731230456-lfmr0h69yh1i37w1
Tags: 0.90.1-2ubuntu1
* Merge from Debian unstable. Remaining changes:
  + debian/rules:
    - Check only the files for the python version which just got installed
      (fixes FTBFS).
    - Modify Maintainer value to match DebianMaintainerField spec.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#export DH_VERBOSE=1
8
8
 
9
9
PYVERS := $(shell pyversions -v -r debian/control)
 
10
DEFPY := $(shell pyversions -v -d)
10
11
pd  := python-matplotlib-doc
11
12
p   := python-matplotlib
12
13
pdata := python-matplotlib-data
13
14
 
 
15
#users_guide_ver := 0.87.1
 
16
users_guide := users_guide_*.pdf
 
17
 
14
18
# Include dpatch stuff.
15
19
include /usr/share/dpatch/dpatch.make
16
20
 
23
27
build-indep-stamp:
24
28
        dh_testdir
25
29
        ## Building documentation...
26
 
        mkdir -p doc
27
 
        which xvfb-run && sh -c "cd doc; xvfb-run epydoc -n matplotlib ../lib/matplotlib/*; cd -;" || true
 
30
        #mkdir -p doc
 
31
        #which xvfb-run && sh -c "cd doc; xvfb-run epydoc -n matplotlib ../lib/matplotlib/*; cd -;" || true
28
32
        #wget http://matplotlib.sourceforge.net/$(users_guide)
29
33
        touch build-indep-stamp
30
34
 
41
45
clean-patched: patch
42
46
        dh_testdir
43
47
        dh_testroot
44
 
        for v in $(PYVERS); do \
45
 
          python$$v ./setup.py clean --all; \
46
 
        done
47
 
        rm -f *-stamp*
48
 
        rm -rf build *.pyc *.pyo *.pdf doc/html/
 
48
        #python2.3 ./setup.py clean --all
 
49
        for i in $(PYVERS); do python$(i) ./setup.py clean --all; done
 
50
        -rm -f *-stamp*
 
51
        -rm -rf build *.pyc *.pyo
49
52
        find ./lib -name '*.pyc' -exec rm {} \;
50
53
        dh_clean
51
 
        sh $(CURDIR)/debian/mkcopyright.sh
 
54
        #sh $(CURDIR)/debian/mkcopyright.sh
52
55
 
53
56
# install
54
57
install-arch: build-arch $(PYVERS:%=install-stamp-%)
60
63
        dh_testroot
61
64
        python$* ./setup.py install_lib \
62
65
                -d $(CURDIR)/debian/$(p)/usr/lib/python$*/site-packages/ --no-compile
63
 
        #dh_install -p$(p) lib/dateutil usr/lib/python$*/site-packages/
64
 
        #dh_install -p$(p) lib/pytz usr/lib/python$*/site-packages/
 
66
        rm -rf $(CURDIR)/debian/$(p)/usr/lib/python$*/site-packages/matplotlib/mpl-data/
 
67
        rm -rf $(CURDIR)/debian/$(p)/usr/lib/python$*/site-packages/matplotlib/backends/Matplotlib.nib/
65
68
 
66
 
        # Check that we have built all of the plugins; FTBFS if not; this
 
69
        # Check that we have built all of the plugins for the default python version; FTBFS if not; this
67
70
        # is better than having packages silently fail to build on the
68
71
        # autobuilders.
69
72
        # The plugin abbreviations are:
95
98
        dh_testdir -i
96
99
        dh_testroot -i
97
100
        dh_clean -k
98
 
        python ./setup.py install_data -d $(CURDIR)/debian/$(pdata)/usr/share
99
 
 
100
 
        rm -fr $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/Vera*.ttf
 
101
        dh_install -p python-matplotlib-data
 
102
##      python ./setup.py install --no-compile --prefix $(CURDIR)/debian/$(pdata)/usr
 
103
        rm -fr $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/fonts/ttf/Vera*.ttf
 
104
        rm -fr $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/fonts/ttf/*.TXT
 
105
        rm -fr $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/fonts/ttf/local.conf
 
106
        rm -fr $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/fonts/pdfcorefonts/readme.txt
101
107
 
102
108
        # make svg images not executable:
103
 
        chmod 644 $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/*.svg
 
109
##      chmod 644 $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/*.svg
104
110
 
105
111
        # move .matplotlibrc to /etc
106
 
        mkdir $(CURDIR)/debian/$(pdata)/etc/
107
 
        mv $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/matplotlibrc \
108
 
                $(CURDIR)/debian/$(pdata)/etc/matplotlibrc
 
112
##      mkdir $(CURDIR)/debian/$(pdata)/etc/
 
113
##      mv $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/matplotlibrc \
 
114
##              $(CURDIR)/debian/$(pdata)/etc/matplotlibrc
109
115
 
110
116
# binary
111
117
binary-indep: build-indep install-indep
114
120
        dh_installchangelogs -i CHANGELOG
115
121
        dh_installdocs -p$(pd) -i
116
122
        dh_installexamples -p$(pd) -i examples/*
117
 
        -dh_install -p$(pd) doc/* usr/share/doc/$(pd)
118
 
        dh_compress -i -Xexamples -Xexamples/data
 
123
##      dh_install -p$(pd) -i ./$(users_guide) usr/share/doc/$(pd)/pdf 
 
124
        dh_compress -i -Xexamples -Xexamples/data -Xpdf
119
125
        dh_fixperms -i
120
126
        dh_installdeb -i
121
127
        dh_gencontrol -i