summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Krause2024-08-02 23:25:50 +0200
committerChristian Krause2024-08-02 23:25:50 +0200
commit568bb75f131889ceb69f627409789e63c6473fd7 (patch)
treeee209bd31505d2dd992f4b5790d7793db0a573b3
downloadaur-psfu.tar.gz
initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD70
2 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cb896f6bcd02
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = psfu
+ pkgdesc = process fu
+ pkgver = 0.4.7
+ pkgrel = 1
+ url = https://github.com/idiv-biodiversity/psfu
+ arch = x86_64
+ arch = i686
+ license = GPL-3.0-or-later
+ makedepends = cargo
+ depends = gcc-libs
+ depends = glibc
+ source = psfu-0.4.7.tar.gz::https://github.com/idiv-biodiversity/psfu/archive/v0.4.7.tar.gz
+ md5sums = 2ae607b5c33ec3c4f132ca2c15f0489f
+
+pkgname = psfu
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..01b659f7796c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: Christian Krause ("wookietreiber") <christian.krause@mailbox.org>
+# shellcheck disable=2034
+# shellcheck disable=2148
+
+pkgname=psfu
+pkgver=0.4.7
+pkgrel=1
+pkgdesc="process fu"
+arch=('x86_64' 'i686')
+url="https://github.com/idiv-biodiversity/$pkgname"
+license=('GPL-3.0-or-later')
+depends=('gcc-libs' 'glibc')
+makedepends=('cargo')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/idiv-biodiversity/$pkgname/archive/v$pkgver.tar.gz")
+md5sums=('2ae607b5c33ec3c4f132ca2c15f0489f')
+
+prepare() {
+ # shellcheck disable=2154
+ cd "$srcdir"/$pkgname-$pkgver || exit 1
+
+ export RUSTUP_TOOLCHAIN=stable
+
+ cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver || exit 1
+
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+
+ cargo build --frozen --release --all-features
+}
+
+check() {
+ cd "$srcdir"/$pkgname-$pkgver || exit 1
+
+ export RUSTUP_TOOLCHAIN=stable
+
+ cargo test --frozen --all-features
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver || exit 1
+
+ # shellcheck disable=2154
+ install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
+
+ find target -name '*.bash$'
+
+ install \
+ -Dm644 \
+ "$(find target -name $pkgname.bash)" \
+ "$pkgdir/usr/share/bash-completion/completions/$pkgname"
+
+ install \
+ -Dm644 \
+ "$(find target -name $pkgname.elv)" \
+ "$pkgdir/usr/share/elvish/lib/$pkgname.elv"
+
+ install \
+ -Dm644 \
+ "$(find target -name $pkgname.fish)" \
+ "$pkgdir/usr/share/fish/vendor_completions.d/$pkgname.fish"
+
+ install \
+ -Dm644 \
+ "$(find target -name _$pkgname)" \
+ "$pkgdir/usr/share/zsh/site-functions/_$pkgname"
+}