summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:08:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:08:06 +0000
commitba6d96469df143b52295f8e79da648bf8a597407 (patch)
tree5ea0c3374f5c53209ad02008dcdddfc8ccae92e5 /Makefile
parentInitial commit. (diff)
downloaddh-python-ba6d96469df143b52295f8e79da648bf8a597407.tar.xz
dh-python-ba6d96469df143b52295f8e79da648bf8a597407.zip
Adding upstream version 5.20230130+deb12u1.upstream/5.20230130+deb12u1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f660604
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,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