kompose-0.3.0.ebuild 917 B

12345678910111213141516171819202122232425262728293031
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit golang-build golang-vcs-snapshot
  5. EGO_PN="github.com/kubernetes-incubator/kompose/..."
  6. EGIT_COMMIT="v0.3.0"
  7. COMPOSE_COMMIT="135165b"
  8. ARCHIVE_URI="https://${EGO_PN%/*}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
  9. KEYWORDS="~amd64"
  10. DESCRIPTION="Tool to move from docker-compose to Kubernetes"
  11. HOMEPAGE="https://github.com/kubernetes-incubator/kompose"
  12. SRC_URI="${ARCHIVE_URI}"
  13. LICENSE="Apache-2.0"
  14. SLOT="0/${PVR}"
  15. IUSE="hardened"
  16. RESTRICT="test"
  17. src_compile() {
  18. export CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')"
  19. GOPATH="${S}" go build -ldflags="-X github.com/kubernetes-incubator/kompose/cmd.GITCOMMIT=${COMPOSE_COMMIT}" -o bin/kompose src/${EGO_PN%/*}/main.go || die
  20. }
  21. src_install() {
  22. dobin bin/*
  23. dodoc -r src/${EGO_PN%/*}/{docs,{README,RELEASE,ROADMAP,CHANGELOG,CONTRIBUTING}.md}
  24. }