]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - nss_ldap/nss_ldap.nm
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-3.x
[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 = 4
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 --with-ldap-lib=openldap \
51 --enable-rfc2307bis \
52 --with-ldap-conf-file=/etc/nss_ldap.conf \
53 --with-ldap-secret-file=/etc/nss_ldap.secret
54
55 prepare_cmds
56 sed -i -e 's,^ldap.conf$$,nss_ldap.conf,g' *.5
57 sed -i -e 's,^/etc/ldap\.,/etc/nss_ldap.,g' *.5
58 sed -i -e 's,ldap.secret,nss_ldap.secret,g' *.5
59 sed -i -e 's,(ldap.conf),(nss_ldap.conf),g' *.5
60
61 # Fix call for vers_string.
62 sed -e "s/vers_string/.\/&/g" -i Makefile*
63
64 autoreconf -vfi
65 end
66
67 make_build_targets += \
68 LDFLAGS="-Wl,-z,nodelete"
69
70 make_install_targets += \
71 LIBC_VERS=%{version}
72
73 install_cmds
74 # Remove awkward directory
75 rm -rvf %{BUILDROOT}/usr/usr
76
77 ln -svf libnss_ldap-%{version}.so %{BUILDROOT}%{libdir}/libnss_ldap.so
78 ln -svf libnss_ldap.so.2 %{BUILDROOT}%{libdir}/libnss_ldap.so
79
80 rm -vf %{BUILDROOT}/etc/nsswitch.ldap
81
82 cd %{DIR_APP} && sed 's|dc=padl|dc=example|g' ldap.conf > \
83 %{BUILDROOT}/etc/nss_ldap.conf
84 touch %{BUILDROOT}/etc/nss_ldap.secret
85 end
86 end
87
88 packages
89 package %{name}
90 requires
91 %{libdir}/security/pam_ldap.so
92 end
93
94 configfiles
95 %{sysconfdir}/nss_ldap.conf
96 %{sysconfdir}/nss_ldap.secret
97 end
98 end
99
100 package %{name}-debuginfo
101 template DEBUGINFO
102 end
103 end