diff options
author | George Rawlinson | 2021-08-16 22:21:06 +0000 |
---|---|---|
committer | George Rawlinson | 2021-08-16 22:21:06 +0000 |
commit | 60413011fa12a6e082438d4e13970518435221bc (patch) | |
tree | ede8419ae4dd4edce5452347e676625b872600a4 | |
download | aur-60413011fa12a6e082438d4e13970518435221bc.tar.gz |
addpkg: rusty-hook 0.11.2-1
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 41 |
2 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8e221ccbff65 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,12 @@ +pkgbase = rusty-hook + pkgdesc = Git hook manager + pkgver = 0.11.2 + pkgrel = 1 + url = https://github.com/swellaby/rusty-hook + arch = x86_64 + license = MIT + makedepends = rust + source = rusty-hook-0.11.2.tar.gz::https://static.crates.io/crates/rusty-hook/rusty-hook-0.11.2.crate + b2sums = f531ce50a7eee3e7a6fe2bc1700438e1dfd52aa16b2deb6099666435178d44bc8f2281bcd8eb59a90ac9da551ae4e6cdda61759dbd1b8f8339ccdc2e33b0d783 + +pkgname = rusty-hook diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0a71bd005ee5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: George Rawlinson <grawlinson@archlinux.org> + +pkgname=rusty-hook +pkgver=0.11.2 +pkgrel=1 +pkgdesc="Git hook manager" +arch=('x86_64') +url="https://github.com/swellaby/rusty-hook" +license=('MIT') +makedepends=('rust') +source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate") +b2sums=('f531ce50a7eee3e7a6fe2bc1700438e1dfd52aa16b2deb6099666435178d44bc8f2281bcd8eb59a90ac9da551ae4e6cdda61759dbd1b8f8339ccdc2e33b0d783') + +prepare() { + # download dependencies + cd "$pkgname-$pkgver" + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} + +build() { + cd "$pkgname-$pkgver" + cargo build --release --frozen +} + +check() { + cd "$pkgname-$pkgver" + cargo test --frozen +} + +package() { + cd "$pkgname-$pkgver" + + # binary + install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname" + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE + + # documentation + install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md +} |