Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37846793
en ru br
ALT Linux repos
S:0.9.12-alt1
5.0: 0.6.8-alt1
4.1: 0.4.1-alt2
4.0: 0.4.1-alt0.2.M40.1

Group :: System/Base
RPM: nss-ldapd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%def_disable test
%def_disable debug
%def_disable krb

Name: nss-ldapd
Version: 0.4.1
Release: alt0.2.M40.1

Summary: NSS module for name lookups using LDAP
License: LGPL
Group: System/Base

Url: http://ch.tudelft.nl/~arthur/nss-ldapd/
Source0: %url/%name-%version.tar.gz
Source1: nslcd.init
Patch1: alt-saslauxprop.fix

Requires: nscd
Requires(post): %post_service
Requires(preun): %preun_service

Conflicts: nss_ldap

# Automatically added by buildreq on Sat Nov 03 2007

BuildRequires: libkrb5-devel libldap-devel libsasl2-devel

%description
This is a fork of the nss_ldap  package by PADL Software Pty
Ltd.. This fork was done to implement some structural design
changes. These changes were needed because there are some issues
with the original design. See documentation for more details.

These problems are solved by splitting the library in two parts:
a daemon that connects to the LDAP server and does all the
requests and a thin NSS connector that passes requests to the
daemon through a socket. The nss-ldapd implementation has a
number of advantages:

   * lighter NSS library
   * simpler internal semantics
   * clear separation between NSS and LDAP code (the server part
     could easily be implemented in another language)
   * less connections to the LDAP server

The fork is also a major code overhaul having a number
of simplifications and removal of old compatibility code.
Compatibility will be re-added with later releases of nss-ldapd
for those platforms that need it.

%prep
%setup
%patch1 -p1

%build
autoreconf -fisv

%configure \
--with-ldap-conf-file=%_sysconfdir/nss-ldapd.conf \
--with-ldap-secret-file=%_sysconfdir/nss-ldapd.secret \
--with-ldap-lib=openldap \
%if_enabled krb
--enable-configurable-krb5-ccname-gssapi \
--enable-configurable-krb5-ccname-env \
--with-gssapi-dir=%_includedir/krb5/gssapi \
%endif
%if_enabled debug
--enable-debugging
%endif

%make_build SYSLIBDIR=/%_lib
%make check

%install
mkdir -p $RPM_BUILD_ROOT{%_sysconfdir,%_libdir,/%_lib}

# Install the nsswitch module.

%make_install  SYSLIBDIR=/%_lib install \
DESTDIR=$RPM_BUILD_ROOT \
INST_UID=`id -un` INST_GID=`id -gn`

mv $RPM_BUILD_ROOT%_libdir/* $RPM_BUILD_ROOT/%_lib/
install -pD -m755 %SOURCE1 %buildroot%_initdir/nslcd
chmod 755 $RPM_BUILD_ROOT/%_lib/*.so*
chmod 600 $RPM_BUILD_ROOT%_sysconfdir/nss-ldapd.conf

mkdir -pm711 %buildroot/var/run/nslcd
mksock %buildroot/var/run/nslcd/socket

%pre
/usr/sbin/useradd -M -o -r -d / -s /dev/null -c "NSS-LDAP Daemon" _nslcd ||:

%post
%post_service nslcd

%preun
%preun_service nslcd

%files
/%_lib/*.so*
%_initdir/nslcd
%_sbindir/nslcd
%attr(600,_nslcd,_nslcd) %config(noreplace) %_sysconfdir/nss-ldapd.conf
%attr(711,_nslcd,root) %dir /var/run/nslcd
%attr(666,_nslcd,_nslcd) %ghost /var/run/nslcd/socket
%doc AUTHORS ChangeLog HACKING NEWS README TODO
%doc %_man5dir/*
%doc %_man8dir/*


%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin