From 4f59233db378686fa021b70e61ce4349425ae991 Mon Sep 17 00:00:00 2001 From: Alexander Miroshnichenko Date: Wed, 9 Oct 2019 19:41:38 +0300 Subject: [PATCH] add harbor-1.8.3.ebuild --- app-emulation/harbor/harbor-1.8.3.ebuild | 79 ++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 app-emulation/harbor/harbor-1.8.3.ebuild diff --git a/app-emulation/harbor/harbor-1.8.3.ebuild b/app-emulation/harbor/harbor-1.8.3.ebuild new file mode 100644 index 0000000..d306e60 --- /dev/null +++ b/app-emulation/harbor/harbor-1.8.3.ebuild @@ -0,0 +1,79 @@ +# Copyright 2019 RBK.MONEY +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GOLANG_PKG_IMPORTPATH="github.com/goharbor" +GOLANG_PKG_VERSION="${PV}" +GOLANG_PKG_HAVE_TEST=1 +GOLANG_PKG_BUILDPATH="/src/core /src/jobservice /src/registryctl" +GOLANG_PKG_HAVE_TEST=1 + +WEBAPP_OPTIONAL="yes" + +inherit user golang-single webapp + +DESCRIPTION="An open source trusted cloud native registry project that stores, signs, and scans content." +HOMEPAGE="https://goharbor.io/" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~x86" +IUSE="+core jobservice portal registryctl" +REQUIRED_USE="|| ( core jobservice portal registryctl )" + +DEPEND="dev-lang/go + portal? ( net-libs/nodejs + swagger.json + npm config set prefix "${PWD}/usr" + npm install + npm run build_lib + npm run link_lib + node --max_old_space_size=8192 'node_modules/@angular/cli/bin/ng' build --prod + fi +} + +src_install() { + use core && newbin ${GOBIN}/core ${PN}-core \ + && newinitd ${FILESDIR}/harbor-core.initd harbor-core \ + && insinto /etc/harbor/core \ + && newins ${FILESDIR}/core.env env + use jobservice && newbin ${GOBIN}/jobservice ${PN}-jobservice + use registryctl && newbin ${GOBIN}/registryctl ${PN}-registryctl + + if use portal; then + + webapp_src_preinst + + insinto "${MY_HTDOCSDIR}" + doins -r ${S}/src/portal/dist/* + doins ${S}/docs/swagger.yaml + doins ${S}/src/portal/swagger.json + doins ${S}/src/portal/lib/LICENSE + + webapp_src_install + + fi +}