~ubuntu-branches/ubuntu/trusty/python-gnuplot/trusty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2002-04-11 08:52:48 UTC
  • Revision ID: james.westby@ubuntu.com-20020411085248-lq0l4xzelis5waq8
Tags: 1.5-3
Build-depend on python-numeric (closes: #142080).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/make -f
 
2
# -*- makefile -*-
 
3
 
 
4
# Uncomment this to turn on verbose mode.
 
5
#export DH_VERBOSE=1
 
6
export DH_COMPAT=2
 
7
 
 
8
p       := python-gnuplot
 
9
d       := debian/$(p)
 
10
PV      := 2.1
 
11
pylib   := usr/lib/python$(PV)/site-packages
 
12
 
 
13
build:
 
14
        python setup.py build
 
15
 
 
16
clean:
 
17
        dh_clean
 
18
        python setup.py clean
 
19
        -find -name '*.py[co]' | xargs rm -f
 
20
 
 
21
# Build architecture-independent files here.
 
22
binary-indep: build
 
23
        dh_testdir
 
24
        dh_testroot
 
25
 
 
26
        : # install it
 
27
        dh_installdirs -i $(pylib)/Gnuplot usr/share/doc/$(p)
 
28
        python setup.py install --prefix=$(d)/usr
 
29
        -find $(d) -name '*.py[co]' | xargs rm -f
 
30
 
 
31
        install -m 755 debian/datafile.py $(d)/$(pylib)/.
 
32
        dh_installdocs -i \
 
33
                ANNOUNCE.txt CREDITS.txt NEWS.txt README.txt TODO.txt \
 
34
                debian/README.datafile
 
35
        cp -a doc $(d)/usr/share/doc/$(p)/html
 
36
        dh_installexamples -i demo.py test.py
 
37
        dh_link /$(pylib)/Gnuplot /usr/share/doc/$(p)/examples/Gnuplot
 
38
        dh_link /$(pylib)/datafile.py /usr/share/doc/$(p)/examples/datafile.py
 
39
 
 
40
        : # make python scripts starting with '#!' executable
 
41
        for i in `find debian -mindepth 2 -type f ! -perm 755`; do \
 
42
          if head -1 $$i | grep -q '^#!'; then \
 
43
            chmod 755 $$i; \
 
44
            echo "made executable: $$i"; \
 
45
          fi; \
 
46
        done
 
47
 
 
48
        dh_installchangelogs -i
 
49
        dh_compress -i -X.py
 
50
        dh_fixperms -i
 
51
        dh_installdeb -i
 
52
        dh_gencontrol -i
 
53
        dh_md5sums -i
 
54
        dh_builddeb -i
 
55
 
 
56
# Build architecture-dependent files here.
 
57
binary-arch: build
 
58
# We have nothing to do by default.
 
59
 
 
60
source diff:
 
61
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
62
 
 
63
binary: binary-indep binary-arch
 
64
.PHONY: build clean binary-indep binary-arch binary