app-misc/pipes-rs: make live ebuild a live template; fix keywords

Since we need to fix KEYWORDS on the live ebuild anyway,
make it a template.

- Also rename the patch in filesdir to include `${P}`.
- Sync 1.6.3 with live (patch needed updating anyway)
- Minor QA issues addressed

Signed-off-by: Matt Jolly <kangie@gentoo.org>
This commit is contained in:
Matt Jolly
2025-05-21 15:17:19 +10:00
parent 1e541ecda0
commit 658724d61b
3 changed files with 41 additions and 17 deletions

View File

@@ -67,21 +67,34 @@ inherit cargo
DESCRIPTION="An over-engineered rewrite of pipes.sh in Rust"
HOMEPAGE="https://github.com/lhvy/pipes-rs"
SRC_URI="
https://github.com/lhvy/pipes-rs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
${CARGO_CRATE_URIS}
"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/lhvy/pipes-rs.git"
else
SRC_URI="https://github.com/lhvy/pipes-rs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
${CARGO_CRATE_URIS}"
KEYWORDS="~amd64"
fi
LICENSE="BlueOak-1.0.0 Apache-2.0 MIT Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"
PATCHES=(
"${FILESDIR}/do-not-strip.patch"
"${FILESDIR}/${PN}-1.6.3-do-not-strip.patch"
)
QA_FLAGS_IGNORED="usr/bin/${PN}"
src_unpack() {
if [[ ${PV} == *9999* ]]; then
git-r3_src_unpack
cargo_live_src_unpack
else
cargo_src_unpack
fi
}
src_install() {
cargo_src_install --path ./crates/${PN}
}
QA_FLAGS_IGNORED="usr/bin/${PN}"

View File

@@ -5,27 +5,38 @@
EAPI=8
inherit cargo git-r3
inherit cargo
DESCRIPTION="An over-engineered rewrite of pipes.sh in Rust"
HOMEPAGE="https://github.com/lhvy/pipes-rs"
EGIT_REPO_URI="https://github.com/lhvy/pipes-rs.git"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/lhvy/pipes-rs.git"
else
SRC_URI="https://github.com/lhvy/pipes-rs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
${CARGO_CRATE_URIS}"
KEYWORDS="~amd64"
fi
LICENSE="BlueOak-1.0.0 Apache-2.0 MIT Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"
PATCHES=(
"${FILESDIR}/do-not-strip.patch"
"${FILESDIR}/${PN}-1.6.3-do-not-strip.patch"
)
QA_FLAGS_IGNORED="usr/bin/${PN}"
src_unpack() {
git-r3_src_unpack
cargo_live_src_unpack
if [[ ${PV} == *9999* ]]; then
git-r3_src_unpack
cargo_live_src_unpack
else
cargo_src_unpack
fi
}
src_install() {
cargo_src_install --path ./crates/${PN}
cargo_src_install --path ./crates/${PN}
}
QA_FLAGS_IGNORED="usr/bin/${PN}"