alpha-quadrant/dev-java/artifactory/artifactory-2.3.3.1.ebuild
2011-05-30 09:18:46 +02:00

60 lines
1.1 KiB
Bash

# 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}
}