blob: 31e19b3ddec5af3a56d3959db2da831ab7cb6910 (
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
40
41
42
43
44
45
46
|
# Maintainer: GreyXor <greyxor@protonmail.com>
pkgname=framework-system-git
pkgver=r304.491a587
pkgrel=1
arch=('x86_64')
pkgdesc='Tool to interact with the framework system (git development version)'
url='https://frame.work'
license=('MIT')
depends=(
"libusb"
"gcc-libs"
"glibc"
"systemd-libs"
)
makedepends=(
"git"
"cargo"
"pkg-config"
)
OPTIONS=(!lto)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname}::git+https://github.com/FrameworkComputer/framework-system.git")
b2sums=('SKIP')
pkgver() {
# Calculate the version dynamically using git information
printf "r%s.%s" "$(git -C "$srcdir/${pkgname}" rev-list --count HEAD)" "$(git -C "$srcdir/${pkgname}" rev-parse --short HEAD)"
}
build() {
cd "$srcdir/${pkgname}"
cargo build --release -p framework_tool
}
check() {
cd "$srcdir/${pkgname}"
cargo test
}
package() {
cd "$srcdir/${pkgname}"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/framework_tool"
install -Dm0644 -t "$pkgdir/usr/share/licenses/${pkgname}/" "LICENSE.md"
}
|