diff options
author | Paul de Vrieze <pauldv@gentoo.org> | 2011-02-18 09:19:02 +0000 |
---|---|---|
committer | Paul de Vrieze <pauldv@gentoo.org> | 2011-02-18 09:19:02 +0000 |
commit | 81db1aea97407232017c1d7d8aaf0c1cb2bca375 (patch) | |
tree | bcda12b8a8bdf685fd99e2c190acd431cd981a87 /www-servers | |
parent | New kde 4.6 set (diff) | |
download | pauldv-81db1aea97407232017c1d7d8aaf0c1cb2bca375.tar.gz pauldv-81db1aea97407232017c1d7d8aaf0c1cb2bca375.tar.bz2 pauldv-81db1aea97407232017c1d7d8aaf0c1cb2bca375.zip |
Add the ebuilds needed for modern eclipse
svn path=/trunk/overlay/; revision=125
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/jetty/Manifest | 5 | ||||
-rw-r--r-- | www-servers/jetty/NOTES | 1 | ||||
-rw-r--r-- | www-servers/jetty/files/conf.d/jetty | 24 | ||||
-rw-r--r-- | www-servers/jetty/files/init.d/jetty | 51 | ||||
-rw-r--r-- | www-servers/jetty/files/settings.xml | 9 | ||||
-rw-r--r-- | www-servers/jetty/jetty-6.1.24.ebuild | 193 |
6 files changed, 283 insertions, 0 deletions
diff --git a/www-servers/jetty/Manifest b/www-servers/jetty/Manifest new file mode 100644 index 0000000..98586ce --- /dev/null +++ b/www-servers/jetty/Manifest @@ -0,0 +1,5 @@ +AUX conf.d/jetty 676 RMD160 47bd799223d448b21e83d4f2102597ba1012788d SHA1 4add53cc8f55b8d3154efab67b4e082270089356 SHA256 19ea54fbf09fab5b3ccaf819ae872935d6d3718ce6e753dc834302a6be4d199f +AUX init.d/jetty 1542 RMD160 60df75201271ac2e62d1a164238a435b842c39b3 SHA1 90f278c31dc1397df1b6bd318f844a2266c8ebf4 SHA256 76872ed861876492cbf1915cb3bbb4fdc36996446744f816a78fbe0b321f8720 +AUX settings.xml 437 RMD160 6c2e1e094cca484f4a2526cae09c7fe11fe1a877 SHA1 d71ad78be096bf930ffd29b5d37830ff56313edb SHA256 fb213cd1494b0b5dc1f21ebaeaad2e6ffc9f80effd5632c4f1d7bdbd4f195aec +DIST jetty-6.1.24-src.zip 5986350 RMD160 03ef81da89ba923863c692895388922f62db78bd SHA1 d879d957173981cb12c1f95031421a1ea66117f6 SHA256 d0dbd9a1f1530dfa482b34fe6d86242c60152b878e774ce802e2186ce2cea3be +EBUILD jetty-6.1.24.ebuild 7529 RMD160 eb8e482705319c44ce3b17262f59b3c9e894ec0c SHA1 2fd03f9a9e39964781557b7bd0afba79aa0b00e8 SHA256 955e67b0e874e1d73687629422cf6ca519479db0ec97cb70ec1e6ae7fe6b604f diff --git a/www-servers/jetty/NOTES b/www-servers/jetty/NOTES new file mode 100644 index 0000000..c823b73 --- /dev/null +++ b/www-servers/jetty/NOTES @@ -0,0 +1 @@ +Jetty ebuild that allows eclipse to be built. diff --git a/www-servers/jetty/files/conf.d/jetty b/www-servers/jetty/files/conf.d/jetty new file mode 100644 index 0000000..730ac76 --- /dev/null +++ b/www-servers/jetty/files/conf.d/jetty @@ -0,0 +1,24 @@ +#Configuration options for jetty server + +#JETTY_HOST=localhost +#JETTY_PORT=8080 + +# port to listen on to stop the server +#STOP_PORT=8079 + +# "password" used on the stop port to verify that the server should be stopped +STOP_KEY=secret + +# Set this value to 1 and configure the jetty-setuid.xml to have the server run as an unprivilaged user +#USE_SETUID=1 + +# jetty 6 has a bug that only lets it connect to ipv6 or ipv4, not both +#USE_IPV6=1 + +# Use the SSL config jetty-ssl.xml +#USE_SSL=1 + +# Set this to a space delimited list of extra conf files you want loaded +# The files are relative to ${JETTY_HOME} so +# ex. JETTY_CONF="etc/jetty-ajp.xml etc/jetty-logging.xml" +#JETTY_CONF="" diff --git a/www-servers/jetty/files/init.d/jetty b/www-servers/jetty/files/init.d/jetty new file mode 100644 index 0000000..1e54649 --- /dev/null +++ b/www-servers/jetty/files/init.d/jetty @@ -0,0 +1,51 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + ebegin "Starting ${SVCNAME}" + + JETTY_HOME="/var/lib/${SVCNAME}" + CONF_FILES="${JETTY_HOME}/etc/jetty.xml" + JETTY_OPTS="-DSTART=${JETTY_HOME}/start.config" + + if [[ -n ${JETTY_HOST} ]]; then + JETTY_OPTS="${JETTY_OPTS} -Djetty.host=${JETTY_HOST}" + fi + if [[ -n ${JETTY_PORT} ]]; then + JETTY_OPTS="${JETTY_OPTS} -Djetty.port=${JETTY_PORT}" + fi + if [[ -n ${STOP_PORT} ]]; then + JETTY_OPTS="${JETTY_OPTS} -DSTOP.PORT=${STOP_PORT}" + fi + if [[ -n ${STOP_KEY} ]]; then + JETTY_OPTS="${JETTY_OPTS} -DSTOP.KEY=${STOP_KEY}" + fi + if [[ ${USE_SETUID} -eq 1 ]]; then + # Setuid configuration file needs to be the first one in the list + CONF_FILES="${JETTY_HOME}/etc/jetty-setuid.xml ${CONF_FILES}" + JETTY_OPTS="${JETTY_OPTS} -Djava.library.path=/usr/lib64/${SVCNAME}/" + fi + if [[ ${USE_IPV6} -ne 1 ]]; then + JETTY_OPTS="${JETTY_OPTS} -Djava.net.preferIPv4Stack=true" + fi + if [[ ${USE_SSL} -eq 1 ]]; then + # Setuid configuration file needs to be the first one in the list + CONF_FILES="${CONF_FILES} ${JETTY_HOME}/etc/jetty-ssl.xml" + fi + + cd "${JETTY_HOME}" + + start-stop-daemon --start --background --make-pidfile \ + --pidfile /var/run/${SVCNAME}.pid \ + --startas java -- ${JETTY_OPTS} -jar ${JETTY_HOME}/start.jar ${CONF_FILES} ${JETTY_CONF} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --pidfile /var/run/${SVCNAME}.pid + eend $? +} diff --git a/www-servers/jetty/files/settings.xml b/www-servers/jetty/files/settings.xml new file mode 100644 index 0000000..01b80ad --- /dev/null +++ b/www-servers/jetty/files/settings.xml @@ -0,0 +1,9 @@ +<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 + http://maven.apache.org/xsd/settings-1.0.0.xsd"> + <localRepository>${WORKDIR}/.m2/repository</localRepository> + <interactiveMode>false</interactiveMode> + <usePluginRegistry>false</usePluginRegistry> + <offline>false</offline> +</settings> diff --git a/www-servers/jetty/jetty-6.1.24.ebuild b/www-servers/jetty/jetty-6.1.24.ebuild new file mode 100644 index 0000000..1bcee53 --- /dev/null +++ b/www-servers/jetty/jetty-6.1.24.ebuild @@ -0,0 +1,193 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils java-pkg-2 + +DESCRIPTION="Jetty Web Server; Java Servlet container" + +SLOT="6" +SRC_URI="http://dist.codehaus.org/jetty/jetty-${PV}/jetty-${PV}-src.zip" +HOMEPAGE="http://jetty.codehaus.org/" +KEYWORDS="~amd64 ~x86" +LICENSE="Apache-2.0" + +IUSE="ant-tasks client ldap ssl stats" + +CDEPEND="dev-java/tomcat-servlet-api:2.5" + +# The main pom only requires jre 1.4, but som of the sub-poms use 1.5 +DEPEND="${CDEPEND} + || ( + >=dev-java/maven-2.0.6 + >=dev-java/maven-bin-2.0.6 + ) + >=virtual/jre-1.5" +RDEPEND="${CDEPEND} + ant-tasks? ( dev-java/ant ) + >=dev-java/slf4j-api-1.3.1 + >=dev-java/sun-javamail-1.4 + >=dev-java/jta-1.0.1 + >=java-virtuals/jaf-1.1 + >=virtual/jdk-1.5" + +SLOT="6" + +src_prepare() { + cd "${S}" + # Remove the test packages so they aren't run by maven + rm -rf {extras,modules,contrib}/*/src/test/ \ + extras/setuid/modules/native/src/test contrib/*/*/src/test \ + webapps \ + etc/* \ + bin/* + + # minify the poms to reduce testing and compilation + sed -i -e '/<module>modules\/jsp-.*2\.0<\/module>/d + /<module>modules\/.*maven.*<\/module>/d + /<module>extras\/win32service<\/module>/d + /<module>extras\/spring<\/module>/d + /<module>contrib\/cometd<\/module>/d + /<module>contrib\/sweeper<\/module>/d + /<module>examples\/.*<\/module>/d + ' ${S}/pom.xml || die "unable to edit pom.xml" + + # remove scope on known dependencies so we can replace them with the system libs + #find ${S} -name pom.xml -exec sed -i -e '/<dependencies>/,/<\/dependencies>/{ + # /<dependency>/,/<\/dependency>/{ + # /<artifactId>junit</,/<\/scope>/s/<scope>.*<\/scope>// + # /<artifactId>slf4j-api</,/<\/scope>/s/<scope>.*<\/scope>// + # /<artifactId>ant</,/<\/scope>/s/<scope>.*<\/scope>// + # /<artifactId>.*jta</,/<\/scope>/s/<scope>.*<\/scope>// + # /<artifactId>mail</,/<\/scope>/s/<scope>.*<\/scope>// + # } + # }' '{}' \; || die "unable to edit pom dependencies" + + # use system libraries + #find ${S} -name pom.xml -exec sed -i -e '/<dependencies>/,/<\/dependencies>/{ + # /<artifactId>junit<\/artifactId>/a<scope>test<\/scope> + # /<artifactId>slf4j-api<\/artifactId>/a<scope>system</scope><systemPath>/usr/share/slf4j-api/lib/slf4j-api.jar</systemPath> + # /<artifactId>ant<\/artifactId>/a<scope>system</scope><systemPath>/usr/share/ant/lib/ant.jar</systemPath> + # /<artifactId>.*jta<\/artifactId>/a<scope>system</scope><systemPath>/usr/share/jta/lib/jta.jar</systemPath> + # /<artifactId>mail<\/artifactId>/a<scope>system</scope><systemPath>/usr/share/sun-javamail/lib/mail.jar</systemPath> + # }' '{}' \; || die "unable to edit pom dependencies" + + if ! use ant-tasks ; then + sed -i -e '/<module>contrib\/jetty-ant<\/module>/d' ${S}/pom.xml || die "unable to edit pom.xml" + fi + if ! use client ; then + sed -i -e '/<module>extras\/client<\/module>/d' ${S}/pom.xml || die "unable to edit pom.xml" + fi + if ! use ldap ; then + sed -i -e '/<module>contrib\/jetty-ldap-jaas<\/module>/d' ${S}/pom.xml || die "unable to edit pom.xml" + fi + if ! use ssl ; then + sed -i -e '/<module>extras\/sslengine<\/module>/d' ${S}/pom.xml || die "unable to edit pom.xml" + fi + if ! use stats ; then + sed -i -e '/<module>extras\/jetty-java5-stats<\/module>/d' ${S}/pom.xml || die "unable to edit pom.xml" + fi + # remove the test execution from terracotta build + sed -i -e '45,53d' ${S}/contrib/terracotta/pom.xml || die "unable to edit terracotta pom.xml" +} + +src_compile() { + cd "${S}" + mvn -ff -s ${FILESDIR}/settings.xml install -Dmaven.test.skip -DWORKDIR="${WORKDIR}" || die +} + +src_install() { + cd "${S}" + rm -f etc/jetty-sslengine.xml + java-pkg_dojar start.jar + java-pkg_newjar lib/${PN}-${PV}.jar ${PN}.jar + java-pkg_newjar lib/${PN}-util-${PV}.jar ${PN}-util.jar + java-pkg_newjar lib/jre1.5/${PN}-util5-${PV}.jar ${PN}-util5.jar + java-pkg_newjar lib/annotations/${PN}-annotations-${PV}.jar ${PN}-annotations.jar + java-pkg_newjar lib/ext/${PN}-rewrite-handler-${PV}.jar ${PN}-rewrite-handler.jar + java-pkg_newjar lib/ext/${PN}-html-${PV}.jar ${PN}-html.jar + java-pkg_newjar lib/ext/${PN}-java5-threadpool-${PV}.jar ${PN}-java5-threadpool.jar + java-pkg_newjar lib/ext/${PN}-ajp-${PV}.jar ${PN}-ajp.jar + java-pkg_newjar lib/ext/${PN}-servlet-tester-${PV}.jar ${PN}-servlet-tester.jar + java-pkg_newjar lib/ext/${PN}-setuid-${PV}.jar ${PN}-setuid.jar + java-pkg_doso lib/ext/libsetuid.so + java-pkg_newjar lib/jsp-2.1/jsp-2.1-${PN}-${PV}.jar jsp-2.1-${PN}.jar + java-pkg_newjar lib/management/${PN}-management-${PV}.jar ${PN}-management.jar + java-pkg_newjar lib/naming/${PN}-naming-${PV}.jar ${PN}-naming.jar + java-pkg_newjar lib/plus/${PN}-plus-${PV}.jar ${PN}-plus.jar + java-pkg_newjar lib/terracotta/${PN}-terracotta-sessions-${PV}.jar ${PN}-terracotta-sessions.jar + java-pkg_newjar lib/xbean/${PN}-xbean-${PV}.jar ${PN}-xbean.jar + + if use ant-tasks ; then + java-pkg_dojar bin/jetty-tasks.xml + java-pkg_newjar contrib/jetty-ant/target/${PN}-ant-${PV}.jar ${PN}-ant.jar + fi + + use client && java-pkg_newjar lib/ext/${PN}-client-${PV}.jar ${PN}-client.jar + if use ldap ; then + java-pkg_newjar lib/ext/${PN}-ldap-jaas-${PV}.jar ${PN}-ldap-jaas.jar + else + rm -f etc/jetty-jaas.xml + fi + if use ssl ; then + java-pkg_newjar lib/ext/${PN}-sslengine-${PV}.jar ${PN}-sslengine.jar + else + rm -f etc/jetty-ssl.xml + fi + if use stats ; then + java-pkg_newjar lib/ext/${PN}-java5-stats-${PV}.jar ${PN}-java5-stats.jar + else + rm -f etc/jetty-stats.xml + fi + + MY_JETTY=${PN}-${SLOT} + + dodir /etc/${MY_JETTY} + insinto /etc/${MY_JETTY} + doins etc/* + + dodir /etc/conf.d + insinto /etc/conf.d + newins ${FILESDIR}/conf.d/${PN} ${MY_JETTY} + + dodir /etc/init.d + exeinto /etc/init.d + newexe ${FILESDIR}/init.d/${PN} ${MY_JETTY} + + dodir /var/log/${MY_JETTY} + + JETTY_HOME=/var/lib/${MY_JETTY} + dodir ${JETTY_HOME}/webapps + dodir ${JETTY_HOME}/contexts + dodir ${JETTY_HOME}/resources + dosym ${JAVA_PKG_JARDEST} ${JETTY_HOME}/lib + dosym ${JAVA_PKG_JARDEST}/start.jar ${JETTY_HOME}/ + dosym /etc/${MY_JETTY} ${JETTY_HOME}/etc + dosym /var/log/${MY_JETTY} ${JETTY_HOME}/logs + + START_CONFIG=${D}/${JETTY_HOME}/start.config + echo "\$(jetty.class.path).path always" > ${START_CONFIG} + echo "\$(jetty.lib)/** exists \$(jetty.lib)" >> ${START_CONFIG} + echo "jetty.home=${JETTY_HOME}" >> ${START_CONFIG} + echo "org.mortbay.xml.XmlConfiguration.class" >> ${START_CONFIG} + echo "\$(start.class).class" >> ${START_CONFIG} + echo "\$(jetty.home)/etc/jetty.xml" >> ${START_CONFIG} + echo "\$(jetty.home)/lib/*" >> ${START_CONFIG} + echo "/usr/share/sun-javamail/lib/*" >> ${START_CONFIG} + echo "/usr/share/ant/lib/*" >> ${START_CONFIG} + echo "/usr/share/slf4j-api/lib/*" >> ${START_CONFIG} + echo "/usr/share/jta/lib/*" >> ${START_CONFIG} + echo "/usr/share/tomcat-servlet-api-2.5/lib/*" >> ${START_CONFIG} + #echo "" >> ${START_CONFIG} + #echo "" >> ${START_CONFIG} + echo "" >> ${START_CONFIG} + echo "\$(jetty.home)/resources/" >> ${START_CONFIG} +} + +pkg_preinst () { + enewuser jetty + fowners jetty:jetty /var/log/${MY_JETTY} + fperms g+w /var/log/${MY_JETTY} +} |