[76807] trunk/dports/databases/openldap/Portfile
jmr at macports.org
jmr at macports.org
Wed Mar 9 01:26:45 PST 2011
Revision: 76807
http://trac.macports.org/changeset/76807
Author: jmr at macports.org
Date: 2011-03-09 01:26:45 -0800 (Wed, 09 Mar 2011)
Log Message:
-----------
openldap: allow non-root install (#23405)
Modified Paths:
--------------
trunk/dports/databases/openldap/Portfile
Modified: trunk/dports/databases/openldap/Portfile
===================================================================
--- trunk/dports/databases/openldap/Portfile 2011-03-09 09:12:50 UTC (rev 76806)
+++ trunk/dports/databases/openldap/Portfile 2011-03-09 09:26:45 UTC (rev 76807)
@@ -78,9 +78,15 @@
adduser ldap gid=${gid}
}
+destroot.keepdirs "${destroot}${prefix}/var/run/openldap-data"
post-destroot {
- xinstall -d -g ldap -m 700 -o ldap \
- "${destroot}${prefix}/var/run/openldap-data"
+ 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110309/c04f59dc/attachment.html>
More information about the macports-changes
mailing list