File libnss_usrfiles.spec of Package libnss_usrfiles (Revision f9ec116cb4ed021c0d788afa4f0ecdfe)
Currently displaying revision f9ec116cb4ed021c0d788afa4f0ecdfe , Show latest
75
1
#
2
# spec file for package libnss_usrfiles
3
#
4
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
18
19
# We need some private NSS functions
20
%define __filter_GLIBC_PRIVATE 1
21
Name: libnss_usrfiles
22
Version: 2.25
23
Release: 0
24
Summary: NSS usrfiles plugin for glibc
25
License: LGPL-2.1-only
26
Group: System/Base
27
URL: http://github.com/thkukuk/libnss_usrfiles
28
Source: %{name}-%{version}.tar.bz2
29
Source1: baselibs.conf
30
BuildRequires: autoconf
31
BuildRequires: libtool
32
33
%description
34
The NSS usrfiles plugin additionally looks in %{_prefix}%{_sysconfdir} for passwd and
35
group data.
36
37
%package -n libnss_usrfiles2
38
Summary: NSS usrfiles plugin for glibc
39
# we need cp
40
Group: System/Libraries
41
Requires(post): coreutils
42
Requires(post): glibc
43
Requires(post): sed
44
45
%description -n libnss_usrfiles2
46
The NSS usrfiles plugin looks additional in %{_prefix}%{_sysconfdir} for passwd and
47
group data.
48
49
%prep
50
%setup -q
51
52
%build
53
%configure --libdir=/%{_lib}
54
make %{?_smp_mflags}
55
56
%install
57
%make_install
58
rm -v %{buildroot}/%{_lib}/%{name}.{a,la,so}
59
mkdir -p %{buildroot}%{_prefix}%{_sysconfdir}
60
61
%post -n libnss_usrfiles2
62
/sbin/ldconfig
63
cp -a %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.nss_usrfiles
64
sed -i -e 's|^passwd: compat$|passwd: files usrfiles|g' -e 's|^group: compat$|group: files usrfiles|g' %{_sysconfdir}/nsswitch.conf
65
66
%postun -n libnss_usrfiles2 -p /sbin/ldconfig
67
68
%files -n libnss_usrfiles2
69
%license COPYING
70
%doc README.md
71
/%{_lib}/libnss_usrfiles.so.2*
72
%dir %{_prefix}%{_sysconfdir}
73
74
%changelog
75