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
|
include /usr/share/dpkg/pkg-info.mk
REPORTBUG_VERSION := $(shell python3 -c "import reportbug; print(reportbug.VERSION_NUMBER)")
%:
dh $@ --with=python3
override_dh_auto_build:
# Test if versions are synchronized (only if releasing); this will bomb if not synced
if [ "$(DEB_DISTRIBUTION)" != "UNRELEASED" -a "$(REPORTBUG_VERSION)" != "$(DEB_VERSION)" ] ; \
then \
echo 'Please update VERSION_NUMBER variable in reportbug/__init__.py'; exit 1 ; \
fi
python3 setup.py build
override_dh_auto_install:
python3 setup.py install --root $(CURDIR)/debian/reportbug --install-layout=deb
mv $(CURDIR)/debian/reportbug/usr/lib $(CURDIR)/debian/python3-reportbug/usr
chmod 0755 $(CURDIR)/debian/reportbug/usr/bin/*
cp -p conf/reportbug.conf $(CURDIR)/debian/reportbug/etc
override_dh_installman:
dh_installman man/*
|