summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 14bcbf21306f4389a8e6f659a406931289b3d049 (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: Dana Sorensen <dana.r.sorensen@gmail.com>
# Contributor: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>

_pkgname=libiio
pkgname="$_pkgname-git"
pkgver=v0.15.r0.g6ecff5d
pkgrel=1
pkgdesc="Library for interfacing with IIO devices"
arch=('i686' 'x86_64' 'armv7h' 'armv6h')
url="https://github.com/analogdevicesinc/libiio"
license=('LGPL2.1')
provides=('libiio')
conflicts=('libiio')
depends=('libusb' 'libaio' 'libxml2' 'libserialport' 'avahi' 'python')
makedepends=('git' 'cmake')
source=("$_pkgname::git+https://github.com/analogdevicesinc/libiio")
md5sums=('SKIP')

pkgver() {
    cd "$srcdir/$_pkgname"
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    mkdir -p "$srcdir/$_pkgname/build"
}

build() {
    cd "$srcdir/$_pkgname/build"
    cmake .. \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DCMAKE_INSTALL_SBINDIR=bin \
        -DUDEV_RULES_INSTALL_DIR=/usr/lib/udev/rules.d \
        -DCSHARP_BINDINGS=OFF \
        -DMATLAB_BINDINGS=OFF \
        -DWITH_SYSTEMD=YES \
        -DSYSTEMD_UNIT_INSTALL_DIR=/usr/lib/systemd/system
    make
}

package() {
    cd "$srcdir/$_pkgname/build"
    make DESTDIR="$pkgdir" install
}