Accepting request 725012 from devel:CaaSP
- Remove post %install section to make it generic useable OBS-URL: https://build.opensuse.org/request/show/725012 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnss_usrfiles?expand=0&rev=5
This commit is contained in:
parent
d17d95774c
commit
3adf8a1bf9
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 21 13:28:54 CEST 2019 - kukuk@suse.de
|
||||||
|
|
||||||
|
- Remove post %install section to make it generic useable
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Feb 2 09:48:41 UTC 2019 - kukuk@suse.de
|
Sat Feb 2 09:48:41 UTC 2019 - kukuk@suse.de
|
||||||
|
|
||||||
|
@ -29,22 +29,16 @@ BuildRequires: autoconf
|
|||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The NSS usrfiles plugin additionally looks in /usr/etc for passwd and
|
The NSS usrfiles plugin additionally looks in /usr/etc for passwd,
|
||||||
group data.
|
group, rpc, services, protocols and more.
|
||||||
|
|
||||||
%package -n libnss_usrfiles2
|
%package -n libnss_usrfiles2
|
||||||
Summary: NSS usrfiles plugin for glibc
|
Summary: NSS usrfiles plugin for glibc
|
||||||
# we need cp
|
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Requires(post): coreutils
|
|
||||||
Requires(post): glibc
|
|
||||||
Requires(post): sed
|
|
||||||
Requires(postun): glibc
|
|
||||||
Requires(postun): sed
|
|
||||||
|
|
||||||
%description -n libnss_usrfiles2
|
%description -n libnss_usrfiles2
|
||||||
The NSS usrfiles plugin looks additional in %{_prefix}%{_sysconfdir} for passwd and
|
The NSS usrfiles plugin additionally looks in /usr/etc for passwd,
|
||||||
group data.
|
group, rpc, services, protocols and more.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
@ -56,31 +50,14 @@ make %{?_smp_mflags}
|
|||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
rm -v %{buildroot}/%{_lib}/%{name}.{a,la,so}
|
rm -v %{buildroot}/%{_lib}/%{name}.{a,la,so}
|
||||||
mkdir -p %{buildroot}%{_prefix}%{_sysconfdir}
|
|
||||||
|
|
||||||
%post -n libnss_usrfiles2
|
%post -n libnss_usrfiles2 -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
if [ "$1" = 1 ] ; then
|
|
||||||
cp -a %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.nss_usrfiles
|
|
||||||
sed -i -e 's|^passwd: compat$|passwd: files usrfiles|g' -e 's|^group: compat$|group: files usrfiles|g' %{_sysconfdir}/nsswitch.conf
|
|
||||||
for service in aliases ethers protocols rpc services ; do
|
|
||||||
sed -i -e "s|\(^${service}:[[:space:]]\+files\)|\1 usrfiles|g" %{_sysconfdir}/nsswitch.conf
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun -n libnss_usrfiles2
|
%postun -n libnss_usrfiles2 -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
if [ "$1" = 0 ] ; then
|
|
||||||
sed -i -e 's|^passwd: files usrfiles$|passwd: compat|g' -e 's|^group: files usrfiles$|group: compat|g' %{_sysconfdir}/nsswitch.conf
|
|
||||||
for service in aliases ethers protocols rpc services ; do
|
|
||||||
sed -i -e "s|usrfiles||g" %{_sysconfdir}/nsswitch.conf
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files -n libnss_usrfiles2
|
%files -n libnss_usrfiles2
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc README.md
|
%doc README.md
|
||||||
/%{_lib}/libnss_usrfiles.so.2*
|
/%{_lib}/libnss_usrfiles.so.2*
|
||||||
%dir %{_prefix}%{_sysconfdir}
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user