summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2404e2cc3644638daefe972f7ad0ea68b402a143 (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
# Maintainer: Matt Coffin <mcoffin13@gmail.com>
pkgname=fanctl-git
pkgver=r20.5080e76
pkgrel=1
pkgdesc=""
arch=('x86_64')
url="https://gitlab.com/mcoffin/fanctl"
license=('GPL')
groups=()
depends=()
makedepends=('git' 'cargo') # 'bzr', 'git', 'mercurial' or 'subversion'
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
source=('fanctl::git+https://gitlab.com/mcoffin/fanctl.git#branch=master')
noextract=()
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	# printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	cargo build --release
}

package() {
	cd "$srcdir/${pkgname%-git}"
	cargo install --path . --root "$pkgdir/usr" --bins
	if [ -e "$pkgdir/usr/.crates.toml" ]; then
		rm "$pkgdir/usr/.crates.toml"
	fi
	install -D -m 644 -t "$pkgdir/usr/share/licenses/$pkgname" ./COPYING
}