summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 22 insertions, 15 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d534357763fd..99aa5419f1e4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,37 @@
# Maintainer: Celti Burroughs <celti@celti.name>
pkgname=inputplug
-pkgver=0.3
+pkgver=0.4.0
pkgrel=1
-pkgdesc="Xinput hotplug event daemon"
+pkgdesc="Xinput hotplug event monitor daemon"
arch=('x86_64')
url="https://github.com/andrewshadura/inputplug"
license=('MIT')
-depends=('libxcb')
-makedepends=('libxi' 'libxfixes')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/andrewshadura/$pkgname/archive/$pkgver.tar.gz")
-sha256sums=('acac8e3972f3f10f9b6791321d2441e6b54d93d97c2de81e13eb14734a635ef7')
+depends=('gcc-libs' 'libbsd')
+makedepends=('cargo')
+source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
+sha512sums=('920aee68defbdf91e699a1e5c4ff312f6e3c1a6ee1887bec409dfdee851358f4a7e6e845dfa3e5b57a2035195a6bc1afee400c5475eeb821c07d748e760127b8')
prepare() {
- cd "$pkgname-$pkgver"
- sed -i 's/CFLAGS =/CFLAGS +=/' GNUmakefile
+ cd "$pkgname-$pkgver"
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
- cd "$pkgname-$pkgver"
- make -f GNUmakefile
- gzip inputplug.1
+ cd "$pkgname-$pkgver"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release --all-features
+}
+
+check() {
+ cd "$pkgname-$pkgver"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo test --frozen --all-features
}
package() {
- cd "$pkgname-$pkgver"
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- install -Dm644 inputplug.1.gz "$pkgdir/usr/share/man/man1/inputplug.1.gz"
- install -Dm755 inputplug "$pkgdir/usr/bin/inputplug"
+ cd "$pkgname-$pkgver"
+ install -Dm755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/LICENSE" "LICENSE"
+ install -Dm644 -t "$pkgdir/usr/share/man/man1/$pkgname.1" "$pkgname.1"
}