| 1 |
|
| 2 |
|
| 3 |
export DEBVER=$(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') |
| 4 |
export DATETIME:=$(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p') |
| 5 |
export DATE_CMD:=env TZ=UTC LC_ALL=C.UTF-8 date |
| 6 |
export DATE:=$(shell $(DATE_CMD) --date="$(DATETIME)" "+%b %_d %Y") |
| 7 |
export TIME:=$(shell $(DATE_CMD) --date="$(DATETIME)" "+%H:%M:%S") |
| 8 |
export DEB_CFLAGS_MAINT_APPEND=-Wno-write-strings \ |
| 9 |
-DDATE=\""$(DATE)"\" \ |
| 10 |
-DTIME=\""$(TIME)"\" |
| 11 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 12 |
export PYBUILD_NAME=apt |
| 13 |
|
| 14 |
BUILDDIR3 := $(shell pybuild --print build_dir --interpreter python3) |
| 15 |
|
| 16 |
%: |
| 17 |
dh $@ --with python3,sphinxdoc --buildsystem=pybuild |
| 18 |
|
| 19 |
override_dh_auto_build: |
| 20 |
dh_auto_build |
| 21 |
PYTHONPATH=$(BUILDDIR3) sphinx-build doc/source build/sphinx/html |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
override_dh_auto_install: |
| 28 |
dh_auto_install |
| 29 |
mkdir -p debian/python-apt-common/usr/share/ |
| 30 |
mv debian/python3-apt/usr/share/locale debian/python-apt-common/usr/share/ |
| 31 |
mv debian/python3-apt/usr/share/python-apt debian/python-apt-common/usr/share/ |
| 32 |
rmdir debian/python3-apt/usr/share |
| 33 |
|
| 34 |
override_dh_installdocs: |
| 35 |
dh_installdocs -p python3-apt --link-doc=python3-apt |
| 36 |
dh_installdocs --remaining-packages |
| 37 |
|
| 38 |
override_dh_strip: |
| 39 |
dh_strip -p python3-apt |
| 40 |
|
| 41 |
override_dh_compress: |
| 42 |
dh_compress -X.js -X_static/* -X _sources/* -X_sources/*/* -X.inv |
| 43 |
|
| 44 |
|
| 45 |
override_dh_auto_test: export PYBUILD_SYSTEM=custom |
| 46 |
override_dh_auto_test: export PYBUILD_TEST_ARGS=env PYTHONPATH={build_dir} {interpreter} tests/test_all.py |
| 47 |
override_dh_auto_test: |
| 48 |
dh_auto_test || [ "$(DEB_BUILD_ARCH_OS)" = "hurd" ]; |