]> git.pld-linux.org Git - packages/nss_ldapd.git/blob - nss_ldapd.spec
- up to 0.8.10
[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.8.10
10 Release:        1
11 License:        LGPL
12 Group:          Base
13 Source0:        http://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-%{version}.tar.gz
14 # Source0-md5:  8f76fefe50888bee09f7732102376342
15 Source1:        nslcd.init
16 Source2:        %{name}.tmpfiles
17 Patch0:         %{name}-no-root.patch
18 URL:            http://arthurdejong.org/nss-pam-ldapd/
19 BuildRequires:  autoconf
20 BuildRequires:  automake
21 BuildRequires:  cyrus-sasl-devel
22 BuildRequires:  heimdal-devel
23 BuildRequires:  openldap-devel >= 2.3.0
24 BuildRequires:  pam-devel
25 Requires(post,preun):   /sbin/chkconfig
26 Requires:       nslcd
27 Requires:       rc-scripts >= 0.2.0
28 Conflicts:      nss_ldap
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _libdir         /%{_lib}
32
33 %description
34 nss_ldapd is a C library extension (NSS module) and daemon which
35 allows X.500 and LDAP directory servers to be used as a primary source
36 of aliases, ethers, groups, hosts, networks, protocols, users, RPCs,
37 services and shadow passwords (instead of or in addition to using flat
38 files or NIS).
39
40 %description -l pl.UTF-8
41 Moduł serwisu nazw oraz osobny demon. Ten pakiet pozwala na
42 korzystanie z serwerów X.500 i LDAP jako źródła aliasów, grup, hostów,
43 sieci, protokołów, użytkowników, RPC, usług i haseł (zamiast lub
44 oprócz zwykłych plików lub NIS).
45
46 nss_ldapd jest forkiem projektu nss_ldap. Celem projektu jest
47 naprawienie pewnych problemów z nss_ldap poprzez wydzielenie kodu LDAP
48 do osobnego demona.
49
50 %package nslcd
51 Summary:        NSS LDAPD name service daemon
52 Summary(pl.UTF-8):      Demon serwisu nazw NSS LDAPD
53 Group:          Base
54 Provides:       nslcd
55
56 %description nslcd
57 NSS LDAPD name service daemon.
58
59 %description nslcd -l pl.UTF-8
60 Demon serwisu nazw NSS LDAPD.
61
62 %package pam
63 Summary:        NSS LDAPD Pluggable Authentication Module
64 Summary(pl.UTF-8):      Moduł PAM do uwierzytelniania z użyciem NSS LDAPD
65 Group:          Base
66 Requires:       nslcd
67 Conflicts:      pam-pam_ldap
68
69 %description pam
70 This is pam_ldap, a pluggable authentication module that can be used
71 with linux-PAM. This module supports authentication, account
72 management, password management and session management.
73
74 %description pam -l pl.UTF-8
75 To jest pam_ldap, wymienny moduł uwierzytelniania, który może być
76 użyty z linux-PAM. Moduł ten wspiera autentykację, obsługę kont,
77 zmianę haseł i obsługę sesji.
78
79 %prep
80 %setup -q -n nss-pam-ldapd-%{version}
81 %patch0 -p1
82
83 %build
84 %configure \
85         --with-pam-seclib-dir=/%{_lib}/security \
86         --with-ldap-lib=openldap
87
88 %{__make}
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d,/var/run/nslcd} \
93         $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
94
95 %{__make} install \
96         DESTDIR=$RPM_BUILD_ROOT
97
98 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nslcd
99 install %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %post -p /sbin/ldconfig
105 %postun -p /sbin/ldconfig
106
107 %pre nslcd
108 %useradd -u 21 -d /usr/share/empty -s /bin/false -c "NSS LDAP Cache Daemon User" -g nobody nslcd
109
110 %post nslcd
111 /sbin/chkconfig --add nslcd
112 %service nslcd restart "NSS LDAP Cache Daemon"
113
114 %preun nslcd
115 if [ "$1" = "0" ]; then
116         %service nslcd stop
117         /sbin/chkconfig --del nslcd
118 fi
119
120 %postun nslcd
121 if [ "$1" = "0" ]; then
122         %userremove nslcd
123 fi
124
125 %triggerpostun nslcd -- nss_ldapd < 0.7.0
126 if [ -e %{_sysconfdir}/nss-ldapd.conf.rpmsave ]; then
127         mv -f %{_sysconfdir}/nslcd.conf{,rpmnew}
128         mv -f %{_sysconfdir}/nss-ldapd.conf.rpmsave %{_sysconfdir}/nslcd.conf
129 fi
130
131 %files
132 %defattr(644,root,root,755)
133 %doc AUTHORS ChangeLog NEWS README
134 %attr(755,root,root) %{_libdir}/*.so*
135
136 %files nslcd
137 %defattr(644,root,root,755)
138 %attr(754,root,root) /etc/rc.d/init.d/nslcd
139 %attr(640,nslcd,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nslcd.conf
140 %attr(755,root,root) %{_sbindir}/nslcd
141 %{_mandir}/man5/nslcd.conf.5*
142 %{_mandir}/man8/nslcd.8*
143 %dir /var/run/nslcd
144 /usr/lib/tmpfiles.d/%{name}.conf
145
146 %files pam
147 %defattr(644,root,root,755)
148 %attr(755,root,root) /%{_lib}/security/pam_ldap.so
149 %{_mandir}/man8/pam_ldap.8*
This page took 0.073851 seconds and 3 git commands to generate.