summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cb4d9041cd088cc95591c630b0d49c4a7c91c062 (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
# Maintainer: Mattias Giese <mattiasgiese@posteo.net>
pkgname=kanshi-git
pkgver=r45.970267e
pkgrel=1
pkgdesc="Dynamic display configuration for WMs like i3/sway"
arch=(x86_64)
url="https://github.com/emersion/kanshi"
license=('MIT')
groups=()
depends=('rust')
makedepends=('git') # 'bzr', 'git', 'mercurial' or 'subversion'
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
source=('kanshi::git+https://github.com/emersion/kanshi.git')
noextract=()
md5sums=('SKIP')

# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
# a description of each element in the source array.

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}


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

check() {
	cd "$srcdir/${pkgname%-git}"
  cargo test --release --locked ${pkgname%-git}
}

package() {
	cd "$srcdir/${pkgname%-git}"
  install -Dm 755 target/release/${pkgname%-git} -t "${pkgdir}/usr/bin"
}