From 98618e8965b1b4eb9a0acf4f0415ab799951dcd2 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 16 Jun 2021 19:27:28 +0800 Subject: [PATCH] add package: helvum --- helvum/.gitignore | 5 +++ helvum/PKGBUILD | 50 ++++++++++++++++++++++++++++++ helvum/autobuild.yaml | 7 +++++ helvum/buildbot.update.d/config.sh | 24 ++++++++++++++ helvum/buildbot.update.d/update.sh | 1 + helvum/helvum.desktop | 8 +++++ 6 files changed, 95 insertions(+) create mode 100644 helvum/.gitignore create mode 100644 helvum/PKGBUILD create mode 100644 helvum/autobuild.yaml create mode 100644 helvum/buildbot.update.d/config.sh create mode 120000 helvum/buildbot.update.d/update.sh create mode 100644 helvum/helvum.desktop diff --git a/helvum/.gitignore b/helvum/.gitignore new file mode 100644 index 0000000..5d0ab32 --- /dev/null +++ b/helvum/.gitignore @@ -0,0 +1,5 @@ +pkg/ +src/ +.cargo/ +*.pkg.tar.* +*.tar.gz diff --git a/helvum/PKGBUILD b/helvum/PKGBUILD new file mode 100644 index 0000000..889c428 --- /dev/null +++ b/helvum/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: imp0 siteworld <(.)> be> +# Contributor: Emmanuel Gil Peyrot + +pkgname=helvum +pkgver=0.2.1 +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=('667908a8c4296f742e91705bb74d2276f8e8d721eb4b16f8e5f97f99156075b194540083b36d69c4fe6ee0558584047dd5862d71c91c59b9d59f9d0cc2eb9a1a' + '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}') + 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: diff --git a/helvum/autobuild.yaml b/helvum/autobuild.yaml new file mode 100644 index 0000000..0a22a4f --- /dev/null +++ b/helvum/autobuild.yaml @@ -0,0 +1,7 @@ +type: + auto +priority: + 10 +extra: + - update: + - bash buildbot.update.d/update.sh diff --git a/helvum/buildbot.update.d/config.sh b/helvum/buildbot.update.d/config.sh new file mode 100644 index 0000000..2d1c099 --- /dev/null +++ b/helvum/buildbot.update.d/config.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# buildbot update hook for aur packages + +PKGNAME='helvum' +PKGBUILD='PKGBUILD' + +# prepare upstream source +prepare() { + # sed -i "s/^arch=.*$/arch=('aarch64')/g" PKGBUILD + # git apply 0001.patch + true +} + +# which files to include, overrides exclude_files below +INCLUDE_FILES=( +# 'PKGBUILD' +# '.gitignore' +) + +# which files to exclude, use '*' and '.*' to exclude all +EXCLUDE_FILES=( + '.SRCINFO' + '.git' +) diff --git a/helvum/buildbot.update.d/update.sh b/helvum/buildbot.update.d/update.sh new file mode 120000 index 0000000..7600931 --- /dev/null +++ b/helvum/buildbot.update.d/update.sh @@ -0,0 +1 @@ +../../.buildbot/aur.hook.d/update.sh \ No newline at end of file diff --git a/helvum/helvum.desktop b/helvum/helvum.desktop new file mode 100644 index 0000000..1ef0491 --- /dev/null +++ b/helvum/helvum.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Helvum +GenericName=Helvum +Comment=PipeWire Patchbay +Exec=helvum +Terminal=false +Type=Application +Categories=AudioVideo;