Source: libcap-ng Version: 0.7.7-3 Severity: wishlist Tags: patch Hi,
libcap-ng is part of the build-closure of essential and thus needs to be able to be cross built. On the other hand, cross building python extensions is currenty non-trivial as the python policy is not yet fully fleshed out wrt cross building. So to make cross building libcap-ng work today, I am proposing to make those python extensions optional via a nopython build profile. Refer to https://lists.debian.org/debian-cross/2016/04/msg00004.html for a rationale on the profile name. I am attaching a patch that adds the requested support and I hope that it is not a big maintenance cost. After applying it, libcap-ng cross builds just fine under the nopython profile. Please consider applying it. Helmut
--- libcap-ng-0.7.7/debian/changelog +++ libcap-ng-0.7.7/debian/changelog @@ -1,3 +1,10 @@ +libcap-ng (0.7.7-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Add nopython build profile (Closes: #-1) + + -- Helmut Grohne <[email protected]> Fri, 15 Jul 2016 00:46:48 +0200 + libcap-ng (0.7.7-3) unstable; urgency=high * Install libcap-ng so file to /lib (Closes: #829126, #828992) --- libcap-ng-0.7.7/debian/control +++ libcap-ng-0.7.7/debian/control @@ -3,13 +3,13 @@ Maintainer: Pierre Chifflier <[email protected]> Build-Depends: debhelper (>= 9), dh-autoreconf, - dh-python, + dh-python <!nopython>, autotools-dev, libattr1-dev, linux-kernel-headers, - swig, - python-all-dev, - python3-dev + swig <!nopython>, + python-all-dev <!nopython>, + python3-dev <!nopython> Standards-Version: 3.9.8 Section: libs X-Python-Version: >= 2.6 @@ -65,6 +65,7 @@ Section: python Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends} +Build-Profiles: <!nopython> Description: Python bindings for libcap-ng This library implements the user-space interfaces to the POSIX 1003.1e capabilities available in Linux kernels. These capabilities are @@ -81,6 +82,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends} Provides: ${python3:Provides} +Build-Profiles: <!nopython> Description: Python3 bindings for libcap-ng This library implements the user-space interfaces to the POSIX 1003.1e capabilities available in Linux kernels. These capabilities are --- libcap-ng-0.7.7/debian/rules +++ libcap-ng-0.7.7/debian/rules @@ -8,6 +8,11 @@ export DEB_BUILD_HARDENING=1 +ifneq ($(filter nopython,$(DEB_BUILD_PROFILES)),) +override_dh_auto_configure: + dh_auto_configure -- --without-python --without-python3 +endif + override_dh_install: mkdir -p $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH) && \ mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/lib*.so.0* $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/; \ @@ -24,5 +29,8 @@ : %: +ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),) dh $@ --with=python2,python3,autoreconf - +else + dh $@ --with=autoreconf +endif

