blob: b02ec7ad25c28ee30b149916b05f842ef3255758 (
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
47
48
|
# Maintainer : envolution
# Contributor: mnussbaum
# Contributor: j.r <j.r@jugendhacker.de>
pkgname=rot8-git
_pkgname="rot8"
pkgver=1.0.0+r108+gb805f981b
pkgrel=1
pkgdesc="A screen rotation daemon "
arch=("x86_64" "aarch64")
url="https://github.com/efernau/rot8"
license=("MIT")
makedepends=("git" "rust" "cargo")
source=("$_pkgname::git+https://github.com/efernau/rot8.git")
sha256sums=('SKIP')
provides=("rot8")
conflicts=("rot8")
pkgver(){
cd "${srcdir}/${_pkgname}"
_version=$(git tag --sort=-v:refname --list | head -n1 | cut -c2-)
_commits=$(git rev-list --count HEAD)
_short_commit_hash=$(git rev-parse --short=9 HEAD)
echo "${_version}+r${_commits}+g${_short_commit_hash}"
}
prepare() {
cd "$_pkgname"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$_pkgname"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
package() {
install -Dm755 "$srcdir/$_pkgname/target/release/rot8" "$pkgdir/usr/bin/rot8"
install -Dm644 "$srcdir/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim: ts=2 sw=2 et:
|