Accepting request 922003 from Linux-PAM

- Use spec file macros for pam (boo#1190950)

OBS-URL: https://build.opensuse.org/request/show/922003
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pam_dbus?expand=0&rev=6
This commit is contained in:
Dominique Leuenberger 2021-09-28 17:16:46 +00:00 committed by Git OBS Bridge
commit 48e820d975
2 changed files with 19 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Sep 28 12:58:00 UTC 2021 - Dr. Werner Fink <werner@suse.de>
- Use spec file macros for pam (boo#1190950)
-------------------------------------------------------------------
Thu Aug 19 07:35:01 UTC 2021 - Dr. Werner Fink <werner@suse.de>

View File

@ -48,6 +48,12 @@ Requires: python3
Requires: python3-base
Requires: python3-notify2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if ! %{defined _pam_moduledir}
%define _pam_moduledir /%{_lib}/security
%endif
%if ! %{defined _pam_libdir}
%define _pam_libdir /%{_lib}
%endif
%description
This PAM module will, when being used to authenticate a
@ -59,7 +65,7 @@ test -h %{name}-%{version} || ln -sf darcs-mirror-pam-dbus.debian-%{commit} %{na
%setup -q -D
%patch0
%patch1
sed -ri '/^PAM_MODDIR/{ s@/lib/@/%{_lib}/@p }' configure.ac
sed -ri '/^PAM_MODDIR/{ s@/lib/@%{_pam_libdir}/@p }' configure.ac
autoreconf -fis
%build
@ -68,16 +74,21 @@ make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
rm -vf %{buildroot}/%{_lib}/security/*.la
rm -vf %{buildroot}%{_pam_moduledir}/*.la
install -d %{buildroot}%{_mandir}/man8
install -m 0644 %{S:1} %{buildroot}%{_mandir}/man8
%files
%defattr(-,root,root)
%if %{defined license}
%license LICENSE
%doc README
%else
%doc README LICENSE
%endif
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/%{name}.conf
%config(noreplace) %{_sysconfdir}/xdg/autostart/pam-dbus-notify.desktop
%attr(0755, root, root) /%{_lib}/security/%{name}.so
%attr(0755, root, root) %{_pam_moduledir}/%{name}.so
%dir %{_datadir}/%{name}/
%attr(0755, root, root) %{_datadir}/%{name}/pam-dbus-notify
%{_mandir}/man8/%{name}.8*