From 855e222c0dd056f4f4014b9bad9cf22b5c606c36 Mon Sep 17 00:00:00 2001 Message-Id: <855e222c0dd056f4f4014b9bad9cf22b5c606c36.1717793380.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 27 Nov 2019 21:04:53 +0000 Subject: [PATCH] debian/rules: Build using the provided Makefile. Organization: Straylight/Edgeware From: Mark Wooding There were several problems with the old system. Firstly, it only actually worked by accident: setting an explicit build directory caused Debhelper to search there for a makefile (which it didn't find, for obvious reasons) and fall back to the Python distutils system. That would be OK, but only because there's only been one Python version I've wanted to support in Debian for ages; but that's likely to change. And it won't run tests properly. Instead, delete the `-B' option (which will break the upcoming tests). Now Debhelper will build via the Makefile. Set the `PYTHONS' environment variable to the Python versions supported in Debian. And set the prefix correctly during installation. --- debian/rules | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index f2ab49c..bbbe5a0 100755 --- a/debian/rules +++ b/debian/rules @@ -1,2 +1,7 @@ #! /usr/bin/make -f -%:; dh $@ --parallel -Bdebian/build --with=python2 +%:; dh $@ --parallel --with=python2 + +export PYTHONS := $(shell pyversions -r) + +override_dh_auto_install: + dh_auto_install -- prefix=/usr -- [mdw]