# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=soapyairspy
pkgver=0.2.0
_pkgname=SoapyAirspy
_gitver=soapy-airspy-$pkgver
pkgrel=2
pkgdesc='Soapy SDR plugin for the the Airspy'
arch=('x86_64')
url='https://github.com/pothosware/SoapyAirspy'
license=('GPL3')
depends=('soapysdr' 'airspy')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_gitver.tar.gz")
sha512sums=('1ba873d093209e42883508dc30b7c605fe1f7bf0b5df613adb4941e976575f8f7f71fe99d57038ff51536c5a7a68a869412e47b4e3e112e633546778b5b0e8d4')

build() {
  mkdir -p $_pkgname-$_gitver/build
  cd $_pkgname-$_gitver/build

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

  make
}

package() {
  cd $_pkgname-$_gitver/build

  make DESTDIR="$pkgdir" install
}

