handle with variables
authormirabilos <t.glaser@tarent.de>
Sat, 2 Dec 2017 23:52:54 +0000 (00:52 +0100)
committermirabilos <t.glaser@tarent.de>
Sat, 2 Dec 2017 23:52:54 +0000 (00:52 +0100)
debian/rules

index 9e509df..3d58296 100755 (executable)
@@ -122,6 +122,8 @@ DEBHELPER_VERSION:= 9
 DSC_DEPS:=             debhelper (>= ${DEBHELPER_VERSION})
 SUBST_VARS+=           DSC_DEPS
 
+SELINUX_ARCHS:=                linux-any
+
 ifeq (${USE_LIBC},dietlibc)
 DSC_DEPS:=             ${DSC_DEPS}, dietlibc-dev
 USE_SHARED:=0
@@ -155,6 +157,10 @@ ifneq (,$(findstring debug,${DEB_BUILD_OPTIONS}))
 EXTRA_CFLAGS+=         -g3
 endif
 
+ifneq (,$(findstring lenny,${DEB_BUILD_OPTIONS}))
+SELINUX_ARCHS:=                !kfreebsd-i386 !kfreebsd-amd64 !hurd-i386
+endif
+
 ifneq (,$(wildcard /usr/share/dpkg/buildflags.mk))
 # dpkg-dev (>= 1.16.1~)
 DEB_CFLAGS_MAINT_APPEND=${EXTRA_CFLAGS}
@@ -217,8 +223,7 @@ DSC_DEPS:=          ${DSC_DEPS}, libtinfo-dev | libncurses-dev
 endif
 
 ifeq (1,${USE_SELINUX})
-#DSC_DEPS:=            ${DSC_DEPS}, libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386]
-DSC_DEPS:=             ${DSC_DEPS}, libselinux1-dev [linux-any]
+DSC_DEPS:=             ${DSC_DEPS}, libselinux1-dev [$(strip ${SELINUX_ARCHS})]
 endif
 
 ifeq (,$(findstring noautotools,${DEB_BUILD_OPTIONS}))