aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authoreik <eik@FreeBSD.org>2003-11-15 01:50:29 +0800
committereik <eik@FreeBSD.org>2003-11-15 01:50:29 +0800
commitba18f34a57fcf559535c688493d529bdbef016af (patch)
tree8253ff326f2988802a6a83528fcf992523475de5 /sysutils
parent1256fd54c8e570406d4d05870835e4d86dc2207b (diff)
downloadfreebsd-ports-graphics-ba18f34a57fcf559535c688493d529bdbef016af.tar.gz
freebsd-ports-graphics-ba18f34a57fcf559535c688493d529bdbef016af.tar.zst
freebsd-ports-graphics-ba18f34a57fcf559535c688493d529bdbef016af.zip
Fix virgin install
PR: 59112 Submitted by: Clement Laforet <sheepkiller@cultdeadsheep.org> (maintainer) Noticed by: Rolandas Naujikas <rolnas@takas.lt> Approved by: marcus (mentor)
Diffstat (limited to 'sysutils')
-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 6b8909d3db5..f11e2a85786 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 24d8ef8f96d..1ecbebf99c1 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