Source: pam-python
Version: 1.1.0~git20220701.1d4e111-2
Tags: patch
User: [email protected]
Usertags: cross-satisfiability

pam-python cannot be cross built from source, because its sphinx
dependency is not satisfiable. Fortunately, the documentation is
separated to an arch:all package. Therefore sphinx can be skipped in
arch-only builds such as cross builds. I'm attaching a patch that fully
separates the library and the documentation build into arch/indep. I
used reproducible builds to verify that this refactoring does not change
output artifacts. I note that there was a --system=pybuild flag that was
ignored by debhelper to select a build system, --buildsystem should have
been used. I dropped the confusing flag and retained the detected
makefile buildsystem.

Helmut
diff -Nru pam-python-1.1.0~git20220701.1d4e111/debian/changelog 
pam-python-1.1.0~git20220701.1d4e111/debian/changelog
--- pam-python-1.1.0~git20220701.1d4e111/debian/changelog       2024-09-12 
09:58:03.000000000 +0200
+++ pam-python-1.1.0~git20220701.1d4e111/debian/changelog       2026-02-28 
15:54:11.000000000 +0100
@@ -1,3 +1,10 @@
+pam-python (1.1.0~git20220701.1d4e111-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fully separate arch/indep builds. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Sat, 28 Feb 2026 15:54:11 +0100
+
 pam-python (1.1.0~git20220701.1d4e111-2) unstable; urgency=high
 
   * Source only upload.
diff -Nru pam-python-1.1.0~git20220701.1d4e111/debian/control 
pam-python-1.1.0~git20220701.1d4e111/debian/control
--- pam-python-1.1.0~git20220701.1d4e111/debian/control 2024-09-06 
13:36:28.000000000 +0200
+++ pam-python-1.1.0~git20220701.1d4e111/debian/control 2026-02-28 
15:54:11.000000000 +0100
@@ -3,14 +3,14 @@
 Priority: optional
 Maintainer: Russell Stuart <[email protected]>
 Build-Depends: debhelper-compat (= 13),
-  dh-python,
   python3,
   python3-dev,
   python3-doc,
   python3-pam,
   python3-setuptools,
-  python3-sphinx,
   libpam0g-dev | libpam-dev
+Build-Depends-Arch: dh-sequence-python3
+Build-Depends-Indep: python3-sphinx
 Standards-Version: 4.7.0
 Rules-Requires-Root: no
 Homepage: https://github.com/sunweaver/pam-python/
diff -Nru pam-python-1.1.0~git20220701.1d4e111/debian/rules 
pam-python-1.1.0~git20220701.1d4e111/debian/rules
--- pam-python-1.1.0~git20220701.1d4e111/debian/rules   2024-06-11 
01:50:02.000000000 +0200
+++ pam-python-1.1.0~git20220701.1d4e111/debian/rules   2026-02-28 
15:54:11.000000000 +0100
@@ -9,11 +9,22 @@
 export LIBDIR = /usr/lib/$(DEB_HOST_MULTIARCH)/security
 
 %:
-       dh $@ --with python3 --system=pybuild
+       dh $@
 
-override_dh_install:
+override_dh_auto_build-arch:
+       dh_auto_build --sourcedirectory=src
+
+override_dh_auto_build-indep:
+       dh_auto_build --sourcedirectory=doc
+
+override_dh_auto_install-arch:
+       dh_auto_install --sourcedirectory=src
+
+override_dh_auto_install-indep:
+       dh_auto_install --sourcedirectory=doc
+
+execute_before_dh_install-indep:
        mv debian/tmp/usr/share/doc/pam_python 
debian/tmp/usr/share/doc/libpam-python
-       dh_install
 
 override_dh_auto_test:
        :

Reply via email to