2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
8 PYTHON_VERSION=$(shell /usr/bin/python -V 2>&1 | /usr/bin/perl -le 'print "$$1.$$2" if <> =~m/^Python\s+(\d+)\.(\d+)(\.\d+)*/')
11 build-stamp: apt-dht.8 apt-dht.conf.5
15 %.5 %.8: debian/%.sgml
16 /usr/bin/docbook-to-man $< > debian/$@
21 rm -rf build/ apt_dht/*.pyc apt_dht_Khashmir/*.pyc *.pyc
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
38 # Remove the generated .pyc files
39 ( cd debian/apt-dht/usr/share/python-support/apt-dht/apt_dht_Khashmir && \
44 # Build architecture-independent files here.
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
67 binary: binary-indep binary-arch
68 .PHONY: build clean binary-indep binary-arch binary install