diff options
author | pav <pav@FreeBSD.org> | 2005-10-03 04:36:38 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2005-10-03 04:36:38 +0800 |
commit | cad496eb639f12e6bb12eac34bafe59f30540e60 (patch) | |
tree | 5d854613fb68bce78ffea2488609f4530ef30a31 /www/openacs | |
parent | 27fff8a7ac7b1158fe8514f97c0d30196f61307b (diff) | |
download | freebsd-ports-gnome-cad496eb639f12e6bb12eac34bafe59f30540e60.tar.gz freebsd-ports-gnome-cad496eb639f12e6bb12eac34bafe59f30540e60.tar.zst freebsd-ports-gnome-cad496eb639f12e6bb12eac34bafe59f30540e60.zip |
- Make daemontools dependency optional so package can be made
- Fix multiple error.log in plist
PR: ports/86659
Submitted by: Aldert Nooitgedagt <root@therapie.sportmedisch.net> (maintainer)
Diffstat (limited to 'www/openacs')
-rw-r--r-- | www/openacs/Makefile | 29 | ||||
-rw-r--r-- | www/openacs/files/pkg-install.in | 15 | ||||
-rw-r--r-- | www/openacs/files/pkg-message.in | 2 |
3 files changed, 32 insertions, 14 deletions
diff --git a/www/openacs/Makefile b/www/openacs/Makefile index 65b3155306f0..7f19f2829c36 100644 --- a/www/openacs/Makefile +++ b/www/openacs/Makefile @@ -7,6 +7,7 @@ PORTNAME?= openacs PORTVERSION?= 5.1.5 +PORTREVISION?= 1 CATEGORIES= www MASTER_SITES?= http://openacs.org/projects/openacs/download/download/ @@ -33,7 +34,12 @@ PKGMESSAGE= ${WRKDIR}/pkg-message PKGDEINSTALL= ${WRKDIR}/pkg-deinstall .if defined(WITH_POSTCONFIG) POSTCONFIG= true -PKGNAMESUFFIX= -withconfig +PKGNAMESUFFIX= -withconfig +.endif + +.if defined(WITH_DT) +DT= true +RUN_DEPENDS+= ${LOCALBASE}/bin/supervise:${PORTSDIR}/sysutils/daemontools .endif SUB_FILES= pkg-install pkg-message pkg-deinstall post-config @@ -41,7 +47,7 @@ SUB_LIST+= RCCONF=${RCCONF} POSTCONFIG=${POSTCONFIG} \ OPENACSBASE=${OPENACSBASE} OPENACS_GROUP=${OPENACS_GROUP} \ OPENACS_USER=${OPENACS_USER} DB=${DB} PGDATA=${PGDATA} \ PG_USER=${PG_USER} PGBASE=${PGBASE} \ - DTSERVICEBASE=${DTSERVICEBASE} \ + DTSERVICEBASE=${DTSERVICEBASE} DT=${DT} \ AOLSERVERBASE=${AOLSERVERBASE} VIRTUALBASE=${VIRTUALBASE} RUN_DEPENDS+= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \ @@ -60,8 +66,8 @@ RUN_DEPENDS+= ${LOCALBASE}/lib/libpq.so:${PORTSDIR}/databases/postgresql74-serve .endif RUN_DEPENDS+= ${LOCALBASE}/lib/tdom0.8.0/libtdom0.8.0.so:${PORTSDIR}/www/tdom \ - ${LOCALBASE}/tclwebtest-1.0/tclwebtest:${PORTSDIR}/www/tclwebtest \ - ${LOCALBASE}/bin/supervise:${PORTSDIR}/sysutils/daemontools + ${LOCALBASE}/tclwebtest-1.0/tclwebtest:${PORTSDIR}/www/tclwebtest + USE_LINUX= YES NO_BUILD= YES @@ -83,14 +89,12 @@ do-install: @${MKDIR} ${EXAMPLESDIR} @${MKDIR} ${OPENACSBASE} @${MKDIR} ${VIRTUALBASE} - @${MKDIR} ${DTSERVICEBASE} @${ECHO_CMD} "Installing files" @${CP} -R ${WRKSRC} ${OPENACSBASE}/${OPENACS_USER} @${TEST} -e ${VIRTUALBASE}/aolserver || ${LN} -s ${OPENACSBASE} ${VIRTUALBASE}/aolserver @${TEST} -L ${VIRTUALBASE}/aolserver || ${ECHO_MSG} "${VIRTUALBASE}/aolserver is no symbolic link" - @${TEST} -L ${DTSERVICEBASE}/${OPENACS_USER} || ${LN} -s ${OPENACSBASE}/${OPENACS_USER}/etc/daemontools ${DTSERVICEBASE}/${OPENACS_USER} @${INSTALL_SCRIPT} ${OPENACSBASE}/${OPENACS_USER}/packages/acs-core-docs/www/files/nsd-postgres.txt ${EXAMPLESDIR}/nsd-postgres @${INSTALL_SCRIPT} ${OPENACSBASE}/${OPENACS_USER}/packages/acs-core-docs/www/files/nsd-oracle.txt ${EXAMPLESDIR}/nsd-oracle @@ -116,7 +120,7 @@ post-install: " ${OPENACSBASE}/${OPENACS_USER}/etc/daemontools/run @${ECHO_CMD} "@unexec rm -f ${DATADIR}/log/${OPENACS_USER}* 2>&1 > /dev/null || true" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec rm -f ${DATADIR}/log/error.log 2>&1 > /dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec rm -f ${DATADIR}/log/error.log* 2>&1 > /dev/null || true" >> ${TMPPLIST} @${ECHO_CMD} "@unexec rm -Rf ${DATADIR}/apm-workspace 2>&1 > /dev/null || true" >> ${TMPPLIST} @${ECHO_CMD} "@unexec rm -Rf ${DATADIR}/etc/daemontools/supervise 2>&1 > /dev/null || true" >> ${TMPPLIST} @${FIND} -s ${WRKSRC} -not -type d \ @@ -124,9 +128,14 @@ post-install: @${FIND} -s -d ${WRKSRC} -type d \ | ${SED} -ne 's,^${WRKSRC},@dirrm ${DATADIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST} @${ECHO_CMD} "@dirrm ${EXAMPLESDIR:S,^${PREFIX}/,,}" >> ${TMPPLIST} - @${ECHO_CMD} "@cd ${DTSERVICEBASE}" >> ${TMPPLIST} - @${ECHO_CMD} "${OPENACS_USER}" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec rmdir ${DTSERVICEBASE} 2>&1 > /dev/null || true" >> ${TMPPLIST} + + if [ ${DT} ] ; then \ + @${MKDIR} ${DTSERVICEBASE} ; \ + @${TEST} -L ${DTSERVICEBASE}/${OPENACS_USER} || ${LN} -s ${OPENACSBASE}/${OPENACS_USER}/etc/daemontools ${DTSERVICEBASE}/${OPENACS_USER} ; \ + @${ECHO_CMD} "@cd ${DTSERVICEBASE}" >> ${TMPPLIST} ; \ + @${ECHO_CMD} "${OPENACS_USER}" >> ${TMPPLIST} ; \ + @${ECHO_CMD} "@unexec rmdir ${DTSERVICEBASE} 2>&1 > /dev/null || true" >> ${TMPPLIST} ; \ + fi @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} diff --git a/www/openacs/files/pkg-install.in b/www/openacs/files/pkg-install.in index 072a25dfd1b6..fe8122f4345d 100644 --- a/www/openacs/files/pkg-install.in +++ b/www/openacs/files/pkg-install.in @@ -8,6 +8,7 @@ OPENACSBASE=%%OPENACSBASE%% OPENACS_GROUP=%%OPENACS_GROUP%% OPENACS_USER=%%OPENACS_USER%% DB=%%DB%% +DT=%%DT%% PGDATA=%%PGDATA%% PG_USER=%%PG_USER%% PGBASE=%%PGBASE%% @@ -82,6 +83,13 @@ else echo "${RCCONF}: adding entries" && \ echo "# OPENACS-entries in rc.conf:" >> ${RCCONF} && \ echo "ldconfig_paths=\"/usr/lib/compat /usr/X11R6/lib ${LOCALBASE}/lib ${PGBASE}/lib ${AOLSERVERBASE}/lib\" " >> ${RCCONF} && \ + echo "postgresql_enable=\"YES\"" >> ${RCCONF} && \ + echo "postgresql_data=\"${PGDATA}\"" >> ${RCCONF} && \ + echo "postgresql_flags=\" -l ${PGDATA}/server.log\"" >> ${RCCONF} && \ + echo "aolserver_enable=\"YES\"" >> ${RCCONF} && \ + echo "aolserver_conf=\"${OPENACSBASE}/${OPENACS_USER}/etc/config.tcl\"" >> ${RCCONF} && \ + echo "aolserver_flags=\"-u ${OPENACS_USER} -g ${OPENACS_GROUP} -b 0.0.0.0:8000\"" >> ${RCCONF} && \ + echo "aolserver_prog=\"${EXAMPLESDIR}/nsd-postgres\"" >> ${RCCONF} && \ echo "# end of OPENACS-entries." >> ${RCCONF} fi @@ -107,9 +115,10 @@ post-install() { echo "Set permissions of files" chmod -R 770 ${OPENACSBASE}/${OPENACS_USER} chmod -R 770 ${EXAMPLESDIR} - chmod -R 755 ${DTSERVICEBASE}/${OPENACS_USER} - chmod 1755 ${DTSERVICEBASE} - +if [ ${DT} ] ; then \ + chmod -R 755 ${DTSERVICEBASE}/${OPENACS_USER} ; \ + chmod 1755 ${DTSERVICEBASE} ; \ +fi chown -R ${OPENACS_USER}:${OPENACS_GROUP} ${OPENACSBASE}/${OPENACS_USER} chown root:${OPENACS_GROUP} ${EXAMPLESDIR}/nsd-postgres ${EXAMPLESDIR}/nsd-oracle diff --git a/www/openacs/files/pkg-message.in b/www/openacs/files/pkg-message.in index f1a5a2a092bf..7d8a52eba868 100644 --- a/www/openacs/files/pkg-message.in +++ b/www/openacs/files/pkg-message.in @@ -34,7 +34,7 @@ nsd-postgres and some other files are in %%EXAMPLESDIR%%, but everything should work just fine. To view your pages at port 80 you will have to change: -daemontools/run and config.tcl in +%%RCCONF%%, daemontools/run and config.tcl in %%VIRTUALBASE%%/aolserver/%%OPENACS_USER%%/etc. If you install .LRN as well as openACS the IP address in config.tcl |