see Changelog
[mining-tools:carnarvon.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Maintainer: Alvaro Navarro <anavarro@signal11.org>
4 #
5 package=carnarvon
6
7
8 SRCTOP    := $(shell if  "$$PWD" != "" ; then echo $$PWD; else pwd; fi)
9 DESTDIR    = $(SRCTOP)/debian/tmp/
10
11 BIN_DIR = $(DESTDIR)/usr/bin
12 SHARE_DIR = $(DESTDIR)/usr/share/carnarvon
13 PYTHON24 = /usr/bin/python2.4
14
15 # rules
16 build: build-stamp
17 build-stamp:
18         dh_testdir
19
20         @echo "--- Compiling for python2.4"
21         $(PYTHON24) setup.py build
22
23         touch build-stamp
24
25 install: install-stamp
26 install-stamp: build
27         dh_testdir
28         dh_testroot
29
30         @echo "  -- Installing for python2.4"
31         $(PYTHON24) setup.py install --root $(DESTDIR)
32
33         @echo "  -- Cleaning build from *.py[co] files"
34         -find debian -name '*.py[co]' | xargs -n 50 rm -f
35
36         touch install-stamp
37
38 clean:
39         dh_testdir
40         dh_testroot
41         @echo "-- Cleaning"
42         rm -f build-stamp install-stamp
43         rm -rf build
44         find . -name "*.py[co]" -exec rm -f {} \;
45         dh_clean
46
47 # Build architecture-independent files here.
48 binary-indep: install
49         dh_testdir -i
50         dh_testroot -i
51         dh_install -i
52         dh_installchangelogs -i ChangeLog
53
54         dh_compress -i
55         dh_fixperms -i
56         dh_installdeb -i
57         dh_gencontrol -i
58         dh_md5sums -i
59         dh_builddeb -i
60
61 # Build architecture-dependent files here.
62 binary-arch: install
63
64 binary: binary-indep binary-arch
65 .PHONY: binary binary-arch binary-indep clean build