summaryrefslogtreecommitdiff
path: root/app-misc/rmqtt/rmqtt-0.17.1.ebuild
blob: c0c11fe5cd20619ee4a129e324a404a7aec2ef73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

CRATES=" "
RUST_MIN_VER="1.89.0"
inherit cargo

DESCRIPTION="A scalable distributed MQTT broker."
HOMEPAGE="https://github.com/rmqtt/rmqtt"
SRC_URI="https://github.com/rmqtt/rmqtt/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://share.terinstock.com/${P}-vendor.tar.xz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64"

src_unpack() {
	cargo_src_unpack
	mkdir "${S}"/{vendor,.cargo} || die
	ln -s "${WORKDIR}/vendor/"* "${S}"/vendor || die
	cp "${FILESDIR}"/"${PN}-vendor-config" "${S}"/.cargo/config.toml || die
}

src_configure() {
	cargo_gen_config
	cargo_src_configure --offline --no-default-features
}

src_compile() {
	cargo_src_compile -p rmqttd
}

src_install() {
	cargo_src_install --path rmqtt-bin
}