summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 000d7df8a408b0f2c147a8914969f37f2afb481e (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
# Maintainer: Dana Sorensen <dana.r.sorensen@gmail.com>

pkgname=iio-oscilloscope-git
pkgver=v0.10.r28.9b9a441
pkgrel=1
pkgdesc="A GTK+ based oscilloscope application for interfacing with various IIO devices"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="https://github.com/analogdevicesinc/iio-oscilloscope"
license=('GPL2')
depends=('gtk2' 'gtkdatabox' 'libmatio' 'fftw' 'libxml2' 'bison' 'flex' 'avahi' 'curl' 'jansson' 'libaio' 'ncurses' 'libad9361-iio')
makedepends=('git' 'cmake')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/analogdevicesinc/iio-oscilloscope.git')
md5sums=('SKIP')

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

prepare() {
    # change config.h prefix to "/usr"
    sed -i 's/\/usr\/local\//\/usr/' "$srcdir/${pkgname%-git}/config.h"
}

build() {
    cd "$srcdir/${pkgname%-git}"
    cmake -DCMAKE_INSTALL_PREFIX=/usr .
    make
}

package() {
    cd "$srcdir/${pkgname%-git}"
    make DESTDIR="$pkgdir/" install
}