diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:07:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:07:42 +0000 |
commit | eaf88682290091dc1b564804fecd0c28993d3242 (patch) | |
tree | c9019f56dc16e66d1388d6aa2800a00fd14b9746 /debian/rules | |
parent | Adding upstream version 2.7.6. (diff) | |
download | python-apt-eaf88682290091dc1b564804fecd0c28993d3242.tar.xz python-apt-eaf88682290091dc1b564804fecd0c28993d3242.zip |
Adding debian version 2.7.6.debian/2.7.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..10ce354 --- /dev/null +++ b/debian/rules @@ -0,0 +1,48 @@ +#!/usr/bin/make -f +# Should be include-links, but that somehow fails. +export DEBVER=$(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') +export DATETIME:=$(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p') +export DATE_CMD:=env TZ=UTC LC_ALL=C.UTF-8 date +export DATE:=$(shell $(DATE_CMD) --date="$(DATETIME)" "+%b %_d %Y") +export TIME:=$(shell $(DATE_CMD) --date="$(DATETIME)" "+%H:%M:%S") +export DEB_CFLAGS_MAINT_APPEND=-Wno-write-strings \ + -DDATE=\""$(DATE)"\" \ + -DTIME=\""$(TIME)"\" +export DEB_BUILD_MAINT_OPTIONS=hardening=+all +export PYBUILD_NAME=apt + +BUILDDIR3 := $(shell pybuild --print build_dir --interpreter python3) + +%: + dh $@ --with python3,sphinxdoc --buildsystem=pybuild + +override_dh_auto_build: + dh_auto_build + PYTHONPATH=$(BUILDDIR3) sphinx-build doc/source build/sphinx/html + +# this is nasty. instead of installing the files to one dir, overriding +# common ones, and then us picking out the files we want, we have to move some +# files from python3-apt to python-apt-common and then delete it from other +# packages. +override_dh_auto_install: + dh_auto_install + mkdir -p debian/python-apt-common/usr/share/ + mv debian/python3-apt/usr/share/locale debian/python-apt-common/usr/share/ + mv debian/python3-apt/usr/share/python-apt debian/python-apt-common/usr/share/ + rmdir debian/python3-apt/usr/share + +override_dh_installdocs: + dh_installdocs -p python3-apt --link-doc=python3-apt + dh_installdocs --remaining-packages + +override_dh_strip: + dh_strip -p python3-apt + +override_dh_compress: + dh_compress -X.js -X_static/* -X _sources/* -X_sources/*/* -X.inv + +# We ignore failures on hurd, since its locking is broken +override_dh_auto_test: export PYBUILD_SYSTEM=custom +override_dh_auto_test: export PYBUILD_TEST_ARGS=env PYTHONPATH={build_dir} {interpreter} tests/test_all.py +override_dh_auto_test: + dh_auto_test || [ "$(DEB_BUILD_ARCH_OS)" = "hurd" ]; |