artifactory ebuild first try.

This commit is contained in:
Micha Glave 2011-05-30 09:18:46 +02:00
parent 9991a3f978
commit b0b2e3d8a8
3 changed files with 99 additions and 0 deletions

View File

@ -0,0 +1,3 @@
AUX artifactory.initd 833 RMD160 8e076445998d939fbe7080f3ce12f0efd027d218 SHA1 39b62d863b2184967d4e051e0b02b069b10b134d SHA256 2ee9e266be89841ac1920613370441cc598665c0bb58ae96a320390aafc0342f
DIST artifactory-2.3.3.1.zip 35982504 RMD160 6941e17f7d9e47e6b3f495fff07e3f36caa0266d SHA1 7905760a641aa5ed6fb58215a13039f4b38e0fac SHA256 23a457028f23dbe5c29107cdf3a62ecceb098565d2c4567fe3bbd085ad5b1c89
EBUILD artifactory-2.3.3.1.ebuild 1163 RMD160 6adc4a215bb6309988a154d750ab77f236a14fda SHA1 f0eb38b63e1d1fec86630abb89ed8ca585c66ced SHA256 dd01fd01540d200122cf41030e2166a168cd98a90aeca83df30e8f0a198a0a0d

View File

@ -0,0 +1,59 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=3
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-ant-2 eutils
DESCRIPTION="Artifactory Maven Artifact Server"
HOMEPAGE="http://www.jfrog.org/products.php"
SRC_URI="mirror://sourceforge/artifactory/${P}.zip"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
COMMON_DEP=""
RDEPEND=">=virtual/jre-1.5
${COMMON_DEP}"
DEPEND=">=virtual/jdk-1.5
app-arch/unzip
${COMMON_DEP}"
EANT_BUILD_TARGET=""
EANT_DOC_TARGET=""
INSTALL_DIR="/opt/artifactory"
WEBAPP_DIR="${INSTALL_DIR}/webapp"
IDIR=${D}$INSTALL_DIR
pkg_setup() {
#enewgroup <name> [gid]
enewgroup artifact
#enewuser <user> [uid] [shell] [homedir] [groups] [params]
enewuser artifact -1 /bin/bash /opt/artifactory artifact
}
src_unpack() {
unpack ${A}
cd "${S}"
# epatch "${FILESDIR}/${P}.patch"
}
src_install() {
use doc && java-pkg_dojavadoc build/javadoc
use source && java-pkg_dosrc src
dodir ${INSTALL_DIR}
cp -r ${PN}.jar bin clilib lib misc webapps ${D}/${INSTALL_DIR}
insinto /etc/${PN}
doins etc/*
newinitd ${FILESDIR}/artifactory.initd ${PN}
}

View File

@ -0,0 +1,37 @@
#!/sbin/runscript
# Installed in /etc/init.d/artifactory
export JAVA_HOME=/etc/java-config-2/current-system-vm
export PATH=$JAVA_HOME/bin:$PATH
DESC="Artifactory Maven Artifact Server"
NAME=artifactory
PIDFILE=/var/run/$NAME.pid
RUN_AS=artifact
ARTIFACTORY_HOME=/opt/artifact/artifactory
COMMAND=$ARTIFACTORY_HOME/bin/artifactory.init
ARGS="$ARTIFACTORY_HOME/etc/jetty.xml"
LOGFILE="$ARTIFACTORY_HOME/logs/consoleout.log"
depend() {
use net
after logger
}
start() {
ebegin "Starting $DESC"
start-stop-daemon --start --verbose --background --make-pidfile --pidfile $PIDFILE\
--chdir $ARTIFACTORY_HOME --chuid $RUN_AS --exec $COMMAND -- $ARGS > $LOGFILE 2>&1
eend $?
}
stop() {
ebegin "Stopping $DESC"
start-stop-daemon --stop --quiet --pidfile $PIDFILE
if [ -e $PIDFILE ]
then
rm $PIDFILE
fi
eend $?
}