aboutsummaryrefslogtreecommitdiff
path: root/sysutils/ldap-account-manager
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-04-21 15:48:13 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-04-21 19:37:16 +0000
commit127744ca10156ef3e1807a56b65415328b83d417 (patch)
treea90c6ae3ca40a9d94ad13df8f5eb1abff2d629f9 /sysutils/ldap-account-manager
parent04c7d1e4a8db6c0102601a9ef8d04e1cf9e183d7 (diff)
downloadports-127744ca10156ef3e1807a56b65415328b83d417.tar.gz
ports-127744ca10156ef3e1807a56b65415328b83d417.zip
Diffstat (limited to 'sysutils/ldap-account-manager')
-rw-r--r--sysutils/ldap-account-manager/Makefile45
-rw-r--r--sysutils/ldap-account-manager/files/pkg-message.in (renamed from sysutils/ldap-account-manager/pkg-message)4
2 files changed, 23 insertions, 26 deletions
diff --git a/sysutils/ldap-account-manager/Makefile b/sysutils/ldap-account-manager/Makefile
index a1de8d4d0f8e..6c8b680a69dd 100644
--- a/sysutils/ldap-account-manager/Makefile
+++ b/sysutils/ldap-account-manager/Makefile
@@ -13,47 +13,44 @@ LICENSE_FILE= ${WRKSRC}/COPYING
RUN_DEPENDS= p5-perl-ldap>=0:net/p5-perl-ldap \
p5-Quota>=0:sysutils/p5-Quota
-USES= perl5 php:web tar:bzip2
+USES= perl5 php:web shebangfix tar:bzip2
USE_PHP= curl filter gd gettext gmp iconv ldap mbstring \
session simplexml xml xmlreader xmlwriter zip
+SHEBANG_FILES= lib/lamdaemon.pl
+
WWWDIR= ${PREFIX}/www/${SHORTNAME}
NO_ARCH= yes
NO_BUILD= yes
+SUB_FILES= pkg-message
-SHORTNAME= lam
PORTDOCS= COPYING HISTORY README copyright docs
-LAMDATA= config graphics help lib locale sess style templates tmp \
- VERSION index.html pwa_worker.js .htaccess
-WRITEABLES= config sess tmp
-
-OPTIONS_DEFINE+= DOCS
-OPTIONS_DEFAULT= DOCS
+OPTIONS_DEFINE= DOCS
DOCS_DESC= Install documentation and dhcp.schema
-.include <bsd.port.options.mk>
+LAMDATA= config graphics help lib locale sess style templates tmp \
+ VERSION index.html pwa_worker.js .htaccess
+SHORTNAME= lam
do-install:
- @${ECHO_CMD} '@preexec if [ -f %D/${WWWDIR_REL}/config/shells ]; then ${RM} %D/${WWWDIR_REL}/config/shells; fi' >> ${TMPPLIST}
- @${ECHO_CMD} '@sample ${WWWDIR_REL}/config/addressbook.sample.conf ${WWWDIR_REL}/config/addressbook.conf' >> ${TMPPLIST}
- @${ECHO_CMD} '@sample ${WWWDIR_REL}/config/config.cfg.sample ${WWWDIR_REL}/config/config.cfg' >> ${TMPPLIST}
- @${ECHO_CMD} '@sample ${WWWDIR_REL}/config/samba3.sample.conf ${WWWDIR_REL}/config/samba3.conf' >> ${TMPPLIST}
- @${ECHO_CMD} '@sample ${WWWDIR_REL}/config/unix.sample.conf ${WWWDIR_REL}/config/lam.conf' >> ${TMPPLIST}
- @${ECHO_CMD} '@sample ${WWWDIR_REL}/config/windows_samba4.sample.conf ${WWWDIR_REL}/config/windows_samba4.conf' >> ${TMPPLIST}
+ @${ECHO_CMD} '@rmtry ${WWWDIR_REL}/config/shells' >> ${TMPPLIST}
+ @${ECHO_CMD} '@sample(${WWWOWN},,) ${WWWDIR_REL}/config/addressbook.sample.conf ${WWWDIR_REL}/config/addressbook.conf' >> ${TMPPLIST}
+ @${ECHO_CMD} '@sample(${WWWOWN},,) ${WWWDIR_REL}/config/config.cfg.sample ${WWWDIR_REL}/config/config.cfg' >> ${TMPPLIST}
+ @${ECHO_CMD} '@sample(${WWWOWN},,) ${WWWDIR_REL}/config/samba3.sample.conf ${WWWDIR_REL}/config/samba3.conf' >> ${TMPPLIST}
+ @${ECHO_CMD} '@sample(${WWWOWN},,) ${WWWDIR_REL}/config/unix.sample.conf ${WWWDIR_REL}/config/lam.conf' >> ${TMPPLIST}
+ @${ECHO_CMD} '@sample(${WWWOWN},,) ${WWWDIR_REL}/config/windows_samba4.sample.conf ${WWWDIR_REL}/config/windows_samba4.conf' >> ${TMPPLIST}
.for I in ${LAMDATA}
- @${FIND} -s ${WRKSRC}/${I} -type f -not -name 'config.cfg.sample' -not -name '*.sample.conf' | ${SED} -e 's,^${WRKSRC},${WWWDIR_REL},' >> ${TMPPLIST}
- @${FIND} -ds ${WRKSRC}/${I} -type d | ${SED} -e 's,^${WRKSRC},@dir ${WWWDIR_REL},' >> ${TMPPLIST}
+ @${FIND} -s ${WRKSRC}/${I} -type f -not -name 'config.cfg.sample' -not -name '*.sample.conf' | \
+ ${SED} -e 's#^${WRKSRC}#${WWWDIR_REL}#' | \
+ ${SED} -E -e '/lib\/lamdaemon.pl$$/ s#^#@(${WWWOWN},,0544) #; \
+ /\/config|\/sess|\/tmp/ s#^#@(${WWWOWN},,) #;' >> ${TMPPLIST}
+ @${FIND} -ds ${WRKSRC}/${I} -type d | \
+ ${SED} -e 's,^${WRKSRC},@dir ${WWWDIR_REL},' | \
+ ${SED} -E -e '/\/config\/|\/sess\/|\/tmp\// s#@dir #@dir(${WWWOWN},,0755) #' >> ${TMPPLIST}
.endfor
@${ECHO_CMD} '@dir ${WWWDIR_REL}' >> ${TMPPLIST}
@cd ${WRKSRC} && ${COPYTREE_SHARE} "${LAMDATA}" ${STAGEDIR}${WWWDIR}
-.for DIR in ${WRITEABLES}
- @${ECHO_CMD} '@postexec ${CHOWN} -R ${WWWOWN} %D/${WWWDIR_REL}/${DIR}' >> ${TMPPLIST}
- @${ECHO_CMD} '@postexec ${CHMOD} -R u+w %D/${WWWDIR_REL}/${DIR}' >> ${TMPPLIST}
-.endfor
- @${SED} -i '' 's|usr/bin/perl|usr/local/bin/perl|g' ${WRKSRC}/lib/lamdaemon.pl
- @${ECHO_CMD} '@postexec ${CHOWN} ${WWWOWN} %D/${WWWDIR_REL}/${DIR}/lib/lamdaemon.pl' >> ${TMPPLIST}
- @${ECHO_CMD} '@postexec ${CHMOD} u+x %D/${WWWDIR_REL}/${DIR}/lib/lamdaemon.pl' >> ${TMPPLIST}
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/sysutils/ldap-account-manager/pkg-message b/sysutils/ldap-account-manager/files/pkg-message.in
index 72daeaa0e4f1..0e16516c75a0 100644
--- a/sysutils/ldap-account-manager/pkg-message
+++ b/sysutils/ldap-account-manager/files/pkg-message.in
@@ -6,9 +6,9 @@
You should add the following to your Apache configuration file:
-Alias /lam /usr/local/www/lam
+Alias /lam %%PREFIX%%/www/lam
-<Directory /usr/local/www/lam>
+<Directory %%PREFIX%%/www/lam>
Options +FollowSymLinks
AllowOverride All
Require all granted