~ubuntu-branches/ubuntu/wily/python-networkx/wily

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-03-02 01:06:32 UTC
  • mfrom: (1.2.1 upstream) (3.1.3 hardy)
  • Revision ID: james.westby@ubuntu.com-20080302010632-1lp6qe1orf59jl8b
* debian/control:
   + Replace python-setuptools with python-pkg-resources in the
     “Recommends:” since pkg_resources is now available in this
     separate package, thanks Matthias Klose (Closes: #468721).
* debian/copyright:
   + Use “© $years $name” instead of invalid “$name, $years” and
     “(C) $years, $name”, thanks to lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
# Uncomment this to turn on verbose mode.
10
10
#export DH_VERBOSE=1
11
11
 
12
 
include /usr/share/dpatch/dpatch.make
13
 
 
14
 
 
15
 
CFLAGS = -Wall -g
16
 
 
17
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18
 
        CFLAGS += -O0
19
 
else
20
 
        CFLAGS += -O2
21
 
endif
22
 
 
23
 
configure: configure-stamp
24
 
configure-stamp:
25
 
        dh_testdir
26
 
        # Add here commands to configure the package.
27
 
        # Fix a missing +x
28
 
        chmod +x networkx/tests/test.py
29
 
        
30
 
 
31
 
        touch configure-stamp
32
 
 
33
 
 
34
 
build: patch build-stamp
35
 
 
36
 
build-stamp: configure-stamp 
37
 
        dh_testdir
38
 
 
39
 
        # Add here commands to compile the package.
40
 
        #$(MAKE)
41
 
 
42
 
        touch $@
 
12
PYSUPPORT_DIR=debian/python-networkx/usr/share/python-support/python-networkx
 
13
 
 
14
include /usr/share/quilt/quilt.make
 
15
 
 
16
build: patch
43
17
 
44
18
clean: clean-patched unpatch
45
19
 
46
20
clean-patched:
47
21
        dh_testdir
48
22
        dh_testroot
49
 
        rm -f build-stamp configure-stamp
50
23
 
51
24
        # Add here commands to clean up after the build process.
52
25
        -rm -r build
53
26
 
54
 
        dh_clean 
 
27
        # Make sure that there's no .pyc left
 
28
        find . -name '*.pyc' -exec rm {} ';'
 
29
 
 
30
        # This directory is generated during the build
 
31
        rm -rf networkx.egg-info
 
32
 
 
33
        dh_clean
55
34
 
56
35
install: build
57
36
        dh_testdir
58
37
        dh_testroot
59
 
        dh_clean -k 
 
38
        dh_clean -k
60
39
        dh_installdirs
61
40
 
62
 
        # Add here commands to install the package into debian/python-networkx.
63
 
        #$(MAKE) install DESTDIR=$(CURDIR)/debian/python-networkx
64
 
        python setup.py install --root=$(CURDIR)/debian/python-networkx
65
 
 
66
 
        # Remove all *.pyc files, created in the postinst
67
 
        find $(CURDIR)/debian/python-networkx -name "*.pyc" -exec rm {} ';'
68
 
 
69
 
        # Install a lintian override about a missing +x, due to dh_pysupport
70
 
        install -d $(CURDIR)/debian/python-networkx/usr/share/lintian/overrides
71
 
        cp $(CURDIR)/debian/python-networkx.lintian-overrides \
72
 
                $(CURDIR)/debian/python-networkx/usr/share/lintian/overrides/python-networkx
 
41
        # Install w/o compiling *.pyc files
 
42
        # Install egg-info directories (--single-... option)
 
43
        python setup_egg.py install --no-compile --root=$(CURDIR)/debian/python-networkx \
 
44
                --single-version-externally-managed
 
45
 
 
46
        # Do some cleanup: delete unneeded files
 
47
        for i in Credits.txt Download.txt GNU_LGPL.txt Install.txt Legal.txt; do \
 
48
                rm $(CURDIR)/debian/python-networkx/usr/share/doc/python-networkx/$$i ; \
 
49
        done
 
50
 
 
51
        # Empty dir...
 
52
        rmdir $(CURDIR)/debian/python-networkx/usr/share/doc/python-networkx/data
 
53
 
 
54
        # Rename Readme.txt to README
 
55
        mv $(CURDIR)/debian/python-networkx/usr/share/doc/python-networkx/Readme.txt \
 
56
                $(CURDIR)/debian/python-networkx/usr/share/doc/python-networkx/README
73
57
 
74
58
 
75
59
# Build architecture-independent files here.
76
60
binary-indep: build install
77
 
# We have nothing to do by default.
78
 
 
79
 
# Build architecture-dependent files here.
80
 
binary-arch: build install
81
61
        dh_testdir
82
62
        dh_testroot
83
 
        dh_installchangelogs 
 
63
        dh_installchangelogs
84
64
        dh_installdocs
85
65
        dh_installexamples
86
 
#       dh_install
87
66
        dh_pysupport
 
67
        chmod +x ${PYSUPPORT_DIR}/networkx/tests/test.py
88
68
        dh_installman
89
69
        dh_link
90
 
        dh_strip
91
70
        dh_compress
92
 
#       dh_makeshlibs
93
71
        dh_installdeb
94
 
        dh_shlibdeps
95
72
        dh_gencontrol
96
73
        dh_md5sums
97
74
        dh_builddeb
98
75
 
 
76
# Build architecture-dependent files here.
 
77
binary-arch: build install
 
78
# We have nothing to do by default.
 
79
 
99
80
binary: binary-indep binary-arch
100
 
.PHONY: build clean binary-indep binary-arch binary install configure
 
81
.PHONY: build clean binary-indep binary-arch binary install