first try of a artifactory-3 ebuild.
This commit is contained in:
parent
ce37636f45
commit
b545203225
@ -1,4 +1,2 @@
|
|||||||
AUX artifactory.confd 483 SHA256 e654eaf60f0b285e51f6a0f520d29d53a8a056e0144409c4cc16e07fae22c38c SHA512 a6e9aa378a657dca5ccdffb83bdc48e046662fde6d8c22c549f834b73f45e8ede079ac877aa13962f19ad5afca0dc3600178cbdbec988c592e46e9c5f884f467 WHIRLPOOL 76337d7e526ad9bfc9863133c6db79054f05c219941c930adacfba86fc0e82cc9871248919794d655a23a895fa8186bf511b8dfff60bcf65806406cef09ff5b4
|
DIST artifactory-3.0.3.zip 33806952 SHA256 eadbf6622a63a770bfcd18c8bfb652285d59382d24ece4eaa702cb328eae45f1 SHA512 25bd6c8ab72c85be48f28a791d51bd09440ddc3bf188b1f142640d87cd3ed91b9a92aa27c1b69278500e8a63b9251fb38b3860f3e5f1d7fcca7490628394dbb1 WHIRLPOOL 2948d44bc1b4c8de8f9dedc2a52b8026085d0b9fb69b55686af91a131b0226a1eb08f20228192e8665a07f59b951dece64ab546bfc60bc24b6822e99fa328690
|
||||||
AUX artifactory.initd 1052 SHA256 5e742419d7224db73eded1a57f44f3dfc2a5e983d5b3f4c8e04cd36b747c40c8 SHA512 6613c6606a8c42c40a32a8cdc1085316b35d85f5cebea0339514078a244fbd0e512f9d60772076f5536fd4ca7b4a17bea1ebb44714cf4bbef3127e661451997f WHIRLPOOL 309f08135d738a6d9dc5bf0846905ac5d5afddf34acce909671b1405a46a287fdea944b66cb3a5f9c69092f6b0e92dba6de9734cab28d1af3594a37d2ec4bed4
|
EBUILD artifactory-3.0.3.ebuild 2339 SHA256 c444cd1c8fd9c033e8547d6242740b555ce287f4029da1780166fb9152aae9b8 SHA512 2bfc766eb5557d2fff513140e417d1a6b35560fd44988bb203436b060a08d012263a28a26243b86eebe49824df82de3d5563b0c7dcd7ed0d19beb7a146167cd6 WHIRLPOOL bc41217c01073841b09111c864692daf0ef38269fdc2944471e5462abb21d0f59b0b452cca26ff5cd6fb8d603e0a92e869934dc236475867b4c1f7c5b61ba8f8
|
||||||
DIST artifactory-2.6.7.zip 35677927 SHA256 bb3aa7b2dd415420b0ec3dabc5dc6c9011f03ad74f39d469e1819a4fd001cdb9 SHA512 11114f273b90650ee7d516173a1de3fdb373cdcf6da7590db64b1e61f7aa20321b29be60bc654a135f29b7d9fa406d01f2ab0a950fec999ffa3c78a8a8c005c3 WHIRLPOOL 201caf731da7e0a4340c66838a7adafcd2f50b06754b95ff0a0de62429dc87fe086debdc10b51fd81c66a75271319df0dbd560e753bf479380a6a6de82441b0f
|
|
||||||
EBUILD artifactory-2.6.7.ebuild 3151 SHA256 e3cbc00ea65c3b34df26d4e3340a40add6f48b339a84081febbb0411e3a88e14 SHA512 a5a8838eabb8f3b634ceb6b7696749d30b47bd9a8274e3e714c5c953d883810aa282879d4474cc8a10236de0f798e7a9e8d5e2637ea0d3593884d0799266e75b WHIRLPOOL 72047c9e08a66e26afcb78d15d0effd5b26d7b4d3848b07cd3a4b0fd7734e81561203c0012d4bf680fa8d1316cedf740915195adfbbd7869b5d7c4ae88c9fd48
|
|
||||||
|
@ -1,103 +0,0 @@
|
|||||||
|
|
||||||
EAPI=2
|
|
||||||
|
|
||||||
inherit eutils
|
|
||||||
|
|
||||||
DESCRIPTION="Artifactory Maven Artifact Server"
|
|
||||||
HOMEPAGE="http://www.jfrog.org/products.php"
|
|
||||||
|
|
||||||
SLOT="0"
|
|
||||||
RESTRICT="mirror"
|
|
||||||
SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
|
|
||||||
KEYWORDS="~amd64 ~x86"
|
|
||||||
|
|
||||||
LICENSE="LGPL-3"
|
|
||||||
IUSE="mysql derby postgres"
|
|
||||||
|
|
||||||
RDEPEND=">=virtual/jre-1.5
|
|
||||||
dev-java/jsr305
|
|
||||||
mysql? ( dev-java/jdbc-mysql )
|
|
||||||
"
|
|
||||||
DEPEND=">=virtual/jdk-1.5
|
|
||||||
dev-java/jsr305
|
|
||||||
mysql? ( dev-java/jdbc-mysql )
|
|
||||||
"
|
|
||||||
|
|
||||||
ARTIFACTORY_HOME=/var/lib/${PN}
|
|
||||||
ARTIFACTORY_INSTALL=/usr/share/${PN}
|
|
||||||
ARTIFACTORY_USER=artifact
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
enewgroup artifact
|
|
||||||
enewuser ${ARTIFACTORY_USER} -1 /bin/sh -1 artifact
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
cd "${S}/bin"
|
|
||||||
ls | grep -E "\.(bat|exe)" | xargs rm || die "remove failed"
|
|
||||||
|
|
||||||
dodir ${ARTIFACTORY_HOME}
|
|
||||||
dodir ${ARTIFACTORY_INSTALL}
|
|
||||||
|
|
||||||
diropts -m775 -o ${ARTIFACTORY_USER} -g artifact
|
|
||||||
keepdir /etc/artifactory
|
|
||||||
keepdir /etc/artifactory/plugins/
|
|
||||||
keepdir ${ARTIFACTORY_HOME}/
|
|
||||||
keepdir ${ARTIFACTORY_HOME}/data/
|
|
||||||
keepdir ${ARTIFACTORY_HOME}/work/
|
|
||||||
keepdir ${ARTIFACTORY_HOME}/backup/
|
|
||||||
keepdir /var/log/artifactory/
|
|
||||||
keepdir /var/run/artifactory/
|
|
||||||
keepdir /var/tmp/artifactory/
|
|
||||||
|
|
||||||
dosym /var/log/artifactory ${ARTIFACTORY_HOME}/logs
|
|
||||||
dosym /etc/artifactory ${ARTIFACTORY_HOME}/etc
|
|
||||||
|
|
||||||
CONFIG=${D}/etc/artifactory/default
|
|
||||||
echo "#!/bin/bash" >> ${CONFIG}
|
|
||||||
echo "#export ARTIFACTORY_CONSOLE=/var/logs/artifactoy/consoleout.log" >> ${CONFIG}
|
|
||||||
echo "#export JAVA_HOME=$(java-config --jre-home)" >> ${CONFIG}
|
|
||||||
echo "export ARTIFACTORY_HOME=${ARTIFACTORY_HOME}" >> ${CONFIG}
|
|
||||||
echo "export ARTIFACTORY_USER=${ARTIFACTORY_USER}" >> ${CONFIG}
|
|
||||||
|
|
||||||
# remove unneeded configs
|
|
||||||
rm -r ${S}/etc/repo/*mssql
|
|
||||||
rm -r ${S}/etc/repo/*oracle*
|
|
||||||
if ! use derby; then
|
|
||||||
rm -r ${S}/etc/repo/*derby
|
|
||||||
fi
|
|
||||||
if ! use mysql; then
|
|
||||||
rm -r ${S}/etc/repo/*mysql
|
|
||||||
else
|
|
||||||
dosym $(java-config -p jdbc-mysql) ${ARTIFACTORY_INSTALL}/lib/jdbc-mysql.jar
|
|
||||||
dosym $(java-config -p c3p0) ${ARTIFACTORY_INSTALL}/lib/c3p0.jar
|
|
||||||
fi
|
|
||||||
if ! use postgres; then
|
|
||||||
rm -r ${S}/etc/repo/*postgresql
|
|
||||||
else
|
|
||||||
dosym $(java-config -p jdbc-postgresql) ${ARTIFACTORY_INSTALL}/lib/jdbc-postgresql.jar
|
|
||||||
fi
|
|
||||||
|
|
||||||
chown ${ARTIFACTORY_USER}:artifact ${S}/etc/repo
|
|
||||||
# remove windows-wrapper
|
|
||||||
rm ${S}/lib/wrapper*
|
|
||||||
|
|
||||||
sed -i -e "s:<SystemProperty name=\"artifactory.home\" default=\"..\"/>/webapps:${ARTIFACTORY_INSTALL}/webapps:" "${S}"/etc/jetty.xml
|
|
||||||
sed -i -e "s:<SystemProperty name=\"artifactory.home\" default=\"..\"/>/logs:/var/log/artifactory:" "${S}"/etc/jetty.xml
|
|
||||||
cd "${S}"
|
|
||||||
cp -pPR clilib lib webapps ${PN}.jar "${D}${ARTIFACTORY_INSTALL}" || die "failed to copy libs"
|
|
||||||
cp -pPR etc/* "${D}/etc/artifactory" || die "failed to copy conf"
|
|
||||||
|
|
||||||
sed -i -e "s:CLI_DIR=\`dirname \$0\`:CLI_DIR=${ARTIFACTORY_INSTALL}/clilib:" "${S}"/bin/artadmin
|
|
||||||
sed -i -e "s:\`dirname \"\$0\"\`\/\.\.:${ARTIFACTORY_INSTALL}:" "${S}"/bin/artifactory.sh
|
|
||||||
|
|
||||||
exeinto /usr/bin
|
|
||||||
doexe bin/artadmin
|
|
||||||
|
|
||||||
newinitd "${FILESDIR}"/artifactory.initd artifactory
|
|
||||||
newconfd "${FILESDIR}"/artifactory.confd artifactory
|
|
||||||
|
|
||||||
elog "Artifact storage is /var/lib/artifact. Ensure that there is enough space."
|
|
||||||
elog "The default password for user 'admin' is 'password'."
|
|
||||||
elog "After upgrading clean up the jetty-dir '${ARTIFACTORY_INSTALL}/work'"
|
|
||||||
}
|
|
89
dev-java/artifactory/artifactory-3.0.3.ebuild
Normal file
89
dev-java/artifactory/artifactory-3.0.3.ebuild
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
|
||||||
|
EAPI=5
|
||||||
|
|
||||||
|
inherit eutils java-pkg-2
|
||||||
|
|
||||||
|
DESCRIPTION="Artifactory Maven Artifact Server"
|
||||||
|
HOMEPAGE="http://www.jfrog.org/products.php"
|
||||||
|
|
||||||
|
SLOT="0"
|
||||||
|
RESTRICT="mirror"
|
||||||
|
SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
|
||||||
|
LICENSE="LGPL-3"
|
||||||
|
IUSE="mysql postgres"
|
||||||
|
|
||||||
|
RDEPEND="virtual/jre:1.7
|
||||||
|
>=www-servers/tomcat-7.0.32
|
||||||
|
dev-java/jsr305
|
||||||
|
mysql? ( dev-java/jdbc-mysql )
|
||||||
|
"
|
||||||
|
DEPEND="virtual/jdk:1.7
|
||||||
|
>=www-servers/tomcat-7.0.32
|
||||||
|
dev-java/jsr305
|
||||||
|
mysql? ( dev-java/jdbc-mysql )
|
||||||
|
"
|
||||||
|
|
||||||
|
ARTIFACTORY_HOME=/var/lib/${PN}
|
||||||
|
ARTIFACTORY_USER=artifact
|
||||||
|
TOMCAT_SUFFIX=${ARTIFACTORY_USER}
|
||||||
|
CONTAINER=/var/lib/tomcat-7-$TOMCAT_SUFFIX
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
enewgroup artifact
|
||||||
|
enewuser ${ARTIFACTORY_USER} -1 /bin/sh -1 artifact
|
||||||
|
if [[ ! -d /etc/tomcat-7-${TOMCAT_SUFFIX} ]] ; then
|
||||||
|
/usr/share/tomcat-7/gentoo/tomcat-instance-manager.bash --create --suffix ${TOMCAT_SUFFIX} \
|
||||||
|
--user ${ARTIFACTORY_USER} --group artifact
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
edos2unix tomcat/conf/catalina.policy \
|
||||||
|
tomcat/conf/web.xml \
|
||||||
|
tomcat/conf/logging.properties \
|
||||||
|
tomcat/conf/Catalina/localhost/artifactory.xml
|
||||||
|
sed -i -e "s!\${catalina.base}/logs!/var/log/tomcat-7-${TOMCAT_SUFFIX}!g" \
|
||||||
|
tomcat/conf/logging.properties
|
||||||
|
sed -i -e "s!\${artifactory.home}!/var/lib/tomcat-7-${TOMCAT_SUFFIX}!g" \
|
||||||
|
tomcat/conf/Catalina/localhost/artifactory.xml
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
diropts -m775 -o ${ARTIFACTORY_USER} -g artifact
|
||||||
|
keepdir ${ARTIFACTORY_HOME}/backup
|
||||||
|
keepdir ${ARTIFACTORY_HOME}/data
|
||||||
|
keepdir ${ARTIFACTORY_HOME}/work
|
||||||
|
keepdir ${ARTIFACTORY_HOME}/etc
|
||||||
|
keepdir /var/log/artifactory
|
||||||
|
|
||||||
|
insinto ${CONTAINER}/webapps
|
||||||
|
doins webapps/${PN}.war
|
||||||
|
|
||||||
|
insinto ${CONTAINER}/conf
|
||||||
|
doins tomcat/conf/catalina.policy
|
||||||
|
doins tomcat/conf/web.xml
|
||||||
|
doins tomcat/conf/logging.properties
|
||||||
|
|
||||||
|
insinto ${CONTAINER}/conf/Catalina/localhost
|
||||||
|
doins tomcat/conf/Catalina/localhost/artifactory.xml
|
||||||
|
|
||||||
|
dosym /var/log/artifactory ${ARTIFACTORY_HOME}/logs
|
||||||
|
|
||||||
|
insinto ${ARTIFACTORY_HOME}/etc
|
||||||
|
doins etc/*
|
||||||
|
|
||||||
|
elog "The default password for user 'admin' is 'password'."
|
||||||
|
elog "Please change following parameters in /etc/conf.d/tomcat-${TOMCAT_SUFFIX}:"
|
||||||
|
elog "TOMCAT_JVM=\"icedtea-7\", JAVA_OPTS=\"-Dartifactory.home=${ARTIFACTORY_HOME}\" and"
|
||||||
|
local libs=""
|
||||||
|
if use mysql; then
|
||||||
|
libs=",jdbc-mysql"
|
||||||
|
fi
|
||||||
|
if use postgres; then
|
||||||
|
libs="${libs},jdbc-postgresql"
|
||||||
|
fi
|
||||||
|
elog "TOMCAT_EXTRA_JARS=\"${libs:1}\""
|
||||||
|
|
||||||
|
}
|
@ -1,16 +0,0 @@
|
|||||||
|
|
||||||
# Port for jetty
|
|
||||||
ARTIFACTORY_PORT="8081"
|
|
||||||
|
|
||||||
# Home dir of artifactory
|
|
||||||
ARTIFACTORY_HOME="/var/lib/artifactory"
|
|
||||||
ARTIFACTORY_INSTALL="/usr/share/artifactory"
|
|
||||||
|
|
||||||
# JSR 305 support for non sun/oracle VMs
|
|
||||||
JSR305="$(java-config -p jsr305)"
|
|
||||||
|
|
||||||
# User and group as which to run artifactory
|
|
||||||
#ARTIFACTORY_USER="artifact"
|
|
||||||
#ARTIFACTORY_GROUP="artifact"
|
|
||||||
|
|
||||||
JAVA_OPTIONS="-server -Xms1g -Xmx1g -Xss256k -XX:PermSize=128m -XX:MaxPermSize=128m -XX:NewSize=384m -XX:MaxNewSize=384m -Djava.awt.headless=true"
|
|
@ -1,34 +0,0 @@
|
|||||||
#!/sbin/runscript
|
|
||||||
# Copyright 1999-2011 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
|
||||||
# $Header: $
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need net
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
ebegin "Starting artifactory"
|
|
||||||
JAVACMD=$(java-config-2 -J)
|
|
||||||
JAVA_OPTIONS="$JAVA_OPTIONS -server -Djetty.home=$ARTIFACTORY_HOME -Dartifactory.home=$ARTIFACTORY_HOME -Dfile.encoding=UTF8"
|
|
||||||
LIB_DIR=$ARTIFACTORY_INSTALL/lib
|
|
||||||
CLASSPATH=$ARTIFACTORY_INSTALL/artifactory.jar
|
|
||||||
# Add all jars under the lib dir to the classpath
|
|
||||||
for i in $(ls $LIB_DIR/*.jar)
|
|
||||||
do
|
|
||||||
CLASSPATH="$CLASSPATH:$i"
|
|
||||||
done
|
|
||||||
CLASSPATH="$CLASSPATH:$JSR305"
|
|
||||||
|
|
||||||
start-stop-daemon --start --user ${ARTIFACTORY_USER:-artifact}:${ARTIFACTORY_GROUP:-artifact} \
|
|
||||||
--chdir "/var/lib/artifactory" \
|
|
||||||
--pidfile /var/run/artifactory.pid --make-pidfile --background \
|
|
||||||
--exec "$JAVACMD" -- $JAVA_OPTIONS -cp "$CLASSPATH" org.artifactory.standalone.main.Main
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping artifactory"
|
|
||||||
start-stop-daemon --stop --quiet --pidfile /var/run/artifactory.pid
|
|
||||||
eend $?
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user