summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6f620d2281d91cc15a63c9f4c3a1074a60429c0c (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Maintainer: Grey Christoforo <first name at last name dot net>

_pkgname=gnuradio-iio
pkgname=gnuradio-iio-patched-3.8

pkgver=r240.d6d1f6a
pkgrel=2

_commit=d6d1f6ac7db5be3eb990ee8ef78bb65cf3a15dd7

pkgdesc="IIO blocks for GNU Radio (Patched for Gnuradio version 3.8, not compatible with 3.9-git)"

url="https://github.com/analogdevicesinc/gr-iio"
arch=(x86_64)
license=(GPL3)
depends=(
gnuradio38
libad9361
)
makedepends=(git cmake boost swig)

provides=(gnuradio-iio)
conflicts=(gnuradio-iio gnuradio-iio-git gnuradio-git)

source=(
  "$_pkgname::git+https://github.com/analogdevicesinc/gr-iio.git#commit=$_commit"
  0001-several-fixes.patch
)
sha256sums=('SKIP'
            '691af280cab551c50f6469632b6624c3957f6e9725998f45574e21abdec7965c')


pkgver() {
  cd "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count $_commit)" "$(git rev-parse --short $_commit)"
}

prepare() {
  cd "$_pkgname"
  patch -p1 -i ../0001-several-fixes.patch
}



build() {
  cd "$_pkgname"
  mkdir -p build
  cd build
  export PYTHON=python3
  cmake \
    -DPYTHON_EXECUTABLE=$(which python3) \
    -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev ../
  make
}

package() {
  cd "$_pkgname/build"
  make DESTDIR="${pkgdir}" install

  mkdir -p ${pkgdir}/usr/share/gnuradio/examples/iio
  cp ../iio-examples/* ${pkgdir}/usr/share/gnuradio/examples/iio/
}