############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = pam_ldap version = 186 release = 2 groups = System/Base url = http://www.padl.com/OSS/pam_ldap.html license = GPL and LGPL summary = A pam/ldap module that supports password changes. description The pam_ldap module provides the means for Solaris and Linux servers \ and workstations to authenticate against LDAP directories, and to \ change their passwords in the directory. end # Always change this if the nss_ldap package has been updated! NSS_LDAP_VER = 265 source_dl = sources += nss_ldap-%{NSS_LDAP_VER}.tar.gz build requires autoconf automake openldap-devel pam-devel end configure_options += \ --sysconfdir=/etc \ --libdir=/%{lib} \ --mandir=/usr/share/man \ --with-ldap-conf-file=/etc/pam_ldap.conf \ --with-ldap-secret-file=/etc/pam_ldap.secret prepare_cmds # Extract source tarball of nss_ldap cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/nss_ldap-%{NSS_LDAP_VER}.tar.gz # Copy needed files from nss_ldap cd %{DIR_APP} && cp -av %{DIR_SRC}/nss_ldap-%{NSS_LDAP_VER}/resolve.c . cp -av %{DIR_SRC}/nss_ldap-%{NSS_LDAP_VER}/resolve.h . cp -av %{DIR_SRC}/nss_ldap-%{NSS_LDAP_VER}/snprintf.c . cp -av %{DIR_SRC}/nss_ldap-%{NSS_LDAP_VER}/snprintf.h . sed -i -e 's,^ldap.conf$$,pam_ldap.conf,g' *.5 sed -i -e 's,^/etc/ldap\.,/etc/pam_ldap.,g' *.5 sed -i -e 's,in ldap.co$nf,in pam_ldap.conf,g' *.5 sed -i -e 's,of ldap.conf,of pam_ldap.conf,g' *.5 sed -i -e 's,ldap.secret,pam_ldap.secret,g' *.5 sed -i -e 's,(ldap.conf),(pam_ldap.conf),g' *.5 autoreconf -f -i end make_build_targets += \ LDFLAGS="-Wl,-z,nodelete" install # Create directory layout mkdir -pv %{BUILDROOT}/{etc,%{lib}/security,%{libdir}} # Prevent to install an ldap.conf touch %{BUILDROOT}/etc/ldap.conf make install DESTDIR=%{BUILDROOT} rm -rvf %{BUILDROOT}/etc/ldap.conf # Install the default configuration file and change padl to example sed 's|dc=padl|dc=example|g' ldap.conf > %{BUILDROOT}/etc/pam_ldap.conf chmod 644 %{BUILDROOT}/etc/pam_ldap.conf # Create an empty ldap.secret file touch %{BUILDROOT}/etc/pam_ldap.secret end end packages package %{name} package %{name}-debuginfo template DEBUGINFO end end