diff options
author | pi <pi@FreeBSD.org> | 2015-10-25 02:26:48 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2015-10-25 02:26:48 +0800 |
commit | 98e4c6c9f2fdf8b48347afd4479ca22d30d527be (patch) | |
tree | 1745979780f317cce51a66e2a5c63fb33b130fd8 /mail/openemm2013 | |
parent | d33d78a04c5ac6926276ea7e4d8303af61bbfdf0 (diff) | |
download | freebsd-ports-gnome-98e4c6c9f2fdf8b48347afd4479ca22d30d527be.tar.gz freebsd-ports-gnome-98e4c6c9f2fdf8b48347afd4479ca22d30d527be.tar.zst freebsd-ports-gnome-98e4c6c9f2fdf8b48347afd4479ca22d30d527be.zip |
mail/openemm2013: cleanup
- fix .py files
- logdir added
- pkg-message enhanced with variables for some pathes
PR: 196516
Submitted by: Horst Leitenmueller <horst.leitenmueller@liwest.at> (maintainer)
Diffstat (limited to 'mail/openemm2013')
-rw-r--r-- | mail/openemm2013/Makefile | 43 | ||||
-rw-r--r-- | mail/openemm2013/files/pkg-message.in (renamed from mail/openemm2013/pkg-message) | 27 | ||||
-rw-r--r-- | mail/openemm2013/pkg-plist | 5 |
3 files changed, 58 insertions, 17 deletions
diff --git a/mail/openemm2013/Makefile b/mail/openemm2013/Makefile index c332b2726ef4..9d031e9864bd 100644 --- a/mail/openemm2013/Makefile +++ b/mail/openemm2013/Makefile @@ -3,6 +3,7 @@ PORTNAME= openemm2013 PORTVERSION= R2 +PORTREVISION= 1 CATEGORIES= mail java www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:DEFAULT/} \ http://central.maven.org/maven2/%SUBDIR%/:MAVEN2 @@ -48,12 +49,14 @@ PID_FILE= ${VAR_DIR}/run/${PORTNAME}.pid AGN_BACKEND_FILES= lib tools xmlback bav +SUB_FILES= pkg-message SUB_LIST= APP_SHORTNAME=${PORTNAME} \ LOG_DIR=${LOG_DIR} \ USER=${USER} \ GROUP=${GROUP} \ PID_FILE=${PID_FILE} \ - APP_HOME=${PREFIX}/${PORTNAME} + APP_HOME=${PREFIX}/${PORTNAME} \ + PREFIX=${PREFIX} PLIST_SUB= APP_HOME=${PORTNAME} TOMCAT_CONFIG_FILES= context.xml logging.properties server.xml @@ -94,9 +97,33 @@ post-patch: ${REINPLACE_CMD} -e 's|\/home\/openemm|${PREFIX}\/${PORTNAME}|g' ${WRKSRC}/src/script/data/bav.rc ${REINPLACE_CMD} -e 's|\/home\/openemm|${PREFIX}\/${PORTNAME}|g' ${WRKSRC}/tomcat/conf/server.xml - ${REINPLACE_CMD} -e "s|base = os.environ\['HOME'\]| base = '${PREFIX}\/${PORTNAME}'|g" -e "s|lockpath = os.environ\['LOCK_HOME'\]|lockpath = '/var/run/openemm'|g" ${WRKSRC}/src/script/lib/agn.py - - ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/src/script/lib/config.sh + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' -e "s|base = os.environ\['HOME'\]| base = '${PREFIX}\/${PORTNAME}'|g" -e "s|lockpath = os.environ\['LOCK_HOME'\]|lockpath = '/var/run/openemm'|g" ${WRKSRC}/src/script/lib/agn.py + + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/slrtscn.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/semu.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/softbounce.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/pickdist.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/smenable.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/bavd.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/bav-update.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/bav-trigger.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/upgrade.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/update.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/script/process/recovery.py + + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|g' ${WRKSRC}/src/script/lib/aps.readme + + ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' -e 's|python -c|${PYTHON_CMD} -c|g' ${WRKSRC}/src/script/lib/config.sh + + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/jsp/fckeditor-2.6.6/editor/filemanager/connectors/py/fckcommands.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/jsp/fckeditor-2.6.6/editor/filemanager/connectors/py/zope.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/jsp/fckeditor-2.6.6/editor/filemanager/connectors/py/fckoutput.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/jsp/fckeditor-2.6.6/editor/filemanager/connectors/py/connector.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/jsp/fckeditor-2.6.6/editor/filemanager/connectors/py/upload.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/jsp/fckeditor-2.6.6/editor/filemanager/connectors/py/fckutil.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/jsp/fckeditor-2.6.6/editor/filemanager/connectors/py/fckconnector.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/jsp/fckeditor-2.6.6/editor/filemanager/connectors/py/config.py + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/src/jsp/fckeditor-2.6.6/editor/filemanager/connectors/py/wsgi.py ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' -e 's|-L INFO|-L INFO -s /var/run/openemm/bav.sock|' ${WRKSRC}/src/script/control/bounce.sh ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/src/script/control/bav-update.sh @@ -213,4 +240,12 @@ post-install: ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/USR_SHARE/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) + # create log files + ${MKDIR} ${STAGEDIR}/var/log/${PORTNAME} + ${TOUCH} ${STAGEDIR}/var/log/${PORTNAME}/openemm_core.log + ${TOUCH} ${STAGEDIR}/var/log/${PORTNAME}/userlogs.log + ${TOUCH} ${STAGEDIR}/var/log/${PORTNAME}/openemm_axis.log + ${TOUCH} ${STAGEDIR}/var/log/${PORTNAME}/daily.log + ${CHOWN} -R ${USER}:${GROUP} ${STAGEDIR}/var/log/${PORTNAME} + .include <bsd.port.mk> diff --git a/mail/openemm2013/pkg-message b/mail/openemm2013/files/pkg-message.in index 561101638849..9936101bb95c 100644 --- a/mail/openemm2013/pkg-message +++ b/mail/openemm2013/files/pkg-message.in @@ -1,6 +1,6 @@ To integrate the OpenEMM 2013 R2 to the installed Tomcat add this chunk to the server.xml of Tomcat: -TOMCAT_HOME= ${PREFIX}/apache-tomcat-8.0/lib/ +TOMCAT_HOME= %%PREFIX%%/apache-tomcat-8.0/lib/ vi TOMCAT_HOME/conf/server.xml @@ -13,16 +13,16 @@ vi TOMCAT_HOME/conf/server.xml resolveHosts="false" directory="${catalina.base}/logs/access/" rotatable="true" buffered="true" prefix="" suffix="-access_openemm.log" fileDateFormat="yyyyMMdd" pattern='%a %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' /> - <Context cookies="false" docBase="${PREFIX}/${PORTNAME}/webapps/openemm" path="/openemm" reloadable="true" > + <Context cookies="false" docBase="%%APP_HOME%%/webapps/openemm" path="/openemm" reloadable="true" > <JarScanner scanAllDirectories="true" scanBootstrapClassPath="true"/> </Context> - <Context cookies="false" docBase="${PREFIX}/${PORTNAME}/webapps/openemm-ws" path="/openemm-ws2" reloadable="true" /> - <Context docBase="${PREFIX}/${PORTNAME}/webapps/manual" path="/manual" allowLinking="true" /> + <Context cookies="false" docBase="%%APP_HOME%%/webapps/openemm-ws" path="/openemm-ws2" reloadable="true" /> + <Context docBase="%%APP_HOME%%/webapps/manual" path="/manual" allowLinking="true" /> </Host> <!-- add this part END --> </Engine> -Also don't forget securing tomcat, or add a httpd in front secured +Don't forget securing tomcat, or add a httpd in front secured # IMPORTANT sendmail is completly controlled from OpenEMM! # It stops and starts sendmail @@ -30,7 +30,7 @@ Also don't forget securing tomcat, or add a httpd in front secured sendmail_enable="YES" # check also if you have a symlink to sendmail -ln -s /etc/rc.d/sendmail /etc/init.d/ +ln -s /etc/rc.d/sendmail /etc/rc.d/ # update the read right on the maillog file chmod 644 /var/log/maillog @@ -41,7 +41,7 @@ chmod 644 /var/log/maillog if not change tracking of mail sending / bounces is not working correct # don't forget to add the link for mysql driver jar to tomcat -ln -s ${PREFIX}/share/java/classes/mysql-connector-java.jar TOMCAT_HOME/lib +ln -s %%PREFIX%%/share/java/classes/mysql-connector-java.jar TOMCAT_HOME/lib chown -h www TOMCAT_HOME/lib/mysql-connector-java.jar # setup the database scripts @@ -58,14 +58,13 @@ grant all privileges on openemm_cms.* to agnitas@'X.Y.%' identified by 'openemm' flush privileges; # import the inital data -mysql -u root -p openemm < ${PREFIX}/share/doc/openemm2013/openemm-2013.sql -usr/local/share/doc/openemm2013/ -mysql -u root -p openemm_cms < ${PREFIX}/share/doc/openemm2013/openemm-2013.sql +mysql -u root -p openemm < %%PREFIX%%/share/doc/openemm2013/openemm-2013.sql +mysql -u root -p openemm_cms < %%PREFIX%%/share/doc/openemm2013/openemm_cms-2013.sql #additional config for db acces can be done -${PREFIX}/openemm2013/webapps/openemm/WEB-INF/classes/emm.properties +%%PREFIX%%/openemm2013/webapps/openemm/WEB-INF/classes/emm.properties or -${PREFIX}/openemm2013/webapps/openemm/WEB-INF/classes/cms.properties +%%PREFIX%%/openemm2013/webapps/openemm/WEB-INF/classes/cms.properties # startup config for tomcat and OpenEMM add to /etc/rc.conf @@ -80,4 +79,6 @@ openemm2013_enable="YES" service tomcat8 start -${PREFIX}/etc/rc.d/openemm2013 start +service openemm2013 start +or +%%PREFIX%%/etc/rc.d/openemm2013 start diff --git a/mail/openemm2013/pkg-plist b/mail/openemm2013/pkg-plist index 6903a9d625ec..3d935be99fc6 100644 --- a/mail/openemm2013/pkg-plist +++ b/mail/openemm2013/pkg-plist @@ -4917,6 +4917,11 @@ %%APP_HOME%%/webservices/EmmSoapClient.sh %%APP_HOME%%/webservices/WSSESoapClient.php %%APP_HOME%%/webservices/WS_use_example.php +/var/log/%%APP_HOME%%/daily.log +/var/log/%%APP_HOME%%/openemm_axis.log +/var/log/%%APP_HOME%%/openemm_core.log +/var/log/%%APP_HOME%%/userlogs.log +@dir /var/log/%%APP_HOME%% @dir %%DOCSDIR%%/ThirdPartyLicences @dir %%DOCSDIR%% @dir %%APP_HOME%%/bin/scripts |