Ticket #518: Portfile

File Portfile, 1.8 KB (added by bchesneau@…, 22 years ago)

Portfile

Line 
1PortSystem 1.0
2name            openldap
3version         2.1.17
4revision        1
5categories      database
6maintainers     bchesneau@mac.com
7description     OpenLDAP Software
8long_description        OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol. 
9
10
11platforms       darwin freebsd
12master_sites    ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/ \
13                http://www.PlanetMirror.com/pub/openldap/openldap-release/
14distfiles       ${name}-${version}.tgz
15checksums       openldap-2.1.17.tgz md5 53fb6c157a7c54b988cf7555e56f11e6
16
17depends_lib     lib:libdb-4.1:db4 \
18                bin:perl:perl5.8
19
20depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
21
22configure.env   LDFLAGS="-L${prefix}/lib -L/usr/lib" \
23                CPPFLAGS="-I${prefix}/include -I${prefix}/include/db4 -I/usr/include/openssl" \
24                LANG=C
25
26configure.args  --mandir=${prefix}/share/man \
27                --localstatedir=${prefix}/var/run \
28
29variant darwin {
30        depends_lib-append      lib:libdl.1:dlcompat
31}
32
33variant ipv6 {
34        configure.args-append --enable-ipv6
35}
36
37variant ssl {
38        depends_lib-append      lib:libssl.0.9:openssl
39        configure.args-append --with-tls
40}
41
42variant tcpd {
43        configure.args-append --enable-wrappers
44}
45
46pre-configure {
47        if { ![variant_isset ipv6]} {
48                configure.args-append --disable-ipv6
49        }
50        if { ![variant_isset ssl]} {
51                configure.args-append --without-tls
52        }
53
54        if { ![variant_isset tcpd]} {
55                configure.args-append --disable-wrappers
56        }
57}
58
59pre-build {
60        system "cd ${workpath}/${worksrcdir} && \
61                        make depend"
62}
63
64pre-install {
65        # should be in pre-deploy....
66        addgroup ldap
67        set gid [existsgroup ldap]
68        adduser ldap gid=${gid}
69}
70
71post-install {
72        file mkdir ${destroot}${prefix}/var/run
73        file mkdir ${destroot}${prefix}/etc/rc.d
74        system "install -o root -m 755 -c \
75                      ${portpath}/files/*.sh ${destroot}${prefix}/etc/rc.d"
76}