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

pkgname=soapyhackrf
pkgver=0.3.3
_pkgname=SoapyHackRF
_gitver=soapy-hackrf-$pkgver
pkgrel=3
pkgdesc='Soapy SDR plugin for the HackRF'
arch=('x86_64')
url='https://github.com/pothosware/SoapyHackRF'
license=('GPL3')
depends=('soapysdr' 'hackrf')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_gitver.tar.gz")
sha512sums=('d0e6ddbb8054b11bfb121a18e435c0f0c23290e5e29e89af83f660865e1c8adf4ed38082c96ab6a3cb68a50b7379f3fe5ef171616eccabe3f67d65b71d08dba9')

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
}

