]> git.mxchange.org Git - quix0rs-apt-p2p.git/blob - debian/rules
Fix some Lintian warnings
[quix0rs-apt-p2p.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 PYTHON_VERSION=$(shell /usr/bin/python -V 2>&1 | /usr/bin/perl -le 'print "$$1.$$2" if <> =~m/^Python\s+(\d+)\.(\d+)(\.\d+)*/')
7
8 build: build-arch build-indep
9 build-arch: build-stamp
10 build-indep: build-stamp
11
12 build-stamp: apt-p2p.8 apt-p2p.conf.5
13         dh_testdir
14         touch build-stamp
15
16 %.5 %.8: debian/%.sgml
17         /usr/bin/docbook-to-man $< > debian/$@
18
19 clean:
20         dh_testdir
21         dh_testroot
22         rm -rf build/ apt_p2p/*.pyc apt_p2p_Khashmir/*.pyc *.pyc
23         rm -f debian/*.[58]
24         rm -f build-stamp
25         dh_clean
26
27 install: build-stamp
28
29
30         dh_testdir
31         dh_testroot
32         dh_clean -k
33         dh_installdirs
34
35         ./setup.py install --prefix=$(CURDIR)/debian/apt-p2p/usr \
36                 --install-lib=$(CURDIR)/debian/apt-p2p/usr/share/python-support/apt-p2p \
37                 --install-scripts=$(CURDIR)/debian/apt-p2p/usr/sbin
38
39         # Remove the generated .pyc files
40         ( cd debian/apt-p2p/usr/share/python-support/apt-p2p/apt_p2p_Khashmir && \
41           rm -f *.pyc  && \
42           cd ../apt_p2p && \
43           rm -f *.pyc )
44
45 # Build architecture-independent files here.
46 binary-indep: install
47         dh_testdir
48         dh_testroot
49         dh_installdocs
50         dh_installman
51         dh_installlogrotate
52         
53         # Remove the .py from the end of each of these
54         mv debian/apt-p2p/usr/sbin/apt-p2p.py debian/apt-p2p/usr/sbin/apt-p2p
55
56         dh_installchangelogs 
57         dh_install
58         dh_link
59         dh_compress
60         dh_fixperms
61         dh_pysupport
62         dh_installinit
63         dh_installdeb
64         dh_shlibdeps
65         dh_gencontrol
66         dh_md5sums
67         dh_builddeb
68
69 binary: binary-indep binary-arch
70 .PHONY: build clean binary-indep binary-arch binary install