summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2024-06-16 21:03:56 -0700
committerZac Medico <zmedico@gentoo.org>2024-06-16 21:05:35 -0700
commitce8435af992af70f2646b21686184d199ff22fcd (patch)
treed772805201ae94939f8d293bcdaec652cf293344 /sys-cluster
parentnet-analyzer/opsgenie-lamp: add github upstream metadata (diff)
downloadgentoo-ce8435af992af70f2646b21686184d199ff22fcd.tar.gz
gentoo-ce8435af992af70f2646b21686184d199ff22fcd.tar.bz2
gentoo-ce8435af992af70f2646b21686184d199ff22fcd.zip
sys-cluster/gmqtt: add 0.5.0
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/gmqtt/Manifest2
-rw-r--r--sys-cluster/gmqtt/gmqtt-0.5.0.ebuild42
2 files changed, 44 insertions, 0 deletions
diff --git a/sys-cluster/gmqtt/Manifest b/sys-cluster/gmqtt/Manifest
index fec262288052..63dc1b4dff8c 100644
--- a/sys-cluster/gmqtt/Manifest
+++ b/sys-cluster/gmqtt/Manifest
@@ -1,2 +1,4 @@
DIST gmqtt-0.4.1-deps.tar.xz 50641100 BLAKE2B e2df0588178f3cee0f96a15c867352d9718deb9ed1b8acb0b0a26bf512308c40797275deee04be3f35d8725018b522aa807638ed17f300c337a062012fddc16d SHA512 6c77dcb5bc6c029296ac8715a5796f20091273e5b322fedbe952086cb81e5abf5d5fbe5b0005f22d674565dff1d3b9dbaf84812ec22203ef1b6ccd629405115d
DIST gmqtt-0.4.1.tar.gz 338368 BLAKE2B 4114816d4e60f6421fcea2cb33006f416143040bc85eb97630fcbd588c9fb2e11cd0d1f9e6e56f8ad8461653a5d7772971e4978a3dfca357335309b7c9e138ed SHA512 cad45a7d3d9033d9d345c72bd0568c4e6115964d980ed02451da3fb6fe7fb92785ccc39b7777f1632c81242b269f5e61caba18255315e12f49d5debcfc1c105a
+DIST gmqtt-0.5.0-deps.tar.xz 2274132 BLAKE2B c4eef28fbcf743128e9fee3f62106405343d8a6daeb018f168a16ee67f0028669a04d457ac6127e7528248c69ff38a5f469bbd242f3ce39178f8a44994706649 SHA512 d3f6036652d7185306f629db5660245bdb0d4e0f2bfa64ccf4e306bc725cfb2d3757097c32f495595b21ea8750ab7f0907b93b38c8512811e037f65fc38af852
+DIST gmqtt-0.5.0.tar.gz 256487 BLAKE2B ce1d032cf13806381c2c0d42aec5592c74b86e938d284252fd01bd23f7eb8b0c0e9b59558be5284b780edd778035c9755a0d6c6da30ccd851c8b3a06f6c49289 SHA512 8c696a54386282b51ce6a835fba787f465f862afd5f553fc0039b8e01a6a03660a4103deed346c683e4b0fe98fd3ac4105a3602f28f416f5c544dc6ee960645a
diff --git a/sys-cluster/gmqtt/gmqtt-0.5.0.ebuild b/sys-cluster/gmqtt/gmqtt-0.5.0.ebuild
new file mode 100644
index 000000000000..b43ae3df0986
--- /dev/null
+++ b/sys-cluster/gmqtt/gmqtt-0.5.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module systemd
+
+DESCRIPTION="MQTT broker library with cluster support that implements MQTT V5.0 and V3.1.1"
+HOMEPAGE="https://github.com/DrmagicE/gmqtt"
+SRC_URI="https://github.com/DrmagicE/gmqtt/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz"
+
+LICENSE="MIT Apache-2.0 BSD BSD-2 ISC MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="test"
+
+src_compile() {
+ GOBIN=${S}/bin CGO_ENABLED=0 go install ./... || die
+}
+
+src_install() {
+ dobin bin/{gmqctl,gmqttd}
+ keepdir /etc/${PN}
+ systemd_dounit "${FILESDIR}/${PN}d.service"
+ newinitd "${FILESDIR}/initd" "${PN}d"
+ newconfd "${FILESDIR}/confd" "${PN}d"
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logrotated" "${PN}"
+ docompress -x /usr/share/doc/${PF}/default_config.yml
+ dodoc CONTRIBUTING.md README*.md cmd/gmqttd/default_config.yml
+ docinto federation
+ dodoc -r plugin/federation/{examples,README.md}
+}
+
+pkg_postinst() {
+ local config=/etc/gmqtt/gmqttd.yml dest=${ROOT}/
+ if [[ ! ${REPLACING_VERSIONS} && ! -e ${ROOT}${config} ]]; then
+ einfo "Copying default config to ${config} for first install"
+ cp "${ROOT}/usr/share/doc/${PF}/default_config.yml" "${ROOT}${config}"
+ fi
+}