summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f3f83c808560dbf0541f6a35b0203e98265a6413 (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
# Maintainer: Alexander Couzens <lynxis@fe80.eu>
pkgname=liblms7002m-xtrx-git
_gitname="liblms7002m"
pkgver=r9.bfd5418098f1
pkgrel=3
pkgdesc="A Compact LMS7002 library suitable for MCU. Use by the xtrx sdr."
arch=('armv7h' 'i686' 'x86_64')
url="https://github.com/xtrx-sdr/liblms7002m"
license=('LGPL')
depends=('python2-cheetah')
makedepends=('git' 'cmake')
source=("git+$url")
md5sums=('SKIP')
provides=('liblms7002m-xtrx')

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

build() {
  mkdir -p "$srcdir"/$_gitname/build
  cd "$srcdir"/$_gitname/build

  cmake .. \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release

  make
}

package() {
  cd "$srcdir"/$_gitname/build

  make DESTDIR="$pkgdir" install
}