summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2016-08-21 15:47:15 +0200
committerPatrice Clement <monsieurp@gentoo.org>2016-08-21 15:47:50 +0200
commit1f93ca52d6a7305ebcf0beb36c947c7cdc88e8a9 (patch)
treecf1e6a163543c3b7d91d51699b91b92df498717b /www-servers/resin
parentwww-apps/airdcpp-webui: remove old. (diff)
downloadgentoo-1f93ca52d6a7305ebcf0beb36c947c7cdc88e8a9.tar.gz
gentoo-1f93ca52d6a7305ebcf0beb36c947c7cdc88e8a9.tar.bz2
gentoo-1f93ca52d6a7305ebcf0beb36c947c7cdc88e8a9.zip
www-servers/resin: version bump to 4.0.48.
Gentoo-Bug: https://bugs.gentoo.org/587762 Package-Manager: portage-2.2.28
Diffstat (limited to 'www-servers/resin')
-rw-r--r--www-servers/resin/Manifest1
-rw-r--r--www-servers/resin/files/4.0.48/build.xml.patch59
-rw-r--r--www-servers/resin/files/4.0.48/resin.conf16
-rw-r--r--www-servers/resin/files/4.0.48/resin.init37
-rw-r--r--www-servers/resin/resin-4.0.48.ebuild181
5 files changed, 294 insertions, 0 deletions
diff --git a/www-servers/resin/Manifest b/www-servers/resin/Manifest
index b4d633012157..71b4328b43f5 100644
--- a/www-servers/resin/Manifest
+++ b/www-servers/resin/Manifest
@@ -1 +1,2 @@
DIST resin-4.0.46-src.zip 40400255 SHA256 e762506c432dc12f5100903993220b7ace6ff98ce1ed2c17a53737d04f47ebcf SHA512 49f468706a3269f851a6b359d6020b01dadb312890c97208b1a66353fb82b2d95625947a472d8d3e535d0c52ec6ad3e110eb4d227014fe7a89f313ae1df6970f WHIRLPOOL a3d12e09e2596a1e705d4cd1b1870e411080ca6371411574e7830d48ec0058463944fded005e94fc929a0635403cba27d78fc379bf1f222b0e953828ae280238
+DIST resin-4.0.48-src.zip 40883010 SHA256 f14b4c77fe5003ab11be1e87884a897c09bafb3a5e321f4813305f8192f7f161 SHA512 a992ebbff8af9f10e825a259e831dc340f9d74c5a117033a7eda2eb59a453d9e7d0e5e6feaf7bb36526ac65c8a7e1f55f737bb68af3e7e9647381ada995542ee WHIRLPOOL 099aa3cc480863322bed35c876b0e58fd481475d38b7970db02545f69338cc0fbf41719f0c22b8778009b337559c22eaca862634e3d75d896d34eff45d305c8e
diff --git a/www-servers/resin/files/4.0.48/build.xml.patch b/www-servers/resin/files/4.0.48/build.xml.patch
new file mode 100644
index 000000000000..dc3a413fc0bf
--- /dev/null
+++ b/www-servers/resin/files/4.0.48/build.xml.patch
@@ -0,0 +1,59 @@
+--- build.xml.orig 2015-08-12 23:14:20.302000000 +0000
++++ build.xml 2015-08-12 23:14:47.909000000 +0000
+@@ -12,7 +12,7 @@
+ <property name="eclipse.home" value="${user.home}/eclipse"/>
+
+ <target name="compile"
+- depends="init, hessian, javaee, jaxstream, portlet, script, resin-kernel, quercus-dev, resin, ecmascript, cdi, webutil, conf, ext, j2ee-management, resin-eclipselink, gae, jasper">
++ depends="init, hessian, javaee, jaxstream, portlet, script, resin-kernel, quercus-dev, resin, ecmascript, cdi, webutil, conf, ext, j2ee-management, gae">
+ </target>
+
+ <!--
+@@ -27,10 +27,6 @@
+ </antcall>
+ </target>
+ -->
+- <target name="resin-eclipselink" depends="eclipselink">
+- <copy file="modules/eclipselink/dist/resin-eclipselink.jar"
+- todir="${resin.lib}"/>
+- </target>
+
+ <target name="richfaces" depends="init">
+ <antcall target="artifact" inheritRefs="true">
+@@ -92,13 +88,6 @@
+ </antcall>
+ </target>
+
+- <target name="eclipselink" depends="init">
+- <antcall target="module" inheritRefs="true">
+- <param name="module.name" value="eclipselink"/>
+- <param name="module.jar" value="resin-eclipselink.jar"/>
+- </antcall>
+- </target>
+-
+ <!-- gae APIs for quercus testing -->
+ <target name="gae" depends="init">
+ <antcall target="module" inheritRefs="true">
+@@ -437,13 +426,6 @@
+ </antcall>
+ </target>
+
+- <target name="jasper" depends="init">
+- <antcall target="module" inheritRefs="true">
+- <param name="module.name" value="jasper"/>
+- <param name="module.jar" value="resin-jasper.jar"/>
+- </antcall>
+- </target>
+-
+ <target name="version">
+ <copy file="${resin.modules}/kernel/src/com/caucho/Version.tmpl"
+ tofile="${resin.modules}/kernel/src/com/caucho/Version.java"
+@@ -903,7 +885,7 @@
+ <delete dir="${dist}/${dist.name}"/>
+ </target>
+
+- <target name="dist" depends="dist.clean, configure, compile, update, junit, eclipselink, artifacts, resin.dist.build, dist.package, quercus.war"/>
++ <target name="dist" depends="dist.clean, configure, compile, update, junit, artifacts, resin.dist.build, dist.package, quercus.war"/>
+
+ <target name="configure" depends="init">
+ <copy tofile="modules/c/src/resin/Makefile.in"
diff --git a/www-servers/resin/files/4.0.48/resin.conf b/www-servers/resin/files/4.0.48/resin.conf
new file mode 100644
index 000000000000..a48840b5e9f2
--- /dev/null
+++ b/www-servers/resin/files/4.0.48/resin.conf
@@ -0,0 +1,16 @@
+# JVM Runtime
+# Using the default setting, it will determine your JVM from the system-vm
+# set using java-config.
+# See java-config(1) manual page for assistance in determining this value.
+
+# You can override this value with whatever JDK you want.
+# For a list of valid values for GENTOO_VM see output of
+# java-config -L
+#GENTOO_VM=sun-jdk-1.5
+
+# Verbose starting and stopping? (yes/no, defaults to no)
+#VERBOSE="yes"
+
+# Select which server will be started, this is an advanced feature, please refer
+# to Resin documentation.
+SERVER_ID=""
diff --git a/www-servers/resin/files/4.0.48/resin.init b/www-servers/resin/files/4.0.48/resin.init
new file mode 100644
index 000000000000..66e26463e84a
--- /dev/null
+++ b/www-servers/resin/files/4.0.48/resin.init
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ use dns logger mysql postgresql
+}
+
+runResin() {
+ JAVA_HOME=$(java-config -O)
+ [ -n "${GENTOO_VM}" ] && JAVA_HOME=$(java-config --select-vm="${GENTOO_VM}" -O)
+ export JAVA_HOME
+
+ local extraArgs=
+ if [ "${VERBOSE}" = "yes" ]; then
+ extraArgs="-verbose"
+ fi
+
+ local msg="${1}"
+ shift
+
+ local cmdline="${JAVA_HOME}/bin/java -jar /usr/share/resin/lib/resin.jar -conf /etc/resin/resin.xml -server \"${SERVER_ID}\" -resin-home __RESIN_HOME__ -root-directory __RESIN_HOME__ ${extraArgs} ${@}"
+
+ ebegin "${msg}"
+ su - resin -c "${cmdline}"
+ eend $?
+}
+
+start() {
+ runResin "Starting Resin" "start"
+}
+
+stop() {
+ runResin "Stopping Resin" "shutdown"
+}
diff --git a/www-servers/resin/resin-4.0.48.ebuild b/www-servers/resin/resin-4.0.48.ebuild
new file mode 100644
index 000000000000..2d7ac2bd3570
--- /dev/null
+++ b/www-servers/resin/resin-4.0.48.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="source"
+
+inherit java-pkg-2 java-ant-2 eutils flag-o-matic multilib user
+
+DESCRIPTION="A fast Servlet and JSP engine"
+HOMEPAGE="http://www.caucho.com"
+SRC_URI="http://www.caucho.com/download/${P}-src.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="admin doc"
+
+KEYWORDS="~amd64 ~x86"
+
+CDEPEND="
+ dev-java/jsr101:0
+ dev-java/mojarra:2.2
+ dev-java/oracle-javamail:0
+ dev-java/validation-api:1.0
+ dev-java/resin-servlet-api:3.1
+ dev-java/glassfish-xmlrpc-api:0
+ dev-java/glassfish-deployment-api:1.2"
+
+RDEPEND="
+ ${CDEPEND}
+ >=virtual/jre-1.6"
+
+DEPEND="
+ ${CDEPEND}
+ app-arch/unzip
+ dev-libs/openssl
+ >=virtual/jdk-1.6
+ dev-java/ant-core:0"
+
+RESIN_HOME="/usr/$(get_libdir)/resin"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+
+EANT_GENTOO_CLASSPATH="
+ jsr101
+ mojarra-2.2
+ oracle-javamail
+ validation-api-1.0
+ glassfish-xmlrpc-api
+ resin-servlet-api-3.1
+ glassfish-deployment-api-1.2
+"
+
+PATCHES=(
+ "${FILESDIR}"/"${PV}"/build.xml.patch
+)
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ enewgroup resin
+ enewuser resin -1 /bin/bash "${RESIN_HOME}" resin
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ # No bundled JARs!
+ rm -rv "${S}"/modules/ext/*.jar "${S}"/project-jars || die
+
+ java-ant_bsfix_one "${S}/build.xml"
+ java-ant_bsfix_one "${S}/build-common.xml"
+
+ rm -rv lib/* || die
+
+ ln -s $(java-config --jdk-home)/lib/tools.jar || die
+}
+
+src_configure() {
+ append-flags -fPIC -DPIC
+
+ chmod 755 "${S}/configure" || die
+ econf --prefix=${RESIN_HOME} || die "econf failed"
+}
+
+src_compile() {
+ einfo "Building libraries..."
+ emake
+
+ einfo "Building jars..."
+ eant || die "ant failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ einfo "Moving configuration to /etc ..."
+ dodir /etc/
+ mv "${D}/${RESIN_HOME}/conf" "${D}/etc/resin" || die
+ dosym /etc/resin ${RESIN_HOME}/conf
+
+ einfo "Rewriting resin.xml ..."
+ sed -i \
+ -e 's,${resin.root}/doc/resin-doc,webapps/resin-doc,' \
+ -e 's,${resin.root}/doc/admin,webapps/admin,' \
+ "${D}/etc/resin/resin.xml" || die
+
+ einfo "Fixing log directory ..."
+ rm -rv "${D}/${RESIN_HOME}"/log || die
+ keepdir /var/log/resin
+ dosym /var/log/resin ${RESIN_HOME}/log
+
+ einfo "Installing basic documentation ..."
+ dodoc README "${S}"/conf/*.xml
+
+ einfo "Installing init.d script ..."
+ newinitd "${FILESDIR}/${PV}/resin.init" resin
+ newconfd "${FILESDIR}/${PV}/resin.conf" resin
+
+ sed -i -e "s,__RESIN_HOME__,${RESIN_HOME},g" "${D}/etc/init.d/resin" || die
+
+ einfo "Fixing location of jars ..."
+ #rm -v "${S}"/lib/tools.jar || die
+ java-pkg_dojar "${S}"/lib/*.jar
+ rm -rv "${D}/${RESIN_HOME}"/lib || die
+ dosym /usr/share/resin/lib ${RESIN_HOME}/lib
+
+ dodir /var/lib/resin/webapps
+ keepdir /var/lib/resin/hosts
+ keepdir /var/lib/resin/resin-data
+ keepdir /var/lib/resin/watchdog-data
+
+ mv "${D}"/${RESIN_HOME}/webapps/* "${D}/var/lib/resin/webapps" || die
+ rm -rv "${D}/${RESIN_HOME}"/webapps || die
+ dosym /var/lib/resin/webapps ${RESIN_HOME}/webapps
+ dosym /var/lib/resin/hosts ${RESIN_HOME}/hosts
+ dosym /var/lib/resin/resin-data ${RESIN_HOME}/resin-data
+ dosym /var/lib/resin/watchdog-data ${RESIN_HOME}/watchdog-data
+
+ dosym \
+ "$(java-pkg_getjar resin-servlet-api-3.1 resin-servlet-api.jar)" \
+ "${JAVA_PKG_JARDEST}/resin-servlet-api.jar"
+
+ use admin && {
+ einfo "Installing administration app ..."
+ cp -a "${S}/doc/admin" "${D}/var/lib/resin/webapps/" || die
+ }
+ use doc && {
+ einfo "Installing documentation app ..."
+ cp -a "${S}/doc/resin-doc" "${D}/var/lib/resin/webapps/" || die
+ }
+
+ use source && {
+ einfo "Installing sources ..."
+ java-pkg_dosrc "${S}"/modules/*/src/* > /dev/null
+ }
+
+ einfo "Removing stale directories ..."
+ rm -rv "${D}/${RESIN_HOME}"/{bin,doc} || die
+ #rm -rv "${D}"/etc/resin/*.orig || die
+
+ einfo "Fixing ownerships and permissions ..."
+ fowners -R 0:root /
+ fowners -R resin:resin /etc/resin
+ fowners -R resin:resin /var/lib/resin
+ fowners -R resin:resin /var/log/resin
+
+ fperms 644 /etc/conf.d/resin
+ fperms 755 /etc/init.d/resin
+ fperms 750 /var/lib/resin
+ fperms 750 /etc/resin
+}
+
+pkg_postinst() {
+ elog
+ elog " User and group 'resin' have been added."
+ elog
+ elog " By default, Resin runs on port 8080. You can change this"
+ elog " value by editing /etc/resin/resin.properties."
+ elog
+}