aboutsummaryrefslogtreecommitdiff
path: root/sysutils/ldap-account-manager
diff options
context:
space:
mode:
authorOliver Eikemeier <eik@FreeBSD.org>2003-11-14 17:50:29 +0000
committerOliver Eikemeier <eik@FreeBSD.org>2003-11-14 17:50:29 +0000
commit311359ed1a0a8920ac8ef3f2cae10b349758eada (patch)
tree5b0660f58388f0cf96529e843a6d28f9739f9e8c /sysutils/ldap-account-manager
parent1ecd7bbe8ba3ae190fddef227eee830af7db1340 (diff)
downloadports-311359ed1a0a8920ac8ef3f2cae10b349758eada.tar.gz
ports-311359ed1a0a8920ac8ef3f2cae10b349758eada.zip
Notes
Diffstat (limited to 'sysutils/ldap-account-manager')
-rw-r--r--sysutils/ldap-account-manager/Makefile44
-rw-r--r--sysutils/ldap-account-manager/pkg-plist10
2 files changed, 29 insertions, 25 deletions
diff --git a/sysutils/ldap-account-manager/Makefile b/sysutils/ldap-account-manager/Makefile
index 6b8909d3db51..f11e2a85786a 100644
--- a/sysutils/ldap-account-manager/Makefile
+++ b/sysutils/ldap-account-manager/Makefile
@@ -29,28 +29,19 @@ MOD_DIR= libexec/apache2
MOD_DIR= libexec/apache
.endif
-.include <bsd.port.pre.mk>
-
-.if !exists(${LOCALBASE}/lib/libldap.so.2)
-IGNORE+= "OpenLDAP support is required \(2.0 or greater\)"
-.endif
-
-.if !exists(${LOCALBASE}/lib/libmcrypt.so)
-IGNORE+= "mcrypt support is required"
-.endif
-
-.if !exists(${LOCALBASE}/lib/libintl.so)
-IGNORE+= "gettext support is required"
-.endif
-
WWW_ROOT?= www/lam
PLIST_SUB+= WWWROOT=${WWW_ROOT}
-WWW_USER?= www
-WWW_GROUP?= www
WWW_DIR= config graphics help lib locale sess style templates
-DOC_FILES= COPYING HISTORY INSTALL README TODO docs/README.fpdf \
- docs/README.openldap docs/README.shells docs/README.hosts \
- docs/README.security docs/README.lamdaemon.pl
+MYPORTDOCS= HISTORY README TODO docs/README.fpdf docs/README.openldap \
+ docs/README.shells docs/README.hosts docs/README.security \
+ docs/README.lamdaemon.pl
+WWW_OWNED= sess tmp config config config/profiles config/profiles/groups \
+ config/profiles/groups/default.prg config/profiles/hosts \
+ config/profiles/hosts/default.prh config/profiles/users \
+ config/profiles/users/default.pru config/language config/shells \
+ config/config.cfg config/lam.conf
+
+LAM_SCRIPTS= lib/createntlm.pl lib/lamdaemon.pl
CVS_DIRS= ${WRKSRC}/lib/font/CVS ${WRKSRC}/lib/font/makefont/CVS
@@ -66,11 +57,20 @@ do-install:
.endfor
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
-.for FILE in ${DOC_FILES}
+.for FILE in ${MYPORTDOCS}
@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
.endfor
.endif
- @${CHOWN} -R ${WWW_USER}:${WWW_GROUP} ${PREFIX}/${WWW_ROOT}
+ @${MKDIR} ${PREFIX}/${WWW_ROOT}/tmp
+ @[ -e ${PREFIX}/${WWW_ROOT}/config/config.cfg ] || \
+ ${INSTALL_DATA} ${WRKSRC}/config/config.cfg_sample ${PREFIX}/${WWW_ROOT}/config/config.cfg
+ @[ -e ${PREFIX}/${WWW_ROOT}/config/lam.conf ] || \
+ ${INSTALL_DATA} ${WRKSRC}/config/lam.conf_sample ${PREFIX}/${WWW_ROOT}/config/lam.conf
+ @${ECHO_MSG} "===> Setting correct permissions"
+ @${FIND} ${PREFIX}/${WWW_ROOT} -type f -exec ${CHMOD} 644 {} \;
+ @${FIND} ${PREFIX}/${WWW_ROOT} -type d -exec ${CHMOD} 755 {} \;
+ @cd ${PREFIX}/${WWW_ROOT} ; ${CHOWN} ${WWWOWN}:${WWWGRP} ${WWW_OWNED}
+ @cd ${PREFIX}/${WWW_ROOT} ; ${CHMOD} 755 ${LAM_SCRIPTS}
post-install:
@${ECHO_MSG} ""
@@ -84,4 +84,4 @@ post-install:
@${ECHO_MSG} " include ${LOCALBASE}/etc/openldap/schema/samba.schema"
@${ECHO_MSG} ""
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/sysutils/ldap-account-manager/pkg-plist b/sysutils/ldap-account-manager/pkg-plist
index 24d8ef8f96da..1ecbebf99c11 100644
--- a/sysutils/ldap-account-manager/pkg-plist
+++ b/sysutils/ldap-account-manager/pkg-plist
@@ -1,11 +1,16 @@
+@comment $FreeBSD$
%%WWWROOT%%/index.html
%%WWWROOT%%/config/profiles/groups/default.prg
%%WWWROOT%%/config/profiles/hosts/default.prh
%%WWWROOT%%/config/profiles/users/default.pru
%%WWWROOT%%/config/.htaccess
+@unexec if cmp -s %D/%%WWWROOT%%/config/lam.conf %D/%%WWWROOT%%/config/lam.conf_sample; then rm -f %D/%%WWWROOT%%/config/lam.conf; fi
%%WWWROOT%%/config/lam.conf_sample
+@exec [ -f %B/lam.conf ] || cp %B/%f %B/lam.conf
%%WWWROOT%%/config/language
+@unexec if cmp -s %D/%%WWWROOT%%/config/config.cfg %D/%%WWWROOT%%/config/config.cfg_sample; then rm -f %D/%%WWWROOT%%/config/config.cfg ; fi
%%WWWROOT%%/config/config.cfg_sample
+@exec [ -f %B/config.cfg ] || cp %B/%f %B/config.cfg
%%WWWROOT%%/config/shells
%%WWWROOT%%/graphics/banner.jpg
%%WWWROOT%%/graphics/printLogo.jpg
@@ -88,9 +93,7 @@
%%WWWROOT%%/templates/account/useredit.php
%%WWWROOT%%/templates/account/groupedit.php
%%WWWROOT%%/templates/getpdf.php
-%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/HISTORY
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/TODO
%%PORTDOCS%%%%DOCSDIR%%/README.fpdf
@@ -99,7 +102,7 @@
%%PORTDOCS%%%%DOCSDIR%%/README.shells
%%PORTDOCS%%%%DOCSDIR%%/README.hosts
%%PORTDOCS%%%%DOCSDIR%%/README.security
-@dirrm %%PORTDOCS%%%%DOCSDIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%WWWROOT%%/graphics
@dirrm %%WWWROOT%%/help
@dirrm %%WWWROOT%%/lib/font/makefont
@@ -120,4 +123,5 @@
@unexec rmdir %D/%%WWWROOT%%/config/profiles 2>/dev/null || true
@unexec rmdir %D/%%WWWROOT%%/config 2>/dev/null || true
@unexec rmdir %D/%%WWWROOT%%/sess || true
+@unexec rmdir %D/%%WWWROOT%%/tmp || true
@unexec rmdir %D/%%WWWROOT%% 2>/dev/null || echo "If you are permanently removing this port, you should do a ``rm -rf %D/%%WWWROOT%%`` to remove any files left." | fmt