summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-19 23:33:15 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-20 00:51:37 -0800
commita9365491b80fe0192d6c8b87b693a7a916ffe109 (patch)
tree26cf74344475f09e447f5e0713bc82feb2b38fdf /app-containers/docker-swarm
parentMove {app-emulation -> app-containers}/docker-registry (diff)
downloadgentoo-a9365491b80fe0192d6c8b87b693a7a916ffe109.tar.gz
gentoo-a9365491b80fe0192d6c8b87b693a7a916ffe109.tar.bz2
gentoo-a9365491b80fe0192d6c8b87b693a7a916ffe109.zip
Move {app-emulation -> app-containers}/docker-swarm
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'app-containers/docker-swarm')
-rw-r--r--app-containers/docker-swarm/Manifest1
-rw-r--r--app-containers/docker-swarm/docker-swarm-1.2.9.ebuild54
-rw-r--r--app-containers/docker-swarm/metadata.xml10
3 files changed, 65 insertions, 0 deletions
diff --git a/app-containers/docker-swarm/Manifest b/app-containers/docker-swarm/Manifest
new file mode 100644
index 000000000000..e67d6adbf65b
--- /dev/null
+++ b/app-containers/docker-swarm/Manifest
@@ -0,0 +1 @@
+DIST docker-swarm-1.2.9.tar.gz 1532493 BLAKE2B 243a3cb6d2e9f719d81947429c6616e93cf1b08187685922ad5daf732e61db12bd626fa26f30174af7e779c8ba45ecce7d2cfb33835ef985bdd57657e30e2228 SHA512 cc0e0e27d0ed4845abd99d1554630cc8e2ab0645d40a76358a83b2ea6d1bc5287dbf5d1aefdd2eb4302aeef3894725e75cae3f5da2353b045492a4357631daa2
diff --git a/app-containers/docker-swarm/docker-swarm-1.2.9.ebuild b/app-containers/docker-swarm/docker-swarm-1.2.9.ebuild
new file mode 100644
index 000000000000..5ca267108edf
--- /dev/null
+++ b/app-containers/docker-swarm/docker-swarm-1.2.9.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit go-module
+
+KEYWORDS="~amd64"
+EGO_PN=github.com/docker/swarm
+EGIT_COMMIT="527a849cc6b8297690f478905083fc77951da2a7"
+MY_PN=classicswarm
+SRC_URI="https://github.com/docker/classicswarm/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+DESCRIPTION="Swarm Classic: a container clustering system"
+HOMEPAGE="https://docs.docker.com/swarm"
+LICENSE="Apache-2.0 CC-BY-SA-4.0 BSD BSD-2 ISC MIT MPL-2.0 WTFPL-2"
+SLOT="0"
+IUSE=""
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ # It would require internet access to run `go mod vendor`, so
+ # generate approximate go.mod and vendor/modules.txt from the
+ # content of vendor.conf. Use a dummy vendor_version that is
+ # good enough for go to recognize as a valid version.
+ rm -f go.mod vendor/modules.txt || die
+ local x vendor_version=v1.0.0
+ printf -- 'module %s\n' "${EGO_PN}" >> go.mod || die
+ printf -- 'go 1.14\n' >> go.mod || die
+ printf -- 'require (\n' >> go.mod || die
+ while read -r x; do
+ printf -- '\t%s %s\n' "${x}" "${vendor_version}" >> go.mod || die
+ printf -- '# %s %s\n' "${x}" "${vendor_version}" >> vendor/modules.txt || die
+ printf -- '## explicit\n' >> vendor/modules.txt || die
+ printf -- '%s\n' "${x}" >> vendor/modules.txt || die
+ done < <(grep -Eo "^[^#[:space:]]+" vendor.conf)
+ printf -- ')\n' >> go.mod || die
+ default
+}
+
+src_compile() {
+ GOBIN="${S}/bin" \
+ go install -v -work -x -mod=vendor -x \
+ -ldflags "-w -X github.com/docker/swarm/version.GITCOMMIT=${EGIT_COMMIT} \
+ -X github.com/docker/swarm/version.BUILDTIME=$(date -u +%FT%T%z)" \
+ ./... || die
+}
+
+src_install() {
+ dobin bin/swarm
+ dosym swarm /usr/bin/docker-swarm
+ dodoc CHANGELOG.md CONTRIBUTING.md logo.png README.md
+}
diff --git a/app-containers/docker-swarm/metadata.xml b/app-containers/docker-swarm/metadata.xml
new file mode 100644
index 000000000000..9a5462b50dc9
--- /dev/null
+++ b/app-containers/docker-swarm/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zmedico@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">docker/swarm</remote-id>
+ </upstream>
+</pkgmetadata>