summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1860f467a4a68959a21ba56bbfd0d48526f93641 (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
# Maintainer: Jordan Rudess <jrudess@gmail.com>
pkgname=levd-git
pkgver=r24.cd12fdf
pkgrel=4
pkgdesc="Daemon to control NZXT Kraken x61"
arch=('i686' 'x86_64')
url="https://github.com/graphcareful/levd"
license=('MIT')
depends=('google-glog' 'yaml-cpp' 'libusb' 'lm_sensors')
makedepends=('git' 'cmake')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
backup=("etc/leviathan/levd.cfg")
install=
source=('levd::git+https://github.com/graphcareful/levd.git')
md5sums=('SKIP')

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

prepare() {
	mkdir -p "$srcdir/${pkgname%-git}/build"
	patch -Np1 -i "$srcdir/../${pkgname%-git}.patch"
}

build() {
	cd "$srcdir/${pkgname%-git}/build"
	cmake .. KRAKEN_LIB_LIBRARIES=":libsensors.so :libyaml-cpp.so :libglog.so.2 :libusb-1.0.so.0"

	make
}

package() {
	cd "$srcdir/${pkgname%-git}/build"
	make DESTDIR="$pkgdir/" install
	install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/${pkgname%-git}/LICENSE
}