blob: b67b62cbba32a3876f1f353e4dbe13050ad9bc99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Maintainer: Daniel Peukert <daniel@peukert.cc>
_projectname='inputmodule-rs'
pkgname='inputmodule-control'
pkgver='0.2.0'
pkgrel='2'
pkgdesc='Command line utility to control Framework Laptop 16 input modules'
arch=('x86_64')
url="https://github.com/FrameworkComputer/$_projectname"
license=('MIT')
depends=('inputmodule-udev' 'libasound.so' 'libudev.so')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('068f26d83ee68e6e1b71954add4a9df740426596f3f6301cb5f24b898e17d41f70f1d3245afe6e2b601e09a72c8dfb868fae65f8a9e9c439cde40eddbd8a47a9')
_sourcedirectory="$_projectname-$pkgver"
_cargotarget="$(rustc -vV | sed -n 's/host: //p')"
prepare() {
cd "$srcdir/$_sourcedirectory/"
export RUSTUP_TOOLCHAIN='stable'
cargo fetch --locked --target "$_cargotarget"
}
build() {
cd "$srcdir/$_sourcedirectory/"
export RUSTUP_TOOLCHAIN='stable'
export CARGO_TARGET_DIR='target'
cargo build --frozen --release --target "$_cargotarget" --package "$pkgname" --all-features
}
check() {
"$srcdir/$_sourcedirectory/target/$_cargotarget/release/$pkgname" --help | grep -q 'RAW HID and VIA commandline'
}
package() {
cd "$srcdir/$_sourcedirectory/"
install -Dm755 "target/$_cargotarget/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 'LICENSE' "$pkgdir/usr/share/licenses/$pkgname/MIT"
}
|