Install this version:
emerge -a =net-im/tuwunel-1.7.0
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =net-im/tuwunel-1.7.0
Or alternatively:
emerge --autounmask-write -a =net-im/tuwunel-1.7.0
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 1.7.0 | 8 | ~amd64 | 0 |
EAPI=8
inherit cargo
DESCRIPTION="High Performance Matrix Homeserver in Rust"
HOMEPAGE="https://github.com/matrix-construct/tuwunel"
SRC_URI="
https://github.com/matrix-construct/tuwunel/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://lmkra.dev/gentoo/${P}-deps.tar.xz
"
S="${WORKDIR}/${P}/src/main"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+brotli +element +gzip +io-uring jemalloc systemd +zstd debug"
RDEPEND="
acct-user/matrix
!net-im/conduit
!net-im/conduwuit
"
BDEPEND="
llvm-core/clang
>=dev-lang/rust-1.94.0:*
"
# rust does not use *FLAGS from make.conf, silence portage warning
# update with proper path to binaries this crate installs, omit leading /
QA_FLAGS_IGNORED="usr/bin/${PN}"
src_prepare() {
ln -s "${WORKDIR}/vendor/" "${WORKDIR}/${PN}-${PV}/vendor" || die
sed -i "${ECARGO_HOME}/config.toml" -e '/source.crates-io/d' || die
sed -i "${ECARGO_HOME}/config.toml" -e '/replace-with = "gentoo"/d' || die
sed -i "${ECARGO_HOME}/config.toml" -e '/local-registry = "\/nonexistent"/d' || die
cat "${WORKDIR}/vendor/vendor-config.toml" >> "${ECARGO_HOME}/config.toml" || die
eapply_user
}
src_configure() {
local myfeatures=(
media_thumbnail
url_preview
$(usev jemalloc)
$(usev systemd)
$(usev brotli brotli_compression)
$(usev element element_hacks)
$(usev gzip gzip_compression)
$(usev io-uring io_uring)
$(usev !debug release_max_log_level)
$(usev zstd zstd_compression)
)
rust_pkg_setup
cargo_src_configure --no-default-features --frozen
}
src_install() {
cargo_src_install
keepdir /var/{lib,log}/tuwunel
fowners matrix:matrix /var/{lib,log}/tuwunel
fperms 700 /var/{lib,log}/tuwunel
newconfd "${FILESDIR}"/tuwunel.conf-r1 tuwunel
newinitd "${FILESDIR}"/tuwunel.init-r1 tuwunel
insinto /etc/tuwunel
newins "${WORKDIR}/${P}"/tuwunel-example.toml tuwunel.toml
insinto /etc/logrotate.d
newins "${FILESDIR}"/tuwunel.logrotate-r1 tuwunel
}
Manage flags for this package:
euse -i <flag> -p net-im/tuwunel |
euse -E <flag> -p net-im/tuwunel |
euse -D <flag> -p net-im/tuwunel
acct-user/matrix !net-im/conduit !net-im/conduwuit
llvm-core/clang >=dev-lang/rust-1.94.0:*
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | tuwunel-1.7.0-deps.tar.xz | 65745208 bytes | https://lmkra.dev/gentoo/tuwunel-1.7.0-deps.tar.xz |
| DIST | tuwunel-1.7.0.tar.gz | 1132915 bytes | https://github.com/matrix-construct/tuwunel/archive/refs/tags/v1.7.0.tar.gz |