mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
Fix virgin install
PR: 59112 Submitted by: Clement Laforet <sheepkiller@cultdeadsheep.org> (maintainer) Noticed by: Rolandas Naujikas <rolnas@takas.lt> Approved by: marcus (mentor)
This commit is contained in:
parent
1ecd7bbe8b
commit
311359ed1a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=93966
@ -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>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user