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

Last change on this file since 85326 was 85326, checked in by snc@…, 6 years ago

openldap: license

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 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 85326 2011-10-12 19:38:50Z snc@macports.org $
3
4PortSystem 1.0
5PortGroup muniversal 1.0
6
7name            openldap
8version         2.4.21
9revision        3
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
23checksums       md5     e7128c57b2bacd940e8906057c94ff26 \
24                sha1    cfcfff3df7804bab8eb0d9464d3712a3e32d677b \
25                rmd160  94f662e8fe1b009f5836cb9c19b095f1b159b1bd
26
27depends_lib     path:bin/perl:perl5 \
28                port:cyrus-sasl2 \
29                port:openssl \
30                port:db46 \
31                port:icu
32
33patchfiles      patch-ltmain
34
35configure.env-append            LANG=C
36configure.cppflags-append       -I${prefix}/include/db46 -I${prefix}/include/openssl -DBIND_8_COMPAT
37configure.ldflags-append        -L${prefix}/lib/db46
38
39configure.args  --mandir=${prefix}/share/man \
40                --localstatedir=${prefix}/var \
41                --with-cyrus-sasl \
42                --with-tls \
43                --enable-crypt \
44                --enable-wrappers \
45                --enable-syncprov \
46                --enable-ipv6
47
48startupitem.create      yes
49startupitem.name        slapd
50startupitem.init        "PID=${prefix}/var/run/slapd.pid"
51startupitem.start       "${prefix}/libexec/slapd -u ldap -f ${prefix}/etc/openldap/slapd.conf"
52startupitem.stop        "\[ -r \${PID} \] && kill \$(cat \${PID})"
53
54variant aci description {Enable per-object ACIs (experimental)} {
55        configure.args-append --enable-aci
56}
57
58variant overlays description {Enable all available overlays} {
59        configure.args-append --enable-overlays
60}
61
62pre-build {
63    set dirs {}
64    if {[variant_isset universal]} {
65        foreach arch ${universal_archs_to_use} {
66            lappend dirs ${worksrcpath}-${arch}
67        }
68    } else {
69        lappend dirs ${worksrcpath}
70    }
71    foreach dir ${dirs} {
72        system "cd ${dir} && make depend"
73    }
74}
75
76pre-destroot {
77        # should be in pre-deploy....
78        addgroup ldap
79        set gid [existsgroup ldap]
80        adduser ldap gid=${gid}
81}
82
83destroot.keepdirs "${destroot}${prefix}/var/run/openldap-data"
84post-destroot {
85    if {[geteuid] == 0} {
86            xinstall -d -g ldap -m 700 -o ldap \
87                    "${destroot}${prefix}/var/run/openldap-data"
88        } else {
89            xinstall -d -m 700 \
90                    "${destroot}${prefix}/var/run/openldap-data"
91        }
92# Delete the duplicate .conf files (leaves .conf.default) so upgrades won't overwrite .conf files.
93        file delete -force ${destroot}${prefix}/etc/openldap/slapd.conf
94        file delete -force ${destroot}${prefix}/etc/openldap/ldap.conf
95}
96
97test.run        yes
98test.target     check
Note: See TracBrowser for help on using the repository browser.