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