summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1a13e22558c1a777f9ebb16e5ea83a279ce0632d (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
# Maintainer: Forest Crossman <cyrozap at gmail dot com>

pkgname=libsmu-git
pkgver=1.0.1.r18.gdda38f6
pkgrel=1
pkgdesc="Software abstractions for the analog signal exploration tools."
arch=('i686' 'x86_64')
url="https://github.com/analogdevicesinc/libsmu"
license=('BSD')
depends=('libusb' 'python2')
makedepends=('git' 'cmake' 'pkg-config')
source=("$pkgname::git+https://github.com/analogdevicesinc/libsmu.git")
md5sums=('SKIP')

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

build() {
  cd $pkgname

  mkdir -p build && cd build
  cmake \
    -DCMAKE_INSTALL_LIBDIR=lib \
    ..

  make
}

package() {
  cd $pkgname

  # Install the license
  install -d "$pkgdir"/usr/share/licenses/libsmu-git/
  install -m 644 LICENSE "$pkgdir"/usr/share/licenses/libsmu-git/

  # Install the library
  cd build
  make DESTDIR="$pkgdir/" install
}