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