gentoo-overlay/dev-java/nexus-oss-bin/nexus-oss-bin-2.11.4.ebuild

50 lines
1 KiB
Bash
Raw Normal View History

# Copyright 1999-2016 Gentoo Foundation
2015-10-02 19:26:11 +02:00
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="6"
2015-10-02 19:26:11 +02:00
inherit eutils user
DESCRIPTION="Maven Repository Manager"
HOMEPAGE="http://nexus.sonatype.org/"
LICENSE="GPL-3"
SUB_VERSION="-01"
SRC_URI="http://download.sonatype.com/nexus/oss/nexus-${PV}${SUB_VERSION}-bundle.tar.gz"
RESTRICT="mirror"
KEYWORDS="~x86 ~amd64"
SLOT="0"
IUSE=""
S="${WORKDIR}"
2015-10-05 15:11:17 +02:00
RDEPEND=">=virtual/jdk-1.8"
2015-10-02 19:26:11 +02:00
INSTALL_DIR="/opt/nexus"
WEBAPP_DIR="${INSTALL_DIR}/nexus-oss-webapp"
PATCHES=( "${FILESDIR}/nexus-wrapper-${PV}.patch" )
2015-10-02 19:26:11 +02:00
pkg_setup() {
enewgroup nexus
enewuser nexus -1 /bin/bash /opt/nexus "nexus"
}
src_unpack() {
unpack ${A}
cd "${S}"
}
src_install() {
insinto ${WEBAPP_DIR}
doins -r nexus-${PV}${SUB_VERSION}/*
newinitd "${FILESDIR}/init.sh" nexus
fowners -R nexus:nexus ${INSTALL_DIR}
fperms 755 "${INSTALL_DIR}/nexus-oss-webapp/bin/jsw/linux-x86-64/wrapper"
fperms 755 "${INSTALL_DIR}/nexus-oss-webapp/bin/jsw/linux-x86-32/wrapper"
fperms 755 "${INSTALL_DIR}/nexus-oss-webapp/bin/nexus"
}