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
|
#!/usr/bin/make -f
INSTALL ?= install
PREFIX ?= /usr/local
MANPAGES ?= pybuild.1 pybuild-autopkgtest.1 dh_python3.1
DVERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: (.+),\1,p' || echo 'DEVEL')
VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p' || echo 'DEVEL')
clean:
make -C tests clean
make -C pydist clean
find . -name '*.py[co]' -delete
find . -name __pycache__ -type d | xargs rm -rf
rm -f .coverage $(MANPAGES)
rm -rf .pybuild
dist:
git archive --format=tar --prefix=dh-python-$(VERSION)/ HEAD \
| xz -9 -c >../dh-python_$(VERSION).orig.tar.xz
install:
$(INSTALL) -m 755 -d $(DESTDIR)$(PREFIX)/bin \
$(DESTDIR)$(PREFIX)/share/debhelper/autoscripts/ \
$(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/ \
$(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Buildsystem/ \
$(DESTDIR)$(PREFIX)/share/dh-python/dhpython/build \
$(DESTDIR)$(PREFIX)/share/dh-python/dist
$(INSTALL) -m 644 pydist/*_fallback $(DESTDIR)$(PREFIX)/share/dh-python/dist/
$(INSTALL) -m 644 dhpython/*.py $(DESTDIR)$(PREFIX)/share/dh-python/dhpython/
$(INSTALL) -m 644 dhpython/build/*.py $(DESTDIR)$(PREFIX)/share/dh-python/dhpython/build/
$(INSTALL) -m 755 pybuild $(DESTDIR)$(PREFIX)/share/dh-python/
$(INSTALL) -m 755 pybuild-autopkgtest $(DESTDIR)$(PREFIX)/share/dh-python/
$(INSTALL) -m 755 dh_python3 $(DESTDIR)$(PREFIX)/share/dh-python/
sed -i -e 's/DEVELV/$(DVERSION)/' $(DESTDIR)$(PREFIX)/share/dh-python/pybuild
sed -i -e 's/DEVELV/$(DVERSION)/' $(DESTDIR)$(PREFIX)/share/dh-python/dh_python3
$(INSTALL) -m 644 dh/pybuild.pm $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Buildsystem/
$(INSTALL) -m 644 dh/python3.pm $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/
$(INSTALL) -m 644 autoscripts/* $(DESTDIR)$(PREFIX)/share/debhelper/autoscripts/
%.1: %.rst
rst2man $< > $@
%.htm: %.rst
rst2html $< > $@
manpages: $(MANPAGES)
dist_fallback:
make -C pydist $@
# TESTS
nose:
#nosetests3 --verbose --with-doctest --with-coverage
nose2-3 --verbose --plugin nose2.plugins.doctests --with-doctest
tests: nose
make -C tests
test%:
make -C tests $@
.PHONY: clean tests test% check_versions
|