summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1e8f6e8a42ba3321c20075d465d8ad732c55aa83 (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: iniVation AG <support@inivation.com>

pkgname=libcaer-git
pkgver=1
pkgrel=1
pkgdesc="Minimal C library to access, configure and get data from neuromorphic sensors and processors."
url="https://gitlab.com/inivation/${pkgname%-git}/"
license=('BSD')
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
groups=()
depends=('libusb' 'libserialport' 'opencv')
makedepends=('git' 'cmake' 'pkgconf')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
options=('staticlibs')
source=("$pkgname::git+https://gitlab.com/inivation/${pkgname%-git}.git")
noextract=()
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/$pkgname"

	# Git, tags available
	printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
	cd "$srcdir/$pkgname"

	cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_SERIALDEV=1 -DENABLE_OPENCV=1 -DENABLE_STATIC=1 -DUDEV_INSTALL=1 -DUDEV_SELINUX=0 .

	make
}

package() {
	cd "$srcdir/$pkgname"

	DESTDIR="$pkgdir/" make install

	cd "$pkgdir"

	# Fix udev directory due to symlinks
	mv lib/udev/ usr/lib/
	rm -Rf lib/
}