summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:22:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:22:53 +0000
commitf4b22a2f215f6f80558d9e4075c9de306c8b9953 (patch)
tree05142dd668b11fc304d1c15faa52dee3784f8fa0 /debian/rules
parentAdding upstream version 1.5.2. (diff)
downloadpam-debian/1.5.2-6+deb12u1.tar.xz
pam-debian/1.5.2-6+deb12u1.zip
Adding debian version 1.5.2-6+deb12u1.debian/1.5.2-6+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules71
1 files changed, 71 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..b6dcfa1
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,71 @@
+#!/usr/bin/make -f
+
+DEB_LDFLAGS_MAINT_APPEND := -Wl,-z,defs
+DEB_CFLAGS_MAINT_APPEND := $(shell getconf LFS_CFLAGS)
+DEB_BUILD_MAINT_OPTIONS := hardening=+bindnow
+export DEB_LDFLAGS_MAINT_APPEND DEB_CFLAGS_MAINT_APPEND DEB_BUILD_MAINT_OPTIONS
+ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_OS),hurd)
+DEB_LDFLAGS_MAINT_APPEND += -lpthread
+endif
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+LC_COLLATE=C
+export LC_COLLATE
+
+export QUILT_PATCH_DIR = debian/patches-applied
+
+d = $(CURDIR)/debian
+dl = $(d)/local
+
+%:
+ dh $@ --with quilt,autoreconf
+
+# avoid libaudit-dev when bootstrapping
+ifneq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
+ CONFIGURE_OPTS += --disable-audit
+endif
+
+override_dh_auto_configure:
+ dh_auto_configure -- --enable-static --enable-shared \
+ --libdir=/lib/$(DEB_HOST_MULTIARCH) \
+ --enable-isadir=/lib/security \
+ --with-systemdunitdir=/usr/lib/systemd/system \
+ --disable-nis \
+ $(CONFIGURE_OPTS)
+
+# .install files don't have "except for" handling, so we need to exclude
+# our module that doesn't match right here
+override_dh_install:
+ dh_install
+ # Make sure the md5sums for the templates we ship are
+ # recognized by pam-auth-update.
+ for f in common-auth common-session common-session-noninteractive common-account common-password; do \
+ if grep -q $$(perl debian/template-md5sum debian/local/$$f ) debian/local/pam-auth-update; then \
+ echo $$f okay; \
+ else \
+ echo md5sum for $$f not registered in debian/local/pam-auth-update; \
+ echo use debian/template-md5sum to compute; \
+ exit 2; \
+ fi; \
+ done
+
+
+
+# again, excluding files by hand; also, build our local manpage for pam_getenv
+# from the XML
+override_dh_installman:
+ pod2man --section 8 --release="Debian GNU/Linux" $(dl)/pam_getenv >$(dl)/pam_getenv.8
+ dh_installman
+ rm -f $(d)/libpam-modules/usr/share/man/man5/pam.conf.5
+ rm -f $(d)/libpam-modules/usr/share/man/man8/pam_timestamp_check.8
+ rm -f $(d)/libpam-modules/usr/share/man/man8/pam_namespace_helper.8
+
+# using perms that differ from upstream (sgid instead of suid) /and/ that
+# dh_fixperms doesn't want
+override_dh_fixperms:
+ dh_fixperms
+ifneq (,$(findstring libpam-modules, $(shell dh_listpackages)))
+ chgrp shadow $(d)/libpam-modules-bin/sbin/unix_chkpwd
+ chmod 02755 $(d)/libpam-modules-bin/sbin/unix_chkpwd
+endif