added fixed (?) ebuild for jboss-as-bin (copied from cvut overlay)
This commit is contained in:
parent
01e49c33ba
commit
d31a02a67e
4 changed files with 290 additions and 0 deletions
4
dev-java/jboss-as-bin/Manifest
Normal file
4
dev-java/jboss-as-bin/Manifest
Normal file
|
@ -0,0 +1,4 @@
|
|||
AUX jboss-as.conf 1560 SHA256 a2a21bf3997481271696ad0911c387d917c2333e3e300e42f931a3f3b1eb9f71 SHA512 cae7c702d8f25b85d21d9c46319981a535c2506c1458cf442fe930afc907a41bb5725025632062568a5de0c11a79a392111f7fe055d09352be8b9b6b19417158 WHIRLPOOL 28f294c3d44c42c89b4fc6686a1518ef596ab1fb478e1872188698213828d740796200f1ad6be76385ba6041efb632b3b170e47344edffdeff38a3a1e1eebfc1
|
||||
AUX jboss-as.init 3112 SHA256 851e0303430d18c43f8b1543617e278e0878bc66e32eab818e6b77c41b87df20 SHA512 79fc22caccba7d45333118e9e1e556f16d7a2d1546eb15869fa66ed32d03cc39359f95f21d32b30ad22273fa4cdf8bfb0b355e56b07e876f291b9e9ad84ee15e WHIRLPOOL f331a41cca09046abb89a4a2bf826fcd4876c6aa986e062f15eb03a5565e89890f7eaae31e5c9190ead3661ff04a2bd673418e8596be8ec6d0dc43c0596caf4c
|
||||
DIST jboss-as-7.1.1.Final.tar.gz 132775715 SHA256 88fd3fdac4f7951cee3396eff3d70e8166c3319de82d77374a24e3b422e0b2ad SHA512 bfa15332dd2e3b88b5653d6ef4d21c5d8e5c30f091b7ce33fd079b337955d8b0f08be05b356664ec6b2f925de9533d490e00f5cd8d39b1ed5fca83cf05509004 WHIRLPOOL 67e3017758176ffcaaaa3a3c011e4f42cdf432caef2a6f74abeb30b0d49473ea9b24f7dee48c62ca0036ff5d42d3b5b0304575860bce283f08ee1086c436108b
|
||||
EBUILD jboss-as-bin-7.1.1.ebuild 3005 SHA256 df276adeb087334dbe74a5760dc730514bbad77f67c0e8d846f890c9e5129acb SHA512 48d4c21f87a855c4fbfa46eb03b7920d30732f8f25f506cf99ed83e860f2fd43d9f9b2a50171d0f77b14c98e94228f4c69958c90fc4d2e5a6adccad65ab278ab WHIRLPOOL a27d2503e20eb2efd65a5659f6da561bc6c1ee0e30b192ced83adb1a9292bd7e186cffb0845f45c0f9390dbc2fc56b5f81627a1e32424520ee5a014360264dee
|
53
dev-java/jboss-as-bin/files/jboss-as.conf
Normal file
53
dev-java/jboss-as-bin/files/jboss-as.conf
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Config file for /etc/init.d/__JBOSS_NAME__
|
||||
|
||||
# Location of the standalone server directory
|
||||
#
|
||||
SERVER_BASE_DIR="/var/lib/__JBOSS_NAME__"
|
||||
|
||||
# Directory with configuration files
|
||||
#
|
||||
#SERVER_CONFIG_DIR="/etc/__JBOSS_NAME__"
|
||||
|
||||
# The main server configuration file
|
||||
#
|
||||
#SERVER_CONFIG="standalone.xml"
|
||||
|
||||
# Where to put log files
|
||||
#
|
||||
#SERVER_LOG_DIR="/var/log/__JBOSS_NAME__"
|
||||
|
||||
# User who should own the process.
|
||||
#
|
||||
#JBOSS_USER=jboss
|
||||
#JBOSS_GROUP=jboss
|
||||
|
||||
# The amount of time to wait for startup
|
||||
#
|
||||
#STARTUP_WAIT=60
|
||||
|
||||
# The amount of time to wait for shutdown
|
||||
#
|
||||
#SHUTDOWN_WAIT=30
|
||||
|
||||
# Uncomment the following line to prevent manipulation of JVM options
|
||||
# by shell scripts.
|
||||
#
|
||||
#PRESERVE_JAVA_OPTS=true
|
||||
|
||||
# Specify options to pass to the Java VM.
|
||||
#
|
||||
JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
|
||||
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true"
|
||||
JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"
|
||||
|
||||
# Sample JPDA settings for remote socket debugging
|
||||
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
|
||||
|
||||
# Sample JPDA settings for shared memory debugging
|
||||
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"
|
||||
|
||||
# Uncomment to not use JBoss Modules lockless mode
|
||||
#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.lockless=false"
|
||||
|
||||
# Uncomment to gather JBoss Modules metrics
|
||||
#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.metrics=true"
|
118
dev-java/jboss-as-bin/files/jboss-as.init
Normal file
118
dev-java/jboss-as-bin/files/jboss-as.init
Normal file
|
@ -0,0 +1,118 @@
|
|||
#!/sbin/runscript
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
name="JBoss AS (standalone)"
|
||||
description="JBoss Application Server __JBOSS_VER__ in standalone mode"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns
|
||||
provide jboss-as
|
||||
}
|
||||
|
||||
init_vars() {
|
||||
jboss_home="/opt/__JBOSS_NAME__"
|
||||
temp_dir="/var/tmp/__JBOSS_NAME__"
|
||||
pidfile="/var/run/__JBOSS_NAME__/standalone.pid"
|
||||
|
||||
base_dir=${SERVER_BASE_DIR:-"/var/lib/__JBOSS_NAME__"}
|
||||
data_dir=${SERVER_DATA_DIR:-"${base_dir}/data"}
|
||||
deploy_dir=${SERVER_DEPLOY_DIR:-"${data_dir}/content"}
|
||||
|
||||
config_dir=${SERVER_CONFIG_DIR:-"/etc/__JBOSS_NAME__"}
|
||||
log_dir=${SERVER_LOG_DIR:-"/var/log/__JBOSS_NAME__"}
|
||||
|
||||
config=${SERVER_CONFIG:-"standalone.xml"}
|
||||
|
||||
user=${JBOSS_USER:-"jboss"}
|
||||
group=${JBOSS_GROUP:-"jboss"}
|
||||
startup_wait=${STARTUP_WAIT:-"60"}
|
||||
shutdown_wait=${SHUTDOWN_WAIT:-"30"}
|
||||
|
||||
console_log="${log_dir}/console.log"
|
||||
|
||||
jboss_opts="-Djboss.server.base.dir=${base_dir}"
|
||||
jboss_opts="${jboss_opts} -Djboss.server.config.dir=${config_dir}"
|
||||
jboss_opts="${jboss_opts} -Djboss.server.data.dir=${data_dir}"
|
||||
jboss_opts="${jboss_opts} -Djboss.server.log.dir=${log_dir}"
|
||||
jboss_opts="${jboss_opts} -Djboss.server.temp.dir=${temp_dir}"
|
||||
jboss_opts="${jboss_opts} -Djboss.server.deploy.dir=${deploy_dir}"
|
||||
|
||||
command="${jboss_home}/bin/standalone.sh"
|
||||
command_args="${jboss_opts} --server-config ${config} ${JBOSS_OPTIONS}"
|
||||
}
|
||||
|
||||
init_env_vars() {
|
||||
# Configuration variables for JBoss script
|
||||
export JAVA_HOME=`java-config --jre-home`
|
||||
export JAVA_OPTS
|
||||
export JBOSS_HOME=${jboss_home}
|
||||
export JBOSS_PIDFILE="${pidfile}"
|
||||
export LAUNCH_JBOSS_IN_BACKGROUND=1
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
init_vars
|
||||
init_env_vars
|
||||
|
||||
if [ ! -d ${base_dir} ]; then
|
||||
eerror "Server base directory ${base_dir} does not exist!"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -f "${config_dir}/${config}" ]; then
|
||||
eerror "Configuration file ${config} does not exist!"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ${user} = "root" ]; then
|
||||
eerror "It's not a good idea to run as root!"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
checkpath -d -o ${user} "${config_dir}"
|
||||
checkpath -d -o ${user} "${log_dir}"
|
||||
checkpath -d -o "${user}:${group}" -m750 "${data_dir}"
|
||||
checkpath -d -o "${user}:${group}" -m750 "${deploy_dir}"
|
||||
checkpath -d -o "${user}:${group}" -m700 "${temp_dir}"
|
||||
checkpath -d -o "${user}:${group}" -m700 `dirname ${pidfile}`
|
||||
|
||||
checkpath -f -o ${user} "${console_log}"
|
||||
cat /dev/null > "${console_log}"
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting JBoss Application Server __JBOSS_VER__"
|
||||
|
||||
start-stop-daemon --start --background --quiet \
|
||||
--user="${user}:${group}" \
|
||||
--pidfile="${pidfile}" \
|
||||
--stdout "${console_log}" --stderr "${console_log}" \
|
||||
--exec ${command} -- ${command_args} \
|
||||
|
||||
count=0; result=1
|
||||
until [ $count -gt $startup_wait ]; do
|
||||
grep 'JBoss AS.*started in' "$console_log" > /dev/null
|
||||
if [ $? -eq 0 ] ; then
|
||||
result=0
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
let count=$count+1;
|
||||
done
|
||||
|
||||
eend $result
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping JBoss Application Server __JBOSS_VER__"
|
||||
init_vars
|
||||
|
||||
start-stop-daemon --stop --quiet \
|
||||
--pidfile=${pidfile} \
|
||||
--retry=TERM/${shutdown_wait}/KILL/10 \
|
||||
--exec ${command} -- ${command_args}
|
||||
|
||||
eend $?
|
||||
}
|
115
dev-java/jboss-as-bin/jboss-as-bin-7.1.1.ebuild
Normal file
115
dev-java/jboss-as-bin/jboss-as-bin-7.1.1.ebuild
Normal file
|
@ -0,0 +1,115 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
|
||||
# Maintainer notes:
|
||||
# - This ebuild supports only "standalone mode". If you want to use JBoss AS in
|
||||
# "domain mode", please fix this ebuild yourself and send me a pull request.
|
||||
|
||||
DESCRIPTION="JBoss Application Server ${PV} (standalone only)"
|
||||
|
||||
inherit eutils
|
||||
|
||||
MY_P="jboss-as-${PV}.Final"
|
||||
SLOT="7.1"
|
||||
SRC_URI="http://download.jboss.org/jbossas/${SLOT}/jboss-as-${PV}.Final/jboss-as-${PV}.Final.tar.gz"
|
||||
HOMEPAGE="http://www.jboss.org/jbossas/"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
LICENSE="LGPL-2.1"
|
||||
|
||||
IUSE="+doc"
|
||||
|
||||
RDEPEND=">=virtual/jdk-1.6"
|
||||
DEPEND="sys-apps/sed ${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
JBOSS_NAME="jboss-as-${SLOT}"
|
||||
INSTALL_DIR="/opt/${JBOSS_NAME}"
|
||||
SERVER_CONFIG_DIR="/etc/${JBOSS_NAME}"
|
||||
SERVER_BASE_DIR="/var/lib/${JBOSS_NAME}"
|
||||
SERVER_LOG_DIR="/var/log/${JBOSS_NAME}"
|
||||
SERVER_TEMP_DIR="/var/tmp/${JBOSS_NAME}"
|
||||
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup jboss 260 || die "Unable to create jboss group"
|
||||
enewuser jboss 260 /bin/sh ${INSTALL_DIR} jboss \
|
||||
|| die "Unable to create jboss user"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# create dir structure
|
||||
|
||||
diropts -m755
|
||||
dodir "${INSTALL_DIR}"
|
||||
|
||||
diropts -m755 -o jboss -g jboss
|
||||
dodir "${SERVER_CONFIG_DIR}/"
|
||||
|
||||
diropts -m750 -o jboss -g jboss
|
||||
dodir "${SERVER_BASE_DIR}"
|
||||
keepdir "${SERVER_BASE_DIR}/lib"
|
||||
keepdir "${SERVER_BASE_DIR}/deployments"
|
||||
keepdir "${SERVER_LOG_DIR}"
|
||||
keepdir "${SERVER_TEMP_DIR}"
|
||||
|
||||
# copy files
|
||||
|
||||
insopts -m644
|
||||
diropts -m755
|
||||
|
||||
insinto "${INSTALL_DIR}/bin"
|
||||
doins bin/appclient.conf bin/jboss-cli.xml
|
||||
|
||||
# remove unused files
|
||||
rm -f bin/domain.sh bin/run.sh
|
||||
|
||||
exeinto "${INSTALL_DIR}/bin"
|
||||
doexe bin/*.sh
|
||||
|
||||
insinto "${INSTALL_DIR}"
|
||||
doins -r appclient bundles welcome-content jboss-modules.jar *.txt
|
||||
einfo "This may take a few minutes..."
|
||||
doins -r modules
|
||||
|
||||
if use doc; then
|
||||
docinto "examples"
|
||||
dodoc docs/examples/configs/*
|
||||
docinto "schema"
|
||||
dodoc docs/schema/*
|
||||
fi
|
||||
|
||||
diropts -m750 -o jboss -g jboss
|
||||
insopts -m640 -o jboss -g jboss
|
||||
|
||||
insinto "${SERVER_CONFIG_DIR}"
|
||||
doins -r standalone/configuration/*
|
||||
|
||||
insinto "${SERVER_BASE_DIR}/deployments"
|
||||
doins -r standalone/deployments/*
|
||||
|
||||
# some utilities doesn't work with non-default paths...
|
||||
dosym "${SERVER_BASE_DIR}" "${INSTALL_DIR}/standalone"
|
||||
dosym "${SERVER_CONFIG_DIR}" "${SERVER_BASE_DIR}/configuration"
|
||||
dosym "${SERVER_LOG_DIR}" "${SERVER_BASE_DIR}/log"
|
||||
dosym "${SERVER_TEMP_DIR}" "${SERVER_BASE_DIR}/tmp"
|
||||
|
||||
# filter and copy init.d, conf.d
|
||||
|
||||
for FILE in "${FILESDIR}"/jboss-as.*; do
|
||||
cp "${FILE}" "${T}"
|
||||
tfile="${T}"/`basename ${FILE}`
|
||||
sed -i -e "s:__JBOSS_NAME__:${JBOSS_NAME}:g" $tfile || die "sed failed"
|
||||
sed -i -e "s:__JBOSS_VER__:${SLOT}:g" $tfile || die "sed failed"
|
||||
done
|
||||
|
||||
newinitd "${T}/jboss-as.init" ${JBOSS_NAME}
|
||||
newconfd "${T}/jboss-as.conf" ${JBOSS_NAME}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "This ebuild supports only \"standalone mode\". If you want to use"
|
||||
ewarn "JBoss AS in \"domain mode\", please fix this ebuild yourself and send"
|
||||
ewarn "me a pull request."
|
||||
}
|
Loading…
Reference in a new issue