diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-01-14 08:17:39 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-01-14 08:17:39 +0100 |
commit | 00246334d3636784985d5da2f5edd3fce451eacf (patch) | |
tree | a7cf05dfd0884967166b563612b96f1988571fa9 | |
parent | 4d3220f78421a4f97ca83118a9ac08f0bd6bb6c7 (diff) |
Install the borg module on a non-standard path
-rwxr-xr-x | debian/rules | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules index 967ea14e..d638e5df 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,14 @@ #export DH_VERBOSE=1 + +# Do not install the borg package into the usual Python path: +# * Upstream does not consider its API stable. +# * We want to coinstall multiple versions of borg. +VERSION_SUFFIX=2 +MODULE_DIR=/usr/lib/borgbackup$(VERSION_SUFFIX) +PACKAGE=borgbackup$(VERSION_SUFFIX) + # Full hardening for the cython build. export DEB_BUILD_MAINT_OPTIONS=hardening=+all @@ -42,6 +50,9 @@ override_dh_clean: find . -name xxhash.h -delete find . -name xxhash.c -delete +override_dh_auto_configure: + dh_auto_configure -- --install-dir=$(MODULE_DIR) + override_dh_installdocs: python3 setup.py build_ext --inplace $(MAKE) -C docs html @@ -69,6 +80,11 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) LC_ALL=C.UTF-8 fakeroot dh_auto_test endif +execute_after_dh_install-arch: + set -e; for f in debian/$(PACKAGE)/usr/bin/*; do \ + sed -i -e '5asys.path.insert(0, "$(MODULE_DIR)")' "$$f"; \ + done + # Do not compress .ico file (affects html documentation) override_dh_compress: dh_compress -X.ico -Xfonts |