#!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 PYTHON_VERSION=$(shell /usr/bin/python -V 2>&1 | /usr/bin/perl -le 'print "$$1.$$2" if <> =~m/^Python\s+(\d+)\.(\d+)(\.\d+)*/') build-stamp: apt-p2p.8 apt-p2p.conf.5 dh_testdir touch build-stamp %.5 %.8: debian/%.sgml /usr/bin/docbook-to-man $< > debian/$@ clean: dh_testdir dh_testroot rm -rf build/ apt_p2p/*.pyc apt_p2p_Khashmir/*.pyc *.pyc rm -f debian/*.[58] rm -f build-stamp dh_clean install: build-stamp dh_testdir dh_testroot dh_clean -k dh_installdirs ./setup.py install --prefix=$(CURDIR)/debian/apt-p2p/usr \ --install-lib=$(CURDIR)/debian/apt-p2p/usr/share/python-support/apt-p2p \ --install-scripts=$(CURDIR)/debian/apt-p2p/usr/sbin # Remove the generated .pyc files ( cd debian/apt-p2p/usr/share/python-support/apt-p2p/apt_p2p_Khashmir && \ rm -f *.pyc && \ cd ../apt_p2p && \ rm -f *.pyc ) # Build architecture-independent files here. binary-indep: install dh_testdir dh_testroot dh_installdebconf dh_installdocs dh_installman # Remove the .py from the end of each of these mv debian/apt-p2p/usr/sbin/apt-p2p.py debian/apt-p2p/usr/sbin/apt-p2p dh_installchangelogs dh_install dh_link dh_compress dh_fixperms dh_pysupport dh_installinit dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install