1 | # $Id: Portfile 22503 2007-03-03 07:17:50Z landonf@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name openldap |
---|
5 | version 2.3.34 |
---|
6 | categories databases |
---|
7 | maintainers landonf@macports.org bchesneau@mac.com |
---|
8 | description OpenLDAP Software |
---|
9 | long_description OpenLDAP Software is an open source implementation \ |
---|
10 | of the Lightweight Directory Access Protocol. |
---|
11 | |
---|
12 | platforms darwin |
---|
13 | homepage http://www.openldap.org/ |
---|
14 | master_sites ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/ \ |
---|
15 | http://www.openldap.org/software/download/OpenLDAP/openldap-release/ \ |
---|
16 | ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ |
---|
17 | distfiles ${name}-${version}.tgz |
---|
18 | checksums md5 143eeb6e3c163e5f52d8e744b43a5960 |
---|
19 | |
---|
20 | depends_lib port:db4 \ |
---|
21 | port:perl5.8 \ |
---|
22 | port:cyrus-sasl2 \ |
---|
23 | port:openssl |
---|
24 | |
---|
25 | patchfiles patch-ltmain |
---|
26 | |
---|
27 | configure.env LDFLAGS="-L${prefix}/lib" \ |
---|
28 | CPPFLAGS="-I${prefix}/include -I${prefix}/include/db4 -I${prefix}/include/openssl -DBIND_8_COMPAT" \ |
---|
29 | LANG=C |
---|
30 | |
---|
31 | configure.args --mandir=${prefix}/share/man \ |
---|
32 | --localstatedir=${prefix}/var \ |
---|
33 | --with-cyrus-sasl \ |
---|
34 | --with-tls \ |
---|
35 | --enable-crypt \ |
---|
36 | --enable-wrappers |
---|
37 | |
---|
38 | startupitem.create yes |
---|
39 | startupitem.name slapd |
---|
40 | startupitem.init "PID=${prefix}/var/run/slapd.pid" |
---|
41 | startupitem.start "${prefix}/libexec/slapd -u ldap -f ${prefix}/etc/openldap/slapd.conf" |
---|
42 | startupitem.stop "\[ -r \${PID} \] && kill \$(cat \${PID})" |
---|
43 | |
---|
44 | platform darwin 6 { |
---|
45 | depends_lib-append port:dlcompat |
---|
46 | } |
---|
47 | |
---|
48 | variant ipv6 { |
---|
49 | configure.args-append --enable-ipv6 |
---|
50 | } |
---|
51 | |
---|
52 | variant aci { |
---|
53 | configure.args-append --enable-aci |
---|
54 | } |
---|
55 | |
---|
56 | pre-configure { |
---|
57 | if { ![variant_isset ipv6]} { |
---|
58 | configure.args-append --disable-ipv6 |
---|
59 | } |
---|
60 | } |
---|
61 | |
---|
62 | pre-build { |
---|
63 | system "cd ${workpath}/${worksrcdir} && \ |
---|
64 | make depend" |
---|
65 | } |
---|
66 | |
---|
67 | pre-destroot { |
---|
68 | # should be in pre-deploy.... |
---|
69 | addgroup ldap |
---|
70 | set gid [existsgroup ldap] |
---|
71 | adduser ldap gid=${gid} |
---|
72 | } |
---|
73 | |
---|
74 | post-destroot { |
---|
75 | xinstall -d -g ldap -m 700 -o ldap \ |
---|
76 | "${destroot}${prefix}/var/run/openldap-data" |
---|
77 | #since post-deploy doesn't exist |
---|
78 | } |
---|
79 | |
---|
80 | test.run yes |
---|
81 | test.target check |
---|