1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#!/usr/bin/make -f
# 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_installdocs
dh_installman
dh_installlogrotate
# 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
|