forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-util/drone: Version bump to 0.6.0
Package-Manager: Portage-2.3.5, Repoman-2.3.2
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
|
||
EGO_PN="github.com/drone/drone/..." | ||
EGIT_COMMIT="823175605f61ddf18b8566e04f6e94d550762d99" | ||
EGO_VENDOR=( "github.com/drone/drone-ui 72dc649bc4ff81f4560ab70b29495830a4c1cf3d" ) | ||
|
||
inherit golang-build golang-vcs-snapshot user | ||
|
||
ARCHIVE_URI="https://${EGO_PN%/*}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" | ||
KEYWORDS="~amd64" | ||
|
||
DESCRIPTION="A Continuous Delivery platform built on Docker, written in Go" | ||
HOMEPAGE="https://github.com/drone/drone" | ||
SRC_URI="${ARCHIVE_URI} | ||
${EGO_VENDOR_URI}" | ||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
IUSE="" | ||
|
||
DEPEND="dev-go/go-bindata | ||
dev-go/go-bindata-assetfs:=" | ||
|
||
pkg_setup() { | ||
enewgroup drone | ||
enewuser drone -1 -1 /var/lib/drone drone | ||
} | ||
|
||
src_compile() { | ||
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/github.com/drone/drone gen || die | ||
pushd src || die | ||
DRONE_BUILD_NUMBER="${EGIT_COMMIT:0:7}" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)"\ | ||
go install -ldflags "-extldflags '-static' -X github.com/drone/drone/version.VersionDev=build.${EGIT_COMMIT:0:7}" github.com/drone/drone/drone || die | ||
popd || die | ||
} | ||
|
||
src_install() { | ||
dobin bin/* | ||
dodoc src/github.com/drone/drone/README.md | ||
keepdir /var/log/drone /var/lib/drone | ||
fowners -R drone:drone /var/log/drone /var/lib/drone | ||
newinitd "${FILESDIR}"/drone.initd drone | ||
newconfd "${FILESDIR}"/drone.confd drone | ||
newinitd "${FILESDIR}"/drone-agent.initd drone-agent | ||
newconfd "${FILESDIR}"/drone-agent.confd drone-agent | ||
} |