]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - pam_ldap/pam_ldap.nm
Move all packages to root.
[people/ms/ipfire-3.x.git] / pam_ldap / pam_ldap.nm
CommitLineData
fc65a79e 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
fc65a79e
SS
4###############################################################################
5
802ea3af
MT
6name = pam_ldap
7version = 186
8release = 1
fc65a79e 9
802ea3af
MT
10groups = System/Base
11url = http://www.padl.com/OSS/pam_ldap.html
12license = GPL and LGPL
13summary = A pam/ldap module that supports password changes.
fc65a79e 14
802ea3af 15description
fc65a79e
SS
16 The pam_ldap module provides the means for Solaris and Linux servers \
17 and workstations to authenticate against LDAP directories, and to \
18 change their passwords in the directory.
802ea3af 19end
fc65a79e 20
09a030e4
SS
21# Always change this if the nss_ldap package has been updated!
22NSS_LDAP_VER = 265
23
802ea3af
MT
24source_dl =
25sources += nss_ldap-%{NSS_LDAP_VER}.tar.gz
26
27build
28 requires
29 autoconf
30 automake
31 openldap-devel
32 pam-devel
33 end
34
35 configure_options += \
36 --sysconfdir=/etc \
37 --libdir=/lib \
38 --mandir=/usr/share/man \
39 --with-ldap-conf-file=/etc/pam_ldap.conf \
40 --with-ldap-secret-file=/etc/pam_ldap.secret
41
42 prepare_cmds
43 # Extract source tarball of nss_ldap
44 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/nss_ldap-%{NSS_LDAP_VER}.tar.gz
45
46 # Copy needed files from nss_ldap
47 cd %{DIR_APP} && cp -av %{DIR_SRC}/nss_ldap-%{NSS_LDAP_VER}/resolve.c .
48 cp -av %{DIR_SRC}/nss_ldap-%{NSS_LDAP_VER}/resolve.h .
49 cp -av %{DIR_SRC}/nss_ldap-%{NSS_LDAP_VER}/snprintf.c .
50 cp -av %{DIR_SRC}/nss_ldap-%{NSS_LDAP_VER}/snprintf.h .
51
52 sed -i -e 's,^ldap.conf$$,pam_ldap.conf,g' *.5
53 sed -i -e 's,^/etc/ldap\.,/etc/pam_ldap.,g' *.5
54 sed -i -e 's,in ldap.co$nf,in pam_ldap.conf,g' *.5
55 sed -i -e 's,of ldap.conf,of pam_ldap.conf,g' *.5
56 sed -i -e 's,ldap.secret,pam_ldap.secret,g' *.5
57 sed -i -e 's,(ldap.conf),(pam_ldap.conf),g' *.5
58
59 autoreconf -f -i
60 end
61
62 make_build_targets += \
63 LDFLAGS="-Wl,-z,nodelete"
64
65 install
66 # Create directory layout
67 mkdir -pv %{BUILDROOT}/{etc,/lib/security,/usr/lib}
68
69 # Prevent to install an ldap.conf
70 touch %{BUILDROOT}/etc/ldap.conf
71 make install DESTDIR=%{BUILDROOT}
72 rm -rvf %{BUILDROOT}/etc/ldap.conf
73
74 # Install the default configuration file and change padl to example
75 sed 's|dc=padl|dc=example|g' ldap.conf > %{BUILDROOT}/etc/pam_ldap.conf
76 chmod 644 %{BUILDROOT}/etc/pam_ldap.conf
77
78 # Create an empty ldap.secret file
79 touch %{BUILDROOT}/etc/pam_ldap.secret
80 end
81end
82
83packages
84 package %{name}
85end