-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD.template
51 lines (37 loc) · 934 Bytes
/
PKGBUILD.template
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
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: mbme
pkgname=mb-binutils
pkgrel=1
pkgver="0.0.0"
pkgdesc='CLI apps for controlling Linux laptop backlight, volume, microphone, touchpad etc.'
arch=(x86_64)
license=(MIT)
depends=(libnotify libpulse light xorg-xinput)
makedepends=(git cargo)
options=(!debug)
pkgver() {
cd ..
git describe --abbrev=0 --tags
}
prepare() {
cd ..
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd ..
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
export BINUTILS_VERSION=$(git describe --tags)
cargo build --frozen --release
}
check() {
cd ..
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo test --locked --release
}
package() {
cd ..
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/mb-audio"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/mb-backlight"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/mb-touchpad"
}