]> git.pld-linux.org Git - packages/nss_ldapd.git/blob - nss_ldapd.spec
ba4fa2a18d469e66f20c6b50c9cebb88d7e53480
[packages/nss_ldapd.git] / nss_ldapd.spec
1 # TODO:
2 # - consider name change
3 #
4 Summary:        LDAP Name Service Switch Module
5 Summary(es.UTF-8):      Biblioteca NSS para LDAP
6 Summary(pl.UTF-8):      Moduł NSS LDAP
7 Summary(pt_BR.UTF-8):   Biblioteca NSS para LDAP
8 Name:           nss_ldapd
9 Version:        0.9.2
10 Release:        4.1
11 License:        LGPL v2.1+
12 Group:          Base
13 Source0:        http://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-%{version}.tar.gz
14 # Source0-md5:  0c60d4c300dd9a4fb40b6ba7abeed8a2
15 Source1:        nslcd.init
16 Source2:        nslcd.service
17 Source3:        nslcd.tmpfiles
18 Patch0:         %{name}-no-root.patch
19 Patch1:         optimize-queries.patch
20 Patch2:         ntohl-signedness.patch
21 Patch3:         fix-to_date.patch
22 URL:            http://arthurdejong.org/nss-pam-ldapd/
23 BuildRequires:  autoconf >= 2.61
24 BuildRequires:  automake
25 BuildRequires:  cyrus-sasl-devel
26 BuildRequires:  docbook2X
27 BuildRequires:  heimdal-devel
28 BuildRequires:  openldap-devel >= 2.3.0
29 BuildRequires:  pam-devel
30 BuildRequires:  rpmbuild(macros) >= 1.671
31 Requires:       nslcd = %{version}-%{release}
32 Conflicts:      nss_ldap
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         _libdir         /%{_lib}
36
37 %description
38 nss_ldapd is a C library extension (NSS module) and daemon which
39 allows X.500 and LDAP directory servers to be used as a primary source
40 of aliases, ethers, groups, hosts, networks, protocols, users, RPCs,
41 services and shadow passwords (instead of or in addition to using flat
42 files or NIS).
43
44 %description -l pl.UTF-8
45 Moduł serwisu nazw oraz osobny demon. Ten pakiet pozwala na
46 korzystanie z serwerów X.500 i LDAP jako źródła aliasów, grup, hostów,
47 sieci, protokołów, użytkowników, RPC, usług i haseł (zamiast lub
48 oprócz zwykłych plików lub NIS).
49
50 nss_ldapd jest forkiem projektu nss_ldap. Celem projektu jest
51 naprawienie pewnych problemów z nss_ldap poprzez wydzielenie kodu LDAP
52 do osobnego demona.
53
54 %package nslcd
55 Summary:        NSS LDAPD name service daemon
56 Summary(pl.UTF-8):      Demon serwisu nazw NSS LDAPD
57 Group:          Base
58 Requires(post,preun):   /sbin/chkconfig
59 Requires(post,preun,postun):    systemd-units >= 38
60 Requires:       rc-scripts >= 0.2.0
61 Requires:       systemd-units >= 38
62 Provides:       nslcd = %{version}-%{release}
63
64 %description nslcd
65 NSS LDAPD name service daemon.
66
67 %description nslcd -l pl.UTF-8
68 Demon serwisu nazw NSS LDAPD.
69
70 %package nslcd-utils
71 Summary:        Utilities using NSLCD for LDAPD operations
72 Summary(pl.UTF-8):      Demon serwisu nazw NSS LDAPD
73 Group:          Base
74 Requires:       nslcd = %{version}-%{release}
75
76 %description nslcd-utils
77 Utilities using NSLCD for LDAPD operations.
78
79 %description nslcd-utils -l pl.UTF-8
80 Narzędzia wykorzystujące NSLCD do operacji LDAP-owych.
81
82 %package pam
83 Summary:        NSS LDAPD Pluggable Authentication Module
84 Summary(pl.UTF-8):      Moduł PAM do uwierzytelniania z użyciem NSS LDAPD
85 Group:          Base
86 Requires:       nslcd = %{version}-%{release}
87 Conflicts:      pam-pam_ldap
88
89 %description pam
90 This is pam_ldap, a pluggable authentication module that can be used
91 with linux-PAM. This module supports authentication, account
92 management, password management and session management.
93
94 %description pam -l pl.UTF-8
95 To jest pam_ldap, wymienny moduł uwierzytelniania, który może być
96 użyty z linux-PAM. Moduł ten wspiera autentykację, obsługę kont,
97 zmianę haseł i obsługę sesji.
98
99 %prep
100 %setup -q -n nss-pam-ldapd-%{version}
101 %patch0 -p1
102 %patch1 -p1
103 %patch2 -p1
104 %patch3 -p1
105
106 %{__sed} -i -e '1s|#!.*|#!%{__python}|' utils/*.py
107
108 %build
109 %configure \
110         DOCBOOK2X_MAN=/usr/bin/docbook2X2man \
111         --with-pam-seclib-dir=/%{_lib}/security \
112         --with-ldap-lib=openldap
113
114 %{__make}
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d,/var/run/nslcd} \
119         $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}}
120
121 %{__make} install \
122         DESTDIR=$RPM_BUILD_ROOT
123
124 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nslcd
125 install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/nslcd.service
126 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nslcd.conf
127
128 %clean
129 rm -rf $RPM_BUILD_ROOT
130
131 %post   -p /sbin/ldconfig
132 %postun -p /sbin/ldconfig
133
134 %pre nslcd
135 %useradd -u 21 -d /usr/share/empty -s /bin/false -c "NSS LDAP Cache Daemon User" -g nobody nslcd
136
137 %post nslcd
138 /sbin/chkconfig --add nslcd
139 %service nslcd restart "NSS LDAP Cache Daemon"
140 %systemd_post nslcd.service
141
142 %preun nslcd
143 if [ "$1" = "0" ]; then
144         %service nslcd stop
145         /sbin/chkconfig --del nslcd
146 fi
147 %systemd_preun nslcd.service
148
149 %postun nslcd
150 if [ "$1" = "0" ]; then
151         %userremove nslcd
152 fi
153 %systemd_reload
154
155 %triggerpostun nslcd -- nss_ldapd < 0.7.0
156 if [ -e %{_sysconfdir}/nss-ldapd.conf.rpmsave ]; then
157         mv -f %{_sysconfdir}/nslcd.conf{,rpmnew}
158         mv -f %{_sysconfdir}/nss-ldapd.conf.rpmsave %{_sysconfdir}/nslcd.conf
159 fi
160
161 %triggerpostun nslcd -- nslcd < 0.9.2-1
162 %systemd_trigger nslcd.service
163
164 %files
165 %defattr(644,root,root,755)
166 %doc AUTHORS ChangeLog NEWS README TODO
167 %attr(755,root,root) %{_libdir}/libnss_ldap.so.2
168
169 %files nslcd
170 %defattr(644,root,root,755)
171 %attr(754,root,root) /etc/rc.d/init.d/nslcd
172 %{systemdunitdir}/nslcd.service
173 %attr(640,nslcd,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nslcd.conf
174 %attr(755,root,root) %{_sbindir}/nslcd
175 %{_mandir}/man5/nslcd.conf.5*
176 %{_mandir}/man8/nslcd.8*
177 %dir /var/run/nslcd
178 %{systemdtmpfilesdir}/nslcd.conf
179
180 %files nslcd-utils
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_bindir}/chsh.ldap
183 %attr(755,root,root) %{_bindir}/getent.ldap
184 %attr(755,root,root) %{_datadir}/nslcd-utils/chsh.py
185 %dir %{_datadir}/nslcd-utils
186 %{_datadir}/nslcd-utils/cmdline.py
187 %{_datadir}/nslcd-utils/constants.py
188 %attr(755,root,root) %{_datadir}/nslcd-utils/getent.py
189 %{_datadir}/nslcd-utils/nslcd.py
190 %{_datadir}/nslcd-utils/shells.py
191 %{_datadir}/nslcd-utils/users.py
192 %{_datadir}/nslcd-utils/*.py[co]
193 %{_mandir}/man1/chsh.ldap.1*
194 %{_mandir}/man1/getent.ldap.1*
195
196 %files pam
197 %defattr(644,root,root,755)
198 %attr(755,root,root) /%{_lib}/security/pam_ldap.so
199 %{_mandir}/man8/pam_ldap.8*
This page took 0.035522 seconds and 2 git commands to generate.