]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - nss_ldap/nss_ldap.nm
b5293ab93a35679ac1ff5208a282de375633eb63
[people/amarx/ipfire-3.x.git] / nss_ldap / nss_ldap.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = nss_ldap
7 version = 265
8 release = 2
9
10 groups = System/Base
11 url = http://www.padl.com/
12 license = LGPLv2+
13 summary = NSS library and PAM module for LDAP.
14
15 description
16 This package includes two LDAP access clients: nss_ldap and
17 pam_ldap. Nss_ldap is a set of C library extensions that allow
18 X.500 and LDAP directory servers to be used as a primary source
19 of aliases, ethers, groups, hosts, networks, protocol, users,
20 RPCs, services, and shadow passwords.
21 end
22
23 source_dl =
24
25 patches = \
26 nss_ldap-265-depth.patch \
27 nss_ldap-254-soname.patch \
28 nss_ldap-257-mozldap.patch \
29 nss_ldap-259-res_init.patch \
30 nss_ldap-264-checkcase.patch \
31 nss_ldap-265-ent_internal.patch \
32 nss_ldap-264-cloexec.patch \
33 nss_ldap-265-local_users.patch \
34 nss_ldap-265-erange.patch \
35 nss_ldap-265-initgroups-minimum_uid.patch \
36 nss_ldap-265-fix-uninit.patch \
37 nss_ldap-265-padl-bug-418.patch \
38 nss_ldap-265-setnetgrent.patch
39
40 build
41 requires
42 autoconf
43 automake
44 cyrus-sasl-devel
45 openldap-devel
46 end
47
48 configure_options += \
49 --sysconfdir=/etc \
50 --libdir=/lib \
51 --with-ldap-lib=openldap \
52 --enable-rfc2307bis \
53 --with-ldap-conf-file=/etc/nss_ldap.conf \
54 --with-ldap-secret-file=/etc/nss_ldap.secret
55
56 prepare_cmds
57 sed -i -e 's,^ldap.conf$$,nss_ldap.conf,g' *.5
58 sed -i -e 's,^/etc/ldap\.,/etc/nss_ldap.,g' *.5
59 sed -i -e 's,ldap.secret,nss_ldap.secret,g' *.5
60 sed -i -e 's,(ldap.conf),(nss_ldap.conf),g' *.5
61
62 # Fix call for vers_string.
63 sed -e "s/vers_string/.\/&/g" -i Makefile*
64
65 autoreconf -vfi
66 end
67
68 make_build_targets += \
69 LDFLAGS="-Wl,-z,nodelete"
70
71 make_install_targets += \
72 LIBC_VERS=%{version}
73
74 install_cmds
75 # Remove awkward directory
76 rm -rvf %{BUILDROOT}/usr/usr
77
78 mv -v %{BUILDROOT}/lib/* %{BUILDROOT}/usr/lib
79 rm -rvf %{BUILDROOT}/lib
80 ln -svf libnss_ldap-%{version}.so %{BUILDROOT}/usr/lib/libnss_ldap.so
81
82 rm -vf %{BUILDROOT}/etc/nsswitch.ldap
83
84 cd %{DIR_APP} && sed 's|dc=padl|dc=example|g' ldap.conf > \
85 %{BUILDROOT}/etc/nss_ldap.conf
86 touch %{BUILDROOT}/etc/nss_ldap.secret
87
88 ln -svf libnss_ldap.so.2 %{BUILDROOT}/usr/lib/libnss_ldap.so
89 end
90 end
91
92 packages
93 package %{name}
94 requires
95 /lib/security/pam_ldap.so
96 end
97 end
98 end