CPPFLAGS="${CPPFLAGS} -DCONF_DIR='\"${SYSCONFIG}\"'"
+PAM_SECURITY=${libdir}/security
+
+AC_ARG_WITH([pam-security], AC_HELP_STRING([--pam-security], [Use a custom pam security directory (default is $libdir/security)]),
+ [with_pam_security=$withval], [with_pam_security=no])
+AS_IF([test "x$with_pam_security" != xno], [PAM_SECURITY="${with_pam_security}"])
AC_ARG_ENABLE([btrfs], AC_HELP_STRING([--disable-btrfs],[Disable Btrfs internal snapshots support]),
[with_btrfs=$enableval],[with_btrfs=yes])
AC_SUBST(LIBVERSION_PATCHLEVEL)
AC_SUBST(LIBVERSION_INFO)
AC_SUBST(SYSCONFIG)
+AC_SUBST(PAM_SECURITY)
AC_SUBST(docdir)
AC_OUTPUT(
override_dh_auto_configure:
dh_auto_configure -- --docdir=/usr/share/doc/packages/snapper --disable-silent-rules \
- --disable-ext4 --enable-xattrs --disable-rollback --disable-btrfs-quota
+ --disable-ext4 --enable-xattrs --disable-rollback --disable-btrfs-quota \
+ --with-pam-security=/lib/security
override_dh_auto_install:
dh_auto_install
+-------------------------------------------------------------------
+Wed Jun 16 11:50:49 CEST 2021 - aschnell@suse.com
+
+- added configure option for location of PAM module
+ (gh#openSUSE/snapper#659)
+
-------------------------------------------------------------------
Mon May 17 08:39:58 CEST 2021 - aschnell@suse.com
AM_CPPFLAGS = -I$(top_srcdir) $(DBUS_CFLAGS)
-securelibdir = $(shell echo /`basename $(libdir)`/security)
+pam_security_libdir = @PAM_SECURITY@
-securelib_LTLIBRARIES = pam_snapper.la
+pam_security_lib_LTLIBRARIES = pam_snapper.la
pam_snapper_la_LDFLAGS = -no-undefined -avoid-version -module
pam_snapper_la_LIBADD = -lpam $(DBUS_LIBS)
#
-#Compat macro for new _fillupdir macro introduced in Nov 2017
+# Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
-# optionally build with test coverage reporting
+# Location for PAM module
+%if 0%{?usrmerged}
+%define pam_security_dir %{_libdir}/security
+%else
+%define pam_security_dir /%{_lib}/security
+%endif
+
+# Optionally build with test coverage reporting
%bcond_with coverage
Name: snapper
autoreconf -fvi
%configure \
- --docdir="%{_defaultdocdir}/snapper" \
+ --docdir="%{_defaultdocdir}/snapper" \
%if %{with coverage}
--enable-coverage \
%endif
+ --with-pam-security="%{pam_security_dir}" \
%if 0%{?suse_version} <= 1310
--disable-rollback \
%endif
%install
%make_install
-rm -f "%{buildroot}/%{_libdir}"/*.la "%{buildroot}/%{_lib}/security/pam_snapper.la"
+rm -f "%{buildroot}/%{_libdir}"/*.la "%{buildroot}/%{pam_security_dir}/pam_snapper.la"
rm -f %{buildroot}/etc/cron.hourly/suse.de-snapper
rm -f %{buildroot}/etc/cron.daily/suse.de-snapper
%files -n pam_snapper
%defattr(-,root,root)
-/%{_lib}/security/pam_snapper.so
+/%{pam_security_dir}/pam_snapper.so
%dir /usr/lib/pam_snapper
/usr/lib/pam_snapper/*.sh
%doc %{_mandir}/*/pam_snapper.8*