2017-04-18 13:49:51 +02:00
|
|
|
#
|
|
|
|
# spec file for package libnss_usrfiles
|
|
|
|
#
|
2019-02-15 10:02:45 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-04-18 13:49:51 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-02-15 10:02:45 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-04-18 13:49:51 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: libnss_usrfiles
|
2019-02-15 10:02:45 +01:00
|
|
|
Version: 2.27
|
2017-04-18 13:49:51 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: NSS usrfiles plugin for glibc
|
2018-03-19 23:39:26 +01:00
|
|
|
License: LGPL-2.1-only
|
2017-04-18 13:49:51 +02:00
|
|
|
Group: System/Base
|
2019-02-15 10:02:45 +01:00
|
|
|
URL: http://github.com/kubic-project/libnss_usrfiles
|
|
|
|
Source: %{name}-%{version}.tar.xz
|
2017-04-18 13:49:51 +02:00
|
|
|
Source1: baselibs.conf
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
|
|
|
%description
|
2019-02-15 10:02:45 +01:00
|
|
|
The NSS usrfiles plugin additionally looks in /usr/etc for passwd and
|
2017-04-18 13:49:51 +02:00
|
|
|
group data.
|
|
|
|
|
|
|
|
%package -n libnss_usrfiles2
|
|
|
|
Summary: NSS usrfiles plugin for glibc
|
|
|
|
# we need cp
|
2018-01-09 14:55:12 +01:00
|
|
|
Group: System/Libraries
|
2017-04-18 13:49:51 +02:00
|
|
|
Requires(post): coreutils
|
|
|
|
Requires(post): glibc
|
|
|
|
Requires(post): sed
|
2019-02-15 10:02:45 +01:00
|
|
|
Requires(postun): glibc
|
|
|
|
Requires(postun): sed
|
2017-04-18 13:49:51 +02:00
|
|
|
|
|
|
|
%description -n libnss_usrfiles2
|
|
|
|
The NSS usrfiles plugin looks additional in %{_prefix}%{_sysconfdir} for passwd and
|
|
|
|
group data.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
%configure --libdir=/%{_lib}
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2018-03-19 23:39:26 +01:00
|
|
|
%make_install
|
2017-04-18 13:49:51 +02:00
|
|
|
rm -v %{buildroot}/%{_lib}/%{name}.{a,la,so}
|
2018-03-19 23:39:26 +01:00
|
|
|
mkdir -p %{buildroot}%{_prefix}%{_sysconfdir}
|
2017-04-18 13:49:51 +02:00
|
|
|
|
|
|
|
%post -n libnss_usrfiles2
|
|
|
|
/sbin/ldconfig
|
2019-02-15 10:02:45 +01:00
|
|
|
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
|
2017-04-18 13:49:51 +02:00
|
|
|
|
2019-02-15 10:02:45 +01:00
|
|
|
%postun -n libnss_usrfiles2
|
|
|
|
/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
|
2017-04-18 13:49:51 +02:00
|
|
|
|
|
|
|
%files -n libnss_usrfiles2
|
2018-03-19 23:39:26 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc README.md
|
2017-04-18 13:49:51 +02:00
|
|
|
/%{_lib}/libnss_usrfiles.so.2*
|
2018-03-19 23:39:26 +01:00
|
|
|
%dir %{_prefix}%{_sysconfdir}
|
2017-04-18 13:49:51 +02:00
|
|
|
|
|
|
|
%changelog
|