mirror of
https://github.com/archlinux-jerry/pkgbuilds
synced 2024-11-22 22:10:40 +08:00
50 lines
2 KiB
Bash
50 lines
2 KiB
Bash
# Maintainer: imp0 <jan <(@)> siteworld <(.)> be>
|
|
# Contributor: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
|
|
|
|
pkgname=helvum
|
|
pkgver=0.3.0
|
|
pkgrel=1
|
|
pkgdesc='GTK-based patchbay for pipewire, inspired by the JACK tool catia'
|
|
arch=('x86_64')
|
|
url='https://gitlab.freedesktop.org/ryuukyu/helvum'
|
|
license=('GPL3')
|
|
depends=('gtk4' 'pipewire')
|
|
makedepends=('rust' 'clang' 'semver')
|
|
conflicts=('helvum-git')
|
|
source=("https://gitlab.freedesktop.org/ryuukyu/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
|
"${pkgname}.desktop")
|
|
sha512sums=('32f79d1df8cab164c16745744ade36dccd03e4ea51ae62231c56c575eea4b8d82d4263928e70c158d8547765d3fafc4fb817cdffc120a8a46fd6e9e313bacba1'
|
|
'0a76aa3b7c98d08ded9d4c7a2254faa0b83a2f2339db81b995819b0f0e4721cf79df17473ca22a4d8aab161b162e70f7e63b728e603c6b9cb09f2f361aa8e537')
|
|
|
|
# This package needs at least rust 1.51 to build correctly: https://gitlab.freedesktop.org/ryuukyu/helvum/-/issues/4
|
|
# No proper solution to handle this was implemented in rust so far: https://rust-lang.github.io/rfcs/2495-min-rust-version.html
|
|
# This check will fail when the installed rust version doesn't meet the minimum requirement, although it shouldn't occur when an up-to-date build environment is used.
|
|
prepare() {
|
|
min_ver='1.51'
|
|
echo "Checking for minimal required rust version (${min_ver})..."
|
|
rust_ver=$(rustc --version | awk '{print $2}' | sed 's/-nightly//')
|
|
semver -r ">=${min_ver}" "${rust_ver}"
|
|
}
|
|
|
|
build() {
|
|
cd "${pkgname}-${pkgver}"
|
|
RUSTUP_TOOLCHAIN=stable cargo build --release --locked --all-features --target-dir=target
|
|
}
|
|
|
|
package() {
|
|
# Installs desktop entry
|
|
install -dm755 "${pkgdir}/usr/share/applications"
|
|
install -m644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
|
|
|
|
# Changes path
|
|
cd "${pkgname}-${pkgver}"
|
|
|
|
# Installs license
|
|
install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
|
|
# Installs binary
|
|
install -Dm 755 target/release/${pkgname} -t "${pkgdir}/usr/bin"
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|