svn commit: r400135 - in head/mail: . openemm2015 openemm2015/files
Kurt Jaeger
pi at FreeBSD.org
Sat Oct 24 18:40:42 UTC 2015
Author: pi
Date: Sat Oct 24 18:40:39 2015
New Revision: 400135
URL: https://svnweb.freebsd.org/changeset/ports/400135
Log:
New port: mail/openemm2015
OpenEMM is a feature-rich web-based enterprise application for email
marketing, newsletters and service mails (transaction mails and
event or time triggered mails). OpenEMM offers a great user interface,
sophisticated bounce management, link tracking, lots of graphical
realtime statistics, a CMS module and a scripting feature to implement
individual tasks.
OpenEMM is the first open source application for e-mail marketing.
Its code base has been developed since 1999 and is used - as part
of the commercial software product E-Marketing Manager (EMM) - by
companies like IBM, Daimler, Siemens and Deutsche Telekom.
OpenEMM offers already more than 95% of the functionality of most
commercial products and some features most commercial products do
not offer right now (for example MySQL support and CMS functionality).
WWW: http://www.openemm.org
PR: 204000
Submitted by: horst leitenmueller <horst.leitenmueller at liwest.at>
Added:
head/mail/openemm2015/
head/mail/openemm2015/Makefile (contents, props changed)
head/mail/openemm2015/distinfo (contents, props changed)
head/mail/openemm2015/files/
head/mail/openemm2015/files/openemm2015.in (contents, props changed)
head/mail/openemm2015/files/patch-backend__GNUmakefile (contents, props changed)
head/mail/openemm2015/files/patch-backend__src__c__bav__GNUmakefile (contents, props changed)
head/mail/openemm2015/files/patch-backend__src__c__bav__bav.c (contents, props changed)
head/mail/openemm2015/files/patch-backend__src__c__lib__GNUmakefile (contents, props changed)
head/mail/openemm2015/files/patch-backend__src__c__lib__agn.h (contents, props changed)
head/mail/openemm2015/files/patch-backend__src__c__tools__GNUmakefile (contents, props changed)
head/mail/openemm2015/files/patch-backend__src__c__xmlback__GNUmakefile (contents, props changed)
head/mail/openemm2015/files/patch-backend__src__c__xmlback__eval.c (contents, props changed)
head/mail/openemm2015/files/patch-backend__src__c__xmlback__grammar__GNUmakefile (contents, props changed)
head/mail/openemm2015/files/patch-backend__src__script__lib__config.sh (contents, props changed)
head/mail/openemm2015/files/patch-openemm_build.xml (contents, props changed)
head/mail/openemm2015/files/patch-src__java__org__agnitas__util__XmlUtilities.java (contents, props changed)
head/mail/openemm2015/files/patch-src__java__org__agnitas__web__MailingSendAction.java (contents, props changed)
head/mail/openemm2015/files/patch-src__java__org__agnitas__web__filter__GZipRequestFilter.java (contents, props changed)
head/mail/openemm2015/files/patch-src__jsp__WEB-INF__web.xml (contents, props changed)
head/mail/openemm2015/files/pkg-message.in (contents, props changed)
head/mail/openemm2015/pkg-descr (contents, props changed)
head/mail/openemm2015/pkg-plist (contents, props changed)
Modified:
head/mail/Makefile
Modified: head/mail/Makefile
==============================================================================
--- head/mail/Makefile Sat Oct 24 18:26:48 2015 (r400134)
+++ head/mail/Makefile Sat Oct 24 18:40:39 2015 (r400135)
@@ -286,6 +286,7 @@
SUBDIR += opendkim
SUBDIR += opendmarc
SUBDIR += openemm2013
+ SUBDIR += openemm2015
SUBDIR += opensmtpd
SUBDIR += opensmtpd-devel
SUBDIR += openwebmail
Added: head/mail/openemm2015/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/Makefile Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,236 @@
+# Created by: Horst Leitenmueller <horst.leitenmueller at liwest.at>
+# $FreeBSD$
+
+PORTNAME= openemm2015
+PORTVERSION= 0
+CATEGORIES= mail java www
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:DEFAULT/} \
+ http://central.maven.org/maven2/%SUBDIR%/:MAVEN2
+MASTER_SITE_SUBDIR= openemm/OpenEMM%20software/OpenEMM%202015/:DEFAULT \
+ com/lowagie/itext/2.1.7/:MAVEN2
+DISTNAME= OpenEMM-2015-src
+DISTFILES= OpenEMM-2015-src.tar.gz:DEFAULT OpenEMM-2015-JARs.tar.gz:DEFAULT \
+ itext-2.1.7.jar:MAVEN2
+
+MAINTAINER= horst.leitenmueller at liwest.at
+COMMENT= OpenEMM a email marketing enterprise app
+
+LICENSE= CPAL-1.0
+LICENSE_FILE= ${WRKSRC}/other/LICENSE.txt
+
+LIB_DEPENDS= libslang.so:${PORTSDIR}/devel/libslang2 \
+ libsa.so:${PORTSDIR}/net/ossp-sa
+BUILD_DEPENDS= ${TOMCATHOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat8 \
+ ${ANT_CMD}:${PORTSDIR}/devel/apache-ant
+RUN_DEPENDS= ${TOMCATHOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat8 \
+ py27-MySQLdb>=1.2.3:${PORTSDIR}/databases/py-MySQLdb
+
+USE_RC_SUBR= openemm2015
+USE_JAVA= yes
+JAVA_VERSION= 1.7+
+
+USES= dos2unix gmake python:2.7,run
+DOS2UNIX_GLOB= *.c *.cpp *.h *.java *.xml *.properties
+CC= clang
+CXX= clang++
+
+TOMCATVER= apache-tomcat-8.0
+TOMCATDIR= ${PREFIX}/${TOMCATVER}
+TOMCATHOME= ${LOCALBASE}/${TOMCATVER}
+#WEBAPPDIR= ${TOMCATDIR}/webapps
+WEBAPP= openemm
+
+USER= www
+GROUP= www
+VAR_DIR?= /var
+LOG_DIR?= ${VAR_DIR}/log/${PORTNAME}
+PID_FILE= ${VAR_DIR}/run/${PORTNAME}.pid
+
+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} \
+ PREFIX=${PREFIX}
+PLIST_SUB= APP_HOME=${PORTNAME}
+
+TOMCAT_CONFIG_FILES= context.xml logging.properties server.xml
+
+ANT_CMD?= ${LOCALBASE}/bin/ant
+ANT= ${SETENV} JAVA_HOME=${JAVA_HOME} ${ANT_CMD}
+ANT_TARGETS= build
+ANT_BUILD_PARAM= -Dbuild=${WRKSRC}/target -Doe.home=${WRKSRC}/target -Dbin=${WRKSRC}/target/bin -Dcatalina.home=${TOMCATDIR} -Dsrc=${WRKSRC} -f openemm_build.xml
+JAVA_BUILD= yes
+
+do-extract:
+ @cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${DISTNAME}.tar.gz ${EXTRACT_AFTER_ARGS}
+
+ # we extract the add-on libs to the ${WRKSRC}/lib directory
+ ${MKDIR} ${WRKSRC}/lib
+ @cd ${WRKSRC}/lib && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/OpenEMM-2015-JARs.tar.gz ${EXTRACT_AFTER_ARGS}
+ @cd ${WRKSRC}/lib && ${CP} ${_DISTDIR}/itext-2.1.7.jar .
+
+post-extract:
+ # remove not needed java libs which are installed as separate port
+ ${RM} ${WRKSRC}/lib/mysql*.jar
+
+ ${RM} ${WRKSRC}/backend/GNUMakefile
+ # remove the c libs which are also installed as dependencies ports
+ # ${WRKSRC}/backend/contrib/sa-1.2.6.tar.gz -> net/ossp-sa and ${WRKSRC}/backend/contrib/slang-1.4.9.tar.gz -> devel/libslang2
+ ${RM} -rf ${WRKSRC}/backend/contrib
+
+pre-patch:
+ @${ECHO_MSG} "Installation settings:"
+ @${ECHO_MSG} " Location of TomcatHome: ${TOMCAT_HOME}"
+ @${ECHO_MSG} " Location of JDK: ${JAVA_HOME}"
+ @${ECHO_MSG} " Location of Java port: ${JAVA_PORT}"
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|\/home\/openemm|${PREFIX}\/${PORTNAME}|g' -e 's|\/usr\/share\/doc\/OpenEMM-2015|${DOCSDIR}|g' ${WRKSRC}/other/README.txt
+ ${REINPLACE_CMD} -e 's|\/home\/openemm|${PREFIX}\/${PORTNAME}|g' ${WRKSRC}/backend/src/script/data/bav.rc
+ ${REINPLACE_CMD} -e 's|\/home\/openemm|${PREFIX}\/${PORTNAME}|g' ${WRKSRC}/tomcat/conf/server.xml
+
+ ${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}/backend/src/script/lib/agn.py
+
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/slrtscn.py
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/semu.py
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/softbounce.py
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/pickdist.py
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/smenable.py
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/bavd.py
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/bav-update.py
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/bav-trigger.py
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/upgrade.py
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/update.py
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' ${WRKSRC}/backend/src/script/process/recovery.py
+
+ ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|g' ${WRKSRC}/backend/src/script/lib/aps.readme
+
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' -e 's|python -c|${PYTHON_CMD} -c|g' ${WRKSRC}/backend/src/script/lib/config.sh
+
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' -e 's|-L INFO|-L INFO -s /var/run/openemm/bav.sock|' ${WRKSRC}/backend/src/script/control/bounce.sh
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/bav-update.sh
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/bav-trigger.sh
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/bavd.sh
+
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/merger.sh
+ #${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/openemm.py
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/recovery.sh
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/update.sh
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/pickdist.sh
+
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/mailer.sh
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/sendmail-enable.sh
+
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/slrtscn.sh
+ ${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' ${WRKSRC}/backend/src/script/control/softbounce.sh
+
+ ${REINPLACE_CMD} -e 's|=logs\/openemm\/|=\/var\/log\/\${PORTNAME}\/|g' ${WRKSRC}/src/conf/log4j.properties
+ ${REINPLACE_CMD} -e 's|=logs\/openemm-ws\/|=\/var\/log\/\${PORTNAME}\/|g' ${WRKSRC}/src/conf-ws/log4j.properties
+
+ ${REINPLACE_CMD} -e 's|system.logdir=.*|system.logdir=\/var\/log\/\${PORTNAME}\/|g' \
+ -e 's|plugins.home=.*|plugins.home=\${PREFIX}\/\${PORTNAME}\/plugins|g' \
+ -e 's|\/home\/openemm|${PREFIX}\/${PORTNAME}|g' ${WRKSRC}/src/conf/emm.properties
+
+do-build:
+
+ # build the c backend parts of AGN
+ @${ECHO} "Building C Backend"
+
+ cd ${WRKSRC}/backend && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
+
+ ${MKDIR} ${WRKSRC}/target
+
+ # copy some of the compiled c files to the bin
+ ${MKDIR} ${WRKSRC}/target/bin
+
+ ${MV} ${WRKSRC}/backend/src/c/bav/bav ${WRKSRC}/target/bin/
+ ${MV} ${WRKSRC}/backend/src/c/tools/qctrl ${WRKSRC}/target/bin/
+ ${MV} ${WRKSRC}/backend/src/c/tools/smctrl ${WRKSRC}/target/bin/
+ ${MV} ${WRKSRC}/backend/src/c/tools/updater ${WRKSRC}/target/bin/
+ ${MV} ${WRKSRC}/backend/src/c/xmlback/xmlback ${WRKSRC}/target/bin/
+
+ # copy the script parts
+ ${MKDIR} ${WRKSRC}/target/bin/scripts
+
+ ${MV} ${WRKSRC}/backend/src/c/bav/bavwrap ${WRKSRC}/target/bin/scripts/
+
+ # create the other directory parts
+ ${MKDIR} ${WRKSRC}/target/logs
+ ${MKDIR} ${WRKSRC}/target/logs/openemm
+ ${MKDIR} ${WRKSRC}/target/logs/openemm-ws
+ ${MKDIR} ${WRKSRC}/target/plugins
+ ${MKDIR} ${WRKSRC}/target/temp
+ ${MKDIR} ${WRKSRC}/target/webservices
+
+ # build the java part, frontent/parts of backend for this port
+ cd ${WRKSRC} && ${ANT} ${ANT_BUILD_PARAM} ${ANT_TARGETS}
+
+ # cp the conf files
+ ${MKDIR} ${WRKSRC}/target/conf
+.for config_file in ${TOMCAT_CONFIG_FILES}
+ # rename the default template config files
+ ${MV} ${WRKSRC}/tomcat/conf/${config_file} ${WRKSRC}/target/conf/${config_file}.sample
+.endfor
+ # move the startup scripts
+ ${MV} ${WRKSRC}/backend/src/script/control/* ${WRKSRC}/target/bin/
+
+ # clean bin directory
+ ${RM} ${WRKSRC}/target/bin/*.bat
+ ${RM} ${WRKSRC}/target/bin/openemm.py
+
+ ${MV} ${WRKSRC}/target/bin/USR_SHARE ${WRKSRC}/USR_SHARE
+ ${RM} -rf ${WRKSRC}/target/src
+
+ # remove problem tld with missing classes
+ # SEEMS TO BE REMOVED ... @${RM} ${WRKSRC}/target/webapps/openemm/WEB-INF/struts-tiles.tld
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}
+ (cd ${WRKSRC}/target/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/${PORTNAME} "! -name USR_SHARE*")
+
+ (cd ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/scripts/ && \
+ ${LN} -sf bavwrap filter_or_forward && \
+ ${LN} -sf bavwrap is_no_systemmail && \
+ ${LN} -sf bavwrap scan_and_unsubscribe)
+
+ (cd ${STAGEDIR}${PREFIX}/${PORTNAME}/webapps/ && \
+ ${LN} -sf openemm/assets openemmassets)
+
+post-install:
+
+ # as needed from Running Q/A tests (stage-qa)
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/bav
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/smctrl
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/qctrl
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/xmlback
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/updater
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/scripts/bavwrap
+
+ # update some rights which must be assigned to root
+ # we need the rigt to read the maillog file /etc/newsyslog.conf
+ # /var/log/maillog 640 7 * @T00 JC
+ # and the actual file chmod 644 /var/log/maillog
+ # if not change tracking of these mail sending / bounces is
+ # not working correct
+
+ # TODO LEI
+ # move the licenses to the correct place
+ # /usr/local/share/doc/openemm2013/LICENSE.txt
+ # /usr/local/share/doc/openemm2013/ThirdPartyLicences/*
+
+ # update also /usr/local/share with the docs
+ ${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>
Added: head/mail/openemm2015/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/distinfo Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,6 @@
+SHA256 (OpenEMM-2015-src.tar.gz) = 93ead7c631edac5b582401127a596c6519de94a583fe0ff5622debb4506c493f
+SIZE (OpenEMM-2015-src.tar.gz) = 34070297
+SHA256 (OpenEMM-2015-JARs.tar.gz) = 88822c5c2708cf4300bd3456fdf0d4ec7ce79e376abee62e18a9acf281873384
+SIZE (OpenEMM-2015-JARs.tar.gz) = 27445618
+SHA256 (itext-2.1.7.jar) = 7d82c6b097a31cdf5a6d49a327bf582fdec7304da69308f9f6abf54aa9fd9055
+SIZE (itext-2.1.7.jar) = 1130070
Added: head/mail/openemm2015/files/openemm2015.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/openemm2015.in Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,176 @@
+#!/bin/sh
+#
+# %%APP_SHORTNAME%% startup script.
+#
+# $FreeBSD$
+#
+
+# PROVIDE: %%APP_SHORTNAME%%
+# REQUIRE: NETWORKING SERVERS
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable %%APP_SHORTNAME%%:
+# %%APP_SHORTNAME%%_enable (bool): Set to "YES" to enable %%APP_SHORTNAME%%
+# %%APP_SHORTNAME%%_args (str): Optional arguments to OAJBoss
+# %%APP_SHORTNAME%%_log_stdout (str) OpenEMM log output stdout, filename.
+# %%APP_SHORTNAME%%_log_stderr (str) OpenEMM log output stderr, filename.
+#
+
+. /etc/rc.subr
+
+name="%%APP_SHORTNAME%%"
+rcvar=%%APP_SHORTNAME%%_enable
+extra_commands="status"
+
+load_rc_config $name
+
+%%APP_SHORTNAME%%_logdir="%%LOG_DIR%%"
+%%APP_SHORTNAME%%_enable="${%%APP_SHORTNAME%%_enable:-"NO"}"
+%%APP_SHORTNAME%%_log_stdout="${%%APP_SHORTNAME%%_log_stdout:-"${%%APP_SHORTNAME%%_logdir}/log"}"
+%%APP_SHORTNAME%%_log_stderr="${%%APP_SHORTNAME%%_log_stderr:-"${%%APP_SHORTNAME%%_logdir}/error"}"
+%%APP_SHORTNAME%%_args="${%%APP_SHORTNAME%%_args:-""}"
+%%APP_SHORTNAME%%_sleep="${%%APP_SHORTNAME%%_sleep:-"5"}"
+%%APP_SHORTNAME%%_kill9="${%%APP_SHORTNAME%%_kill9:-""}"
+%%APP_SHORTNAME%%_additional_killall="${%%APP_SHORTNAME%%_additional_killall:-""}"
+%%APP_SHORTNAME%%_user="%%USER%%"
+%%APP_SHORTNAME%%_group="%%GROUP%%"
+%%APP_SHORTNAME%%_lockdir="/var/run/openemm"
+
+
+start_cmd="%%APP_SHORTNAME%%_start"
+stop_cmd="%%APP_SHORTNAME%%_stop"
+pidfile="%%PID_FILE%%"
+tomcat_pidfile="tomcat8.pid" # todo replace dynamic with current version
+sendmail_pidfile="sendmail.pid"
+
+OPENEMM_HOME="%%APP_HOME%%"
+#minimal requirements must be set for our javavmwrapper
+JAVA_VERSION="1.8+"
+export JAVA_VERSION
+
+%%APP_SHORTNAME%%_start ()
+{
+ if [ ! -d "${%%APP_SHORTNAME%%_logdir}" ]
+ then
+ install -d -o ${%%APP_SHORTNAME%%_user} ${%%APP_SHORTNAME%%_logdir}
+ fi
+
+ if [ ! -d "${%%APP_SHORTNAME%%_lockdir}" ]
+ then
+ install -d -o ${%%APP_SHORTNAME%%_user} ${%%APP_SHORTNAME%%_lockdir}
+ fi
+
+ echo "Preconditions for %%APP_SHORTNAME%%"
+ echo " - check if sendmail processes are stopped, it will be started via this application"
+
+ if [ -f "/var/run/${sendmail_pidfile}"]
+ then
+ echo "TODO STOP all sendmail processes"
+ service sendmail stop
+
+ # check for sendmail queues started via openemm
+ if [ -f "${%%APP_SHORTNAME%%_lockdir}/mailer.pid" ]
+ then
+ echo "Stop Mailer Service...."
+ pkill qctrl
+ pkill sendmail
+ fi
+ fi
+
+ echo "Starting %%APP_SHORTNAME%%."
+
+ # check for the startup pyhton scripts
+
+
+ # check if tomcat is running otherwise warning
+ if [ ! -f "/var/run/${tomcat_pidfile}" ]
+ then
+ echo "Tomcat is not running please start tomcat first"
+ else
+ echo "Tomcat is running... starting app"
+ fi
+
+ echo "Start BOUNCE Servcie...."
+ daemon -u ${%%APP_SHORTNAME%%_user} ${OPENEMM_HOME}/bin/bounce.sh start >> ${%%APP_SHORTNAME%%_logdir}/bounce.log 2>> ${%%APP_SHORTNAME%%_logdir}/bounce_error.log
+ echo "Start Merger Service...."
+ daemon -u ${%%APP_SHORTNAME%%_user} ${OPENEMM_HOME}/bin/merger.sh start >> ${%%APP_SHORTNAME%%_logdir}/merger.log 2>> ${%%APP_SHORTNAME%%_logdir}/merger_error.log
+ echo "Start Mailer Service...."
+ daemon ${OPENEMM_HOME}/bin/mailer.sh start >> ${%%APP_SHORTNAME%%_logdir}/mailer.log 2>> ${%%APP_SHORTNAME%%_logdir}/mailer_error.log
+ pgrep sendmail > ${openemm2015_lockdir}/mailer.pid
+
+ echo "Start SLRT scan Service...."
+ daemon -u ${%%APP_SHORTNAME%%_user} ${OPENEMM_HOME}/bin/slrtscn.sh start >> ${%%APP_SHORTNAME%%_logdir}/slrtscn.log 2>> ${%%APP_SHORTNAME%%_logdir}/slrtscn_error.log
+
+ echo "START THE APP ITSELF..."
+ #daemon -u ${%%APP_SHORTNAME%%_user} ${OPENEMM_HOME}/bin/standalone.sh ${%%APP_SHORTNAME%%_args} >> ${%%APP_SHORTNAME%%_log_stdout} 2>> ${%%APP_SHORTNAME%%_log_stderr}
+
+ #sleep ${%%APP_SHORTNAME%%_sleep} # let daemon(8) and sh(1) finish before executing pgrep(1)
+ #pgrep -U ${%%APP_SHORTNAME%%_user} -f ${OPENEMM_HOME}/modules > ${pidfile}
+ #chown ${%%APP_SHORTNAME%%_user} $pidfile
+}
+
+%%APP_SHORTNAME%%_stop ()
+{
+
+ ${OPENEMM_HOME}/bin/bounce.sh stop
+ ${OPENEMM_HOME}/bin/merger.sh stop
+
+ #${OPENEMM_HOME}/bin/mailer.sh stop
+ service sendmail stop # pkill sendmail
+ #sendmail stop
+ pkill sendmail
+ terminator bin/qctrl #pkill qctrl
+ ${OPENEMM_HOME}/bin/slrtscn.sh stop
+
+ # Subvert the check_pid_file procname check.
+ # at the moment we dont't handle this here
+ if [ -f ${pidfile} ]
+ then
+ kill `cat ${pidfile}`
+ # Only if we aware that our setup can hangs, and only after trying simple kill, we can kill it hard way.
+ if [ ! -z "${%%APP_SHORTNAME%%_kill9}" ]
+ then
+ sleep ${%%APP_SHORTNAME%%_sleep}
+ #kill -9 `cat ${pidfile}`
+ fi
+ # In some setups, OpenEMM (Tomcat) can spawn some child processess, which could prevent it from stopping, and freeing net ports.
+ # Let's blindly kill them all, since we are really know what we are doing.
+ if [ ! -z "${%%APP_SHORTNAME%%_additional_killall}" ]
+ then
+ sleep ${%%APP_SHORTNAME%%_sleep}
+ killall ${%%APP_SHORTNAME%%_additional_killall}
+ fi
+ fi
+}
+
+terminator() {
+ while [ $# -gt 0 ] ; do
+ __pat="$1"
+ shift
+ if [ "$__pat" ] ; then
+ for sig in 15 9 ; do
+ __run="`ps -aux | grep -- \"$__pat\" | grep -v grep | awk '{ print $2 }'`"
+ if [ "$__run" ] ; then
+ echo "Stop $__pat program with signal $sig .. "
+ kill -$sig $__run >/dev/null 2>&1
+ sleep 2
+ echo "done."
+ fi
+ done
+ fi
+ done
+}
+
+
+%%APP_SHORTNAME%%_status ()
+{
+ # If running, show pid
+ if [ -f ${pidfile} ]
+ then
+ echo "%%APP_SHORTNAME%% is running as pid" `cat ${pidfile}`
+ else
+ echo "%%APP_SHORTNAME%% is not running"
+ fi
+}
+
+run_rc_command "$1"
Added: head/mail/openemm2015/files/patch-backend__GNUmakefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-backend__GNUmakefile Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,11 @@
+--- backend/GNUmakefile.orig 2015-02-20 13:02:20 UTC
++++ backend/GNUmakefile
+@@ -21,7 +21,7 @@
+ ##################################################################################
+
+ all clean::
+- @for dir in contrib src; do $(MAKE) -C $$dir $@ || exit 1; done
++ @for dir in src; do $(MAKE) -C $$dir $@ || exit 1; done
+
+ clean::
+ rm -f *~
Added: head/mail/openemm2015/files/patch-backend__src__c__bav__GNUmakefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-backend__src__c__bav__GNUmakefile Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,20 @@
+--- backend/src/c/bav/GNUmakefile.orig 2015-02-20 13:02:20 UTC
++++ backend/src/c/bav/GNUmakefile
+@@ -20,13 +20,13 @@
+ # Contributor(s): AGNITAS AG.
+ ##################################################################################
+
+-CC = gcc
+-CFLAGS = -I../lib -I../../../contrib/include -pthread
+-LDFLAGS = -L../lib -L../../../contrib/lib -pthread
++CC?= gcc
++CFLAGS = -I../lib -I/usr/local/lib -I/usr/local/include -pthread
++LDFLAGS = -L../lib -L/usr/local/lib -pthread
+ # required for Ubuntu 9.10 by user request
+ LDFLAGS := $(LDFLAGS) -L/usr/lib/libmilter
+ #
+-LIBS = -lagn -lmilter -lsa
++LIBS = -lagn -lmilter -lex -lsa
+ SRCBAV = bav.c cfg.c
+ SRCWRP = bavwrap.c store.c
+ OBJBAV = $(SRCBAV:%.c=%.o)
Added: head/mail/openemm2015/files/patch-backend__src__c__bav__bav.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-backend__src__c__bav__bav.c Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,24 @@
+--- backend/src/c/bav/bav.c.orig 2015-10-24 14:59:57 UTC
++++ backend/src/c/bav/bav.c
+@@ -28,16 +28,17 @@
+ # include <sys/types.h>
+ # include <regex.h>
+ # include <netinet/in.h>
+-# include "libmilter/mfapi.h"
+ # include "bav.h"
++# include "libmilter/mfapi.h"
+
+-# define SOCK_PATH "var/run/bav.sock"
+-# define LOCK_PATH "var/lock/bav.lock"
+-# define CFGFILE "var/spool/bav/bav.conf"
++# define SOCK_PATH "/var/run/openemm/bav.sock"
++# define LOCK_PATH "/var/run/openemm/bav.lock"
++# define CFGFILE "/usr/local/openemm2015/var/spool/bav/bav.conf"
+ # define X_AGN "X-AGNMailloop"
+ # define X_LOOP "X-AGNLoop"
+ # define LOOP_SET "set"
+
++# define bool int
+
+ static const char *program;
+ static const char *loglevel;
Added: head/mail/openemm2015/files/patch-backend__src__c__lib__GNUmakefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-backend__src__c__lib__GNUmakefile Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,13 @@
+--- backend/src/c/lib/GNUmakefile.orig 2015-02-20 13:02:20 UTC
++++ backend/src/c/lib/GNUmakefile
+@@ -20,8 +20,8 @@
+ # Contributor(s): AGNITAS AG.
+ ##################################################################################
+
+-CC = gcc
+-CFLAGS = -I.
++CC?= gcc
++CFLAGS+= -I.
+ SRCS = atob.c \
+ buffer.c \
+ cache.c \
Added: head/mail/openemm2015/files/patch-backend__src__c__lib__agn.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-backend__src__c__lib__agn.h Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,13 @@
+--- backend/src/c/lib/agn.h.orig 2015-10-24 14:59:57 UTC
++++ backend/src/c/lib/agn.h
+@@ -136,8 +136,8 @@ typedef unsigned long hash_t;
+ * Symbolic names for boolean values
+ */
+ typedef enum { /*{{{*/
+- false,
+- true
++ false = 0,
++ true = 1
+ /*}}}*/
+ } bool_t;
+
Added: head/mail/openemm2015/files/patch-backend__src__c__tools__GNUmakefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-backend__src__c__tools__GNUmakefile Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,13 @@
+--- backend/src/c/tools/GNUmakefile.orig 2015-02-20 13:02:20 UTC
++++ backend/src/c/tools/GNUmakefile
+@@ -20,8 +20,8 @@
+ # Contributor(s): AGNITAS AG.
+ ##################################################################################
+
+-CC = gcc
+-CFLAGS = -I../lib
++CC?= gcc
++CFLAGS+= -I../lib
+ LDFLAGS = -L../lib
+ LIBS = -lagn
+ SQCTRL = qctrl.c qlib.c qmove.c qstat.c
Added: head/mail/openemm2015/files/patch-backend__src__c__xmlback__GNUmakefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-backend__src__c__xmlback__GNUmakefile Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,35 @@
+--- backend/src/c/xmlback/GNUmakefile.orig 2015-02-20 13:02:20 UTC
++++ backend/src/c/xmlback/GNUmakefile
+@@ -20,10 +20,10 @@
+ # Contributor(s): AGNITAS AG.
+ ##################################################################################
+
+-CC = gcc
+-CFLAGS = '-DVERSION="OpenEMM 2015"' -I. -I../lib $(shell xml2-config --cflags) -I../../../contrib/include/
+-LDFLAGS = -L../../../contrib/lib
+-LIBS = grammar/libgrammar.a -lslang -L../lib -lagn $(shell xml2-config --libs) -ldl -lm
++CC?= gcc
++CFLAGS+= '-DVERSION="OpenEMM 2015"' -I. -I../lib -I/usr/local/include $(shell xml2-config --cflags)
++LDFLAGS = -L/usr/local/lib
++LIBS = grammar/libgrammar.a -lslang -L../lib -lagn $(shell xml2-config --libs) -lcurses -lm
+ SRCS = append.c \
+ block.c \
+ blockmail.c \
+@@ -63,7 +63,7 @@ all::
+ @$(MAKE) -C ../lib $@
+
+ all clean::
+- make -C grammar $@
++ @${MAKE} -C grammar $@
+
+ all:: xmlback
+
+@@ -71,7 +71,7 @@ xmlback: $(OBJS) grammar/libgrammar.a
+ $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
+
+ grammar/libgrammar.a:
+- make -C grammar
++ @${MAKE} -C grammar
+
+ clean::
+ rm -f xmlback *.o *~
Added: head/mail/openemm2015/files/patch-backend__src__c__xmlback__eval.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-backend__src__c__xmlback__eval.c Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,133 @@
+--- backend/src/c/xmlback/eval.c.orig 2015-10-24 14:59:57 UTC
++++ backend/src/c/xmlback/eval.c
+@@ -198,9 +198,9 @@ ctx_clr (void) /*{{{*/
+ static inline void
+ check_error (void) /*{{{*/
+ {
+- if (SLang_Error) {
++ if (SLang_get_error()) {
+ SLang_restart (1);
+- SLang_Error = 0;
++ SLang_set_error(0);
+ }
+ }/*}}}*/
+ static void
+@@ -243,7 +243,7 @@ type_retrieve (int argc) /*{{{*/
+ int dummy;
+
+ if (! (argv = (type_t *) malloc (argc * sizeof (type_t)))) {
+- SLang_Error = SL_MALLOC_ERROR;
++ SLang_set_error(SL_MALLOC_ERROR);
+ return NULL;
+ }
+ for (n = 0; n < argc; ++n)
+@@ -262,7 +262,7 @@ type_retrieve (int argc) /*{{{*/
+ argv[n].v.n = (double) dummy;
+ break;
+ case SLANG_DOUBLE_TYPE:
+- if (SLang_pop_double (& argv[n].v.n, & dummy, & dummy) == -1)
++ if (SLang_pop_double (& argv[n].v.n) == -1)
+ st = false;
+ break;
+ case SLANG_STRING_TYPE:
+@@ -901,7 +901,7 @@ SLin (void) /*{{{*/
+
+ argc = SLang_Num_Function_Args;
+ if (argc < 2) {
+- SLang_Error = SL_SYNTAX_ERROR;
++ SLang_set_error(SL_SYNTAX_ERROR);
+ return -1;
+ }
+ rc = 0;
+@@ -928,7 +928,7 @@ SLin (void) /*{{{*/
+ }
+ free (i);
+ } else {
+- SLang_Error = SL_MALLOC_ERROR;
++ SLang_set_error(SL_MALLOC_ERROR);
+ rc = -1;
+ }
+ }
+@@ -940,7 +940,7 @@ SLin (void) /*{{{*/
+
+ if (d = (double *) malloc (argc * sizeof (double))) {
+ for (n = 0; n < argc; ++n)
+- if (SLang_pop_double (& d[n], & dummy, & dummy) == -1) {
++ if (SLang_pop_double (& d[n]) == -1) {
+ rc = -1;
+ break;
+ }
+@@ -952,7 +952,7 @@ SLin (void) /*{{{*/
+ }
+ free (d);
+ } else {
+- SLang_Error = SL_MALLOC_ERROR;
++ SLang_set_error(SL_MALLOC_ERROR);
+ rc = -1;
+ }
+ }
+@@ -980,14 +980,14 @@ SLin (void) /*{{{*/
+ }
+ free (s);
+ } else {
+- SLang_Error = SL_MALLOC_ERROR;
++ SLang_set_error(SL_MALLOC_ERROR);
+ rc = -1;
+ }
+ }
+ break;
+ }
+- if ((rc == -1) && (! SLang_Error))
+- SLang_Error = SL_TYPE_MISMATCH;
++ if ((rc == -1) && (! SLang_get_error()))
++ SLang_set_error(SL_TYPE_MISMATCH);
+ return rc;
+ }/*}}}*/
+ static int
+@@ -1000,7 +1000,7 @@ SLbetween (void) /*{{{*/
+
+ argc = SLang_Num_Function_Args;
+ if (argc != 3) {
+- SLang_Error = SL_SYNTAX_ERROR;
++ SLang_set_error(SL_SYNTAX_ERROR);
+ return -1;
+ }
+ if (! (argv = type_retrieve (argc)))
+@@ -1030,8 +1030,8 @@ SLbetween (void) /*{{{*/
+ break;
+ }
+ type_release (argc, argv);
+- if ((rc == -1) && (! SLang_Error))
+- SLang_Error = SL_TYPE_MISMATCH;
++ if ((rc == -1) && (! SLang_get_error()))
++ SLang_set_error(SL_TYPE_MISMATCH);
+ return rc;
+ }/*}}}*/
+ static void
+@@ -1044,7 +1044,7 @@ SLdecode (void) /*{{{*/
+
+ argc = SLang_Num_Function_Args;
+ if ((argc < 4) || (argc % 2 != 0)) {
+- SLang_Error = SL_SYNTAX_ERROR;
++ SLang_set_error(SL_SYNTAX_ERROR);
+ return;
+ }
+ if (! (argv = type_retrieve (argc)))
+@@ -1068,7 +1068,7 @@ SLdecode (void) /*{{{*/
+ if (argv[argc - 1].type != argv[2].type)
+ st = false;
+ if (! st)
+- SLang_Error = SL_TYPE_MISMATCH;
++ SLang_set_error(SL_TYPE_MISMATCH);
+ else {
+ int hit = -1;
+
+@@ -1092,7 +1092,7 @@ SLdecode (void) /*{{{*/
+ switch (argv[hit].type) {
+ default:
+ st = false;
+- SLang_Error = SL_TYPE_MISMATCH;
++ SLang_set_error(SL_TYPE_MISMATCH);
+ break;
+ case SLANG_INT_TYPE:
+ SLang_push_integer ((int) argv[hit].v.n);
Added: head/mail/openemm2015/files/patch-backend__src__c__xmlback__grammar__GNUmakefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-backend__src__c__xmlback__grammar__GNUmakefile Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,13 @@
+--- backend/src/c/xmlback/grammar/GNUmakefile.orig 2015-02-20 13:02:20 UTC
++++ backend/src/c/xmlback/grammar/GNUmakefile
+@@ -20,8 +20,8 @@
+ # Contributor(s): AGNITAS AG.
+ ##################################################################################
+
+-CC = gcc
+-CFLAGS = -I.. -I../../lib $(shell xml2-config --cflags)
++CC?= gcc
++CFLAGS+= -I.. -I../../lib $(shell xml2-config --cflags)
+ LDFLAGS =
+ SRCS = transform.c parse.c
+ OBJS = $(SRCS:%.c=%.o)
Added: head/mail/openemm2015/files/patch-backend__src__script__lib__config.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-backend__src__script__lib__config.sh Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,80 @@
+--- backend/src/script/lib/config.sh.orig 2015-02-20 13:02:20 UTC
++++ backend/src/script/lib/config.sh
+@@ -34,7 +34,7 @@ host="`uname -n | cut -d. -f1`"
+ #
+ # Set the base for the whole system ..
+ if [ ! "$BASE" ] ; then
+- BASE="$HOME"
++ BASE="/usr/local/openemm2015"
+ fi
+ export BASE
+ optbase="$OPENEMM_SW"
+@@ -100,7 +100,7 @@ loglast=0
+ #
+ # Sendmail location
+ #
+-sendmail="$HOME/bin/smctrl"
++sendmail="/usr/local/openemm2015/bin/smctrl"
+ if [ ! -x $sendmail ]; then
+ sendmail="/usr/sbin/sendmail"
+ if [ ! -x $sendmail ] ; then
+@@ -130,7 +130,7 @@ error() {
+ echo "$*" 1>&2
+ }
+ epoch() {
+- python -c "
++ /usr/local/bin/python2.7 -c "
+ import time
+
+ print int (time.time ())
+@@ -235,7 +235,7 @@ pathstrip() {
+ if [ $# -ne 1 ] ; then
+ echo "Usage: $0 <path>" 1>&2
+ else
+- python -c "
++ /usr/local/bin/python2.7 -c "
+ import string
+ def pathstrip (s):
+ rc = []
+@@ -252,7 +252,7 @@ filecount() {
+ if [ $# -ne 2 ] ; then
+ echo "Usage: $0 <dir> <pattern>" 1>&2
+ else
+- python -c "
++ /usr/local/bin/python2.7 -c "
+ import os, sre
+ def filecount (directory, pattern):
+ n = 0
+@@ -356,7 +356,7 @@ terminator() {
+ shift
+ if [ "$__pat" ] ; then
+ for sig in 15 9 ; do
+- __run="`ps -ef | grep -- \"$__pat\" | grep -v grep | awk '{ print $2 }'`"
++ __run="`ps -aux | grep -- \"$__pat\" | grep -v grep | awk '{ print $2 }'`"
+ if [ "$__run" ] ; then
+ messagen "Stop $__pat program with signal $sig .. "
+ kill -$sig $__run >/dev/null 2>&1
+@@ -377,12 +377,12 @@ softterm() {
+ repeat="on"
+ while [ $repeat = "on" ]; do
+ repeat="off"
+- __run="`ps -ef | grep -- \"$__pat\" | grep -v grep | awk '{ print $2 }'`"
++ __run="`ps -aux | grep -- \"$__pat\" | grep -v grep | awk '{ print $2 }'`"
+ if [ "$__run" ] ; then
+ messagen "Stop $__pat program .. "
+ kill -15 $__run >/dev/null 2>&1
+ sleep 1
+- __run="`ps -ef | grep -- \"$__pat\" | grep -v grep | awk '{ print $2 }'`"
++ __run="`ps -aux | grep -- \"$__pat\" | grep -v grep | awk '{ print $2 }'`"
+ if [ "$__run" ]; then
+ messagen "delaying $sv seconds .. "
+ sleep `expr $sv - 1`
+@@ -408,7 +408,7 @@ mestopper() {
+ messagen "Creating $__fn, waiting for $__pat: "
+ touch "$__fn"
+ while true ; do
+- __run="`ps -ef | grep -- \"$__pat\" | grep -v grep | awk '{ print $2 }'`"
++ __run="`ps -aux | grep -- \"$__pat\" | grep -v grep | awk '{ print $2 }'`"
+ if [ ! "$__run" ] ; then
+ break
+ fi
Added: head/mail/openemm2015/files/patch-openemm_build.xml
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/openemm2015/files/patch-openemm_build.xml Sat Oct 24 18:40:39 2015 (r400135)
@@ -0,0 +1,188 @@
+--- openemm_build.xml.orig 2015-10-24 14:59:58 UTC
++++ openemm_build.xml
+@@ -23,8 +23,8 @@
+ <property name="catalina.home" location="/opt/openemm/tomcat" />
+ <property name="src" location="${oe.home}/src/OpenEMM-${version}-src" />
+ <property name="bin" location="${oe.home}/bin/OpenEMM-${version}-bin" />
+- <property name="webroot" location="${bin}/webapps/openemm" />
+- <property name="webroot-ws" location="${bin}/webapps/openemm-ws" />
++ <property name="webroot" location="${oe.home}/webapps/openemm" />
++ <property name="webroot-ws" location="${oe.home}/webapps/openemm-ws" />
+
+
+ <!-- HELP -->
+@@ -39,24 +39,11 @@
+
+ <!-- BUILD -->
+ <target name="build" description="Create OpenEMM Binary Tarball from Source Tarball">
+- <delete dir="${bin}" />
+- <mkdir dir="${bin}" />
+- <delete dir="${src}" />
+- <mkdir dir="${oe.home}/src" />
+- <!-- untar SRC tarball -->
+- <exec executable="tar" dir="${oe.home}/src">
+- <arg line="-xvzf ${oe.home}/OpenEMM-${version}-src.tar.gz" />
+- </exec>
+- <!-- untar JAR tarball -->
+- <mkdir dir="${src}/lib" />
+- <exec executable="tar" dir="${src}/lib">
+- <arg line="-xzvf ${oe.home}/OpenEMM-${version}-JARs.tar.gz" />
+- </exec>
+
+ <!-- Generate Frontend -->
+ <!-- Generate OpenEMM -->
+ <mkdir dir="${webroot}/WEB-INF/classes" />
+- <javac srcdir="${src}/src/java" destdir="${webroot}/WEB-INF/classes" fork="yes" executable="${jdk.compile}/bin/javac" debug="true" deprecation="true" includeantruntime="false">
++ <javac srcdir="${src}/src/java" destdir="${webroot}/WEB-INF/classes" fork="yes" debug="true" deprecation="true" includeantruntime="false">
+ <classpath>
+ <fileset dir="${src}/lib" />
+ <fileset dir="${catalina.home}/lib" includes="*.jar"/>
+@@ -77,7 +64,7 @@
+ </copy>
+ <!-- Generate OpenEMM WS 2.0 -->
+ <mkdir dir="${webroot-ws}/WEB-INF/classes" />
+- <javac srcdir="${src}/src/java" destdir="${webroot-ws}/WEB-INF/classes" fork="yes" executable="${jdk.compile}/bin/javac" debug="true" deprecation="true" includeantruntime="false">
++ <javac srcdir="${src}/src/java" destdir="${webroot-ws}/WEB-INF/classes" fork="yes" debug="true" deprecation="true" includeantruntime="false">
+ <classpath>
+ <fileset dir="${src}/lib" />
+ <fileset dir="${catalina.home}/lib" includes="*.jar"/>
+@@ -98,58 +85,27 @@
+ <fileset dir="${src}/lib" />
+ </copy>
+ <!-- Generate OpenEMM WS 1.0 -->
+- <copy todir="${bin}/webservices">
++ <copy todir="${oe.home}/webservices">
+ <fileset dir="${src}/webservices" />
+ </copy>
+
+ <!-- Generate Manual -->
+- <copy todir="${bin}/webapps/manual">
++ <copy todir="${oe.home}/webapps/manual">
+ <fileset dir="${src}/manual" />
+ </copy>
+
+ <!-- Generate Backend -->
+- <exec executable="make" dir="${src}/backend" />
+
+- <copy todir="${bin}/bin">
+- <fileset dir="${src}/backend/src/script/control" />
+- <filelist dir="${src}/backend/src/c/bav" files="bav"/>
+- <filelist dir="${src}/backend/src/c/tools" files="qctrl,smctrl,updater"/>
+- <filelist dir="${src}/backend/src/c/xmlback" files="xmlback"/>
+- <fileset dir="${src}/tomcat/bin" />
+- </copy>
+- <delete>
+- <filelist dir="${bin}/bin" files="config.bat,openemm.py,setup.bat,start.bat,update.bat" />
+- </delete>
+- <copy todir="${bin}/bin/scripts">
++ <copy todir="${bin}/scripts">
+ <fileset dir="${src}/backend/src/script/process" />
+- <filelist dir="${src}/backend/src/c/bav" files="bavwrap" />
+ <filelist dir="${src}/backend/src/script/lib" files="agn.py,aps.py,config.sh" />
+ </copy>
+ <move todir="${bin}/conf/semu">
+- <fileset dir="${bin}/bin/scripts/semu" />
++ <fileset dir="${bin}/scripts/semu" />
+ </move>
+- <move todir="${bin}/USR_SHARE" file="${bin}/bin/scripts/upgrade-postproc.sh" />
+- <exec executable="ln" dir="${bin}/bin/scripts">
+- <arg line="-s bavwrap filter_or_forward" />
+- </exec>
+- <exec executable="ln" dir="${bin}/bin/scripts">
+- <arg line="-s bavwrap is_no_systemmail" />
+- </exec>
+- <exec executable="ln" dir="${bin}/bin/scripts">
+- <arg line="-s bavwrap scan_and_unsubscribe" />
+- </exec>
+- <delete dir="${bin}/bin/scripts/upgrade" />
++ <move todir="${bin}/USR_SHARE" file="${bin}/scripts/upgrade-postproc.sh" />
++ <delete dir="${bin}/scripts/upgrade" />
+
+- <copy todir="${bin}/conf">
+- <fileset dir="${catalina.home}/conf" />
+- </copy>
+- <delete>
+- <filelist dir="${bin}/conf" files="context.xml,logging.properties,server.xml" />
+- </delete>
+- <copy todir="${bin}/conf">
+- <fileset dir="${src}/tomcat/conf"/>
+- </copy>
+- <delete dir="${bin}/conf/Catalina" />
+ <copy todir="${bin}/conf/bav">
+ <fileset dir="${src}/backend/src/script/data" />
+ </copy>
+@@ -157,24 +113,19 @@
+ <fileset dir="${src}/backend/src/script/process/upgrade" />
+ </copy>
+
+- <mkdir dir="${bin}/var/lock" />
+- <mkdir dir="${bin}/var/log" />
+- <mkdir dir="${bin}/var/run" />
+- <mkdir dir="${bin}/var/spool/bav" />
+- <mkdir dir="${bin}/var/spool/filter" />
+- <mkdir dir="${bin}/var/spool/log" />
+- <mkdir dir="${bin}/var/spool/ADMIN" />
+- <mkdir dir="${bin}/var/spool/ARCHIVE" />
+- <mkdir dir="${bin}/var/spool/DELETED" />
+- <mkdir dir="${bin}/var/spool/META" />
+- <mkdir dir="${bin}/var/spool/QUEUE" />
+- <mkdir dir="${bin}/var/spool/RECOVER" />
++ <mkdir dir="${oe.home}/var/lock" />
++ <mkdir dir="${oe.home}/var/log" />
++ <mkdir dir="${oe.home}/var/run" />
++ <mkdir dir="${oe.home}/var/spool/bav" />
++ <mkdir dir="${oe.home}/var/spool/filter" />
++ <mkdir dir="${oe.home}/var/spool/log" />
++ <mkdir dir="${oe.home}/var/spool/ADMIN" />
++ <mkdir dir="${oe.home}/var/spool/ARCHIVE" />
++ <mkdir dir="${oe.home}/var/spool/DELETED" />
++ <mkdir dir="${oe.home}/var/spool/META" />
++ <mkdir dir="${oe.home}/var/spool/QUEUE" />
++ <mkdir dir="${oe.home}/var/spool/RECOVER" />
+
+- <!-- Generate Other -->
+- <mkdir dir="${bin}/logs/openemm" />
+- <mkdir dir="${bin}/logs/openemm-ws" />
+- <mkdir dir="${bin}/plugins" />
+- <mkdir dir="${bin}/temp" />
+
+ <copy todir="${bin}/USR_SHARE">
+ <fileset dir="${src}/sql" />
+@@ -186,35 +137,7 @@
+ <copy todir="${bin}/USR_SHARE/ThirdPartyLicences">
+ <fileset dir="${src}/other/ThirdPartyLicences" />
+ </copy>
+- <copy todir="${bin}" file="${bin}/USR_SHARE/README.txt" />
+- <copy todir="${bin}" file="${bin}/USR_SHARE/UPDATE.txt" />
+-
+- <!-- Assign Groups+Owners (first) and Permissions (second) -->
+- <chgrp group="openemm" type="both" verbose="true">
+- <fileset dir="${bin}" />
+- </chgrp>
+- <chown owner="openemm" type="both" verbose="true">
+- <fileset dir="${bin}" />
+- </chown>
+- <chgrp group="root" file="${bin}/bin/qctrl" verbose="true" />
+- <chgrp group="root" file="${bin}/bin/smctrl" verbose="true" />
+- <chgrp group="root" file="${bin}/bin/updater" verbose="true" />
+- <chgrp group="root" file="${bin}/conf/bav/bav.rc" verbose="true" />
+- <chown owner="root" file="${bin}/bin/qctrl" verbose="true" />
+- <chown owner="root" file="${bin}/bin/smctrl" verbose="true" />
+- <chown owner="root" file="${bin}/bin/updater" verbose="true" />
+- <chown owner="root" file="${bin}/conf/bav/bav.rc" verbose="true" />
+- <chmod dir="${bin}/bin/" perm="a+x" includes="**/*" verbose="true" />
+- <chmod dir="${bin}/webservices/" perm="a+x" includes="**/*.sh" verbose="true" />
+- <chmod file="${bin}/USR_SHARE/upgrade-postproc.sh" perm="a+x" verbose="true" />
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-ports-all
mailing list