source: trunk/dports/databases/openldap/Portfile @ 135232

Last change on this file since 135232 was 135232, checked in by ryandesign@…, 5 years ago

icu: update to 55.1

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 135232 2015-04-20 00:15:39Z ryandesign@macports.org $
3
4PortSystem 1.0
5PortGroup muniversal 1.0
6
7name            openldap
8version         2.4.40
9revision        1
10categories      databases
11maintainers     landonf
12license         openldap
13description     OpenLDAP Software
14long_description    OpenLDAP Software is an open source implementation \
15                    of the Lightweight Directory Access Protocol. 
16
17platforms       darwin
18homepage        http://www.openldap.org/
19master_sites    ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/ \
20                http://www.openldap.org/software/download/OpenLDAP/openldap-release/ \
21                ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/
22extract.suffix    .tgz
23
24checksums       rmd160  38a914d785040730e9e595fe007ea4a0d0635344 \
25                sha256  d12611a5c25b6499293c2bb7b435dc2b174db73e83f5a8cb7e34f2ce5fa6dadb
26
27depends_lib     path:bin/perl:perl5 \
28                port:tcp_wrappers \
29                port:cyrus-sasl2 \
30                port:openssl \
31                port:db46 \
32                port:icu
33
34patchfiles      patch-ltmain
35
36configure.env-append        LANG=C
37configure.cppflags-append   -I${prefix}/include/db46 -I${prefix}/include/openssl -DBIND_8_COMPAT
38platform darwin {
39    configure.cppflags-append -DMDB_FDATASYNC=fsync
40    if {${os.major} <= 9} {
41        configure.cppflags-append -DMDB_DSYNC=O_SYNC
42    }
43}
44configure.ldflags-append    -L${prefix}/lib/db46
45
46configure.args  --mandir=${prefix}/share/man \
47                --localstatedir=${prefix}/var \
48                --with-cyrus-sasl \
49                --with-tls \
50                --enable-crypt \
51                --enable-wrappers \
52                --enable-syncprov \
53                --enable-ipv6
54
55startupitem.create  yes
56startupitem.name    slapd
57startupitem.init    "PID=${prefix}/var/run/slapd.pid"
58startupitem.start   "${prefix}/libexec/slapd -u ldap -f ${prefix}/etc/openldap/slapd.conf"
59startupitem.stop    "\[ -r \${PID} \] && kill \$(cat \${PID})"
60
61variant aci description {Enable per-object ACIs (experimental)} {
62        configure.args-append --enable-aci
63}
64
65variant overlays description {Enable all available overlays} {
66        configure.args-append --enable-overlays
67}
68
69platform darwin {
70    if {${os.major} < 10} {
71        # https://trac.macports.org/ticket/46236
72        configure.args-append --disable-mdb
73    }
74}
75
76pre-build {
77    set dirs {}
78    if {[variant_isset universal]} {
79        foreach arch ${universal_archs_to_use} {
80            lappend dirs ${worksrcpath}-${arch}
81        }
82    } else {
83        lappend dirs ${worksrcpath}
84    }
85    foreach dir ${dirs} {
86        system "cd ${dir} && make depend"
87    }
88}
89
90add_users ldap group=ldap
91
92destroot.keepdirs "${destroot}${prefix}/var/run/openldap-data"
93post-destroot {
94    if {[geteuid] == 0} {
95        xinstall -d -g ldap -m 700 -o ldap \
96            "${destroot}${prefix}/var/run/openldap-data"
97    } else {
98        xinstall -d -m 700 \
99            "${destroot}${prefix}/var/run/openldap-data"
100    }
101# Delete the duplicate .conf files (leaves .conf.default) so upgrades won't overwrite .conf files.
102    file delete -force ${destroot}${prefix}/etc/openldap/slapd.conf
103    file delete -force ${destroot}${prefix}/etc/openldap/ldap.conf
104}
105
106test.run        yes
107test.target     check
108
109livecheck.type  regex
110livecheck.url   http://www.openldap.org/software/download/OpenLDAP/openldap-release/
111livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.