# -*- 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 # $Id$ PortSystem 1.0 PortGroup muniversal 1.0 name openldap version 2.4.40 revision 2 categories databases maintainers nomaintainer license openldap description OpenLDAP Software long_description OpenLDAP Software is an open source implementation \ of the Lightweight Directory Access Protocol. platforms darwin homepage http://www.openldap.org/ master_sites ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/ \ http://www.openldap.org/software/download/OpenLDAP/openldap-release/ \ ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ extract.suffix .tgz checksums rmd160 38a914d785040730e9e595fe007ea4a0d0635344 \ sha256 d12611a5c25b6499293c2bb7b435dc2b174db73e83f5a8cb7e34f2ce5fa6dadb depends_lib path:bin/perl:perl5 \ port:tcp_wrappers \ port:cyrus-sasl2 \ path:lib/libssl.dylib:openssl \ port:db46 \ port:icu patchfiles patch-ltmain configure.env-append LANG=C configure.cppflags-append -I${prefix}/include/db46 -I${prefix}/include/openssl -DBIND_8_COMPAT platform darwin { configure.cppflags-append -DMDB_FDATASYNC=fsync if {${os.major} <= 9} { configure.cppflags-append -DMDB_DSYNC=O_SYNC } } configure.ldflags-append -L${prefix}/lib/db46 configure.args --mandir=${prefix}/share/man \ --localstatedir=${prefix}/var \ --with-cyrus-sasl \ --with-tls \ --enable-crypt \ --enable-wrappers \ --enable-syncprov \ --enable-ipv6 startupitem.create yes startupitem.name slapd startupitem.init "PID=${prefix}/var/run/slapd.pid" startupitem.start "${prefix}/libexec/slapd -u ldap -f ${prefix}/etc/openldap/slapd.conf" startupitem.stop "\[ -r \${PID} \] && kill \$(cat \${PID})" variant aci description {Enable per-object ACIs (experimental)} { configure.args-append --enable-aci } variant overlays description {Enable all available overlays} { configure.args-append --enable-overlays } platform darwin { if {${os.major} < 10} { # https://trac.macports.org/ticket/46236 configure.args-append --disable-mdb } } pre-build { set dirs {} if {[variant_isset universal]} { foreach arch ${universal_archs_to_use} { lappend dirs ${worksrcpath}-${arch} } } else { lappend dirs ${worksrcpath} } foreach dir ${dirs} { system "cd ${dir} && make depend" } } add_users ldap group=ldap destroot.keepdirs "${destroot}${prefix}/var/run/openldap-data" post-destroot { if {[geteuid] == 0} { xinstall -d -g ldap -m 700 -o ldap \ "${destroot}${prefix}/var/run/openldap-data" } else { xinstall -d -m 700 \ "${destroot}${prefix}/var/run/openldap-data" } # Delete the duplicate .conf files (leaves .conf.default) so upgrades won't overwrite .conf files. file delete -force ${destroot}${prefix}/etc/openldap/slapd.conf file delete -force ${destroot}${prefix}/etc/openldap/ldap.conf } test.run yes test.target check livecheck.type regex livecheck.url http://www.openldap.org/software/download/OpenLDAP/openldap-release/ livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"