summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ccc9f0817c0d1ae9d7be6272d45724f70749cf4e (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
# Maintainer: David Birks <david@tellus.space>
# Contributor: Dominik Heidler <dheidler@gmail.com>
# Contributor: Kyle Keen <keenerd@gmail.com>
# Contributor:	Jonatan Sastre <jsastreh [ at ] hotmail.com>

pkgname=gnuradio-git
_gitname=gnuradio
pkgver=v3.8.0.0.580.g20c29ce9d
pkgrel=1
pkgdesc="General purpose DSP and SDR toolkit, with drivers for usrp and fcd."
arch=('i686' 'x86_64')
url="https://github.com/gnuradio/gnuradio"
license=('GPL')
depends=('fftw' 'python' 'python-numpy' 'python-mako' 'python-click' 'python-click-plugins' 'python-pyqt5' 'python-gobject' 'cppunit' 'gsl' 'blas' 'guile' 'boost-libs>=1.54' 'libusbx' 'portaudio' 'libuhd' 'zeromq' 'libvolk' 'log4cpp')
makedepends=('git' 'boost' 'cmake' 'python-cairo' 'python-yaml' 'python-cheetah3' 'glu' 'pybind11' 'qwt' 'python-sphinx')
optdepends=('python-lxml: Some GRC modules use lxml optionally for improved performance')
source=("git+https://github.com/gnuradio/gnuradio.git")
md5sums=('SKIP')
conflicts=('gnuradio' 'gnuradio-companion')
provides=('gnuradio' 'gnuradio-companion')

pkgver() {
    cd "$srcdir/$_gitname"
    git describe --always | sed 's|-|.|g'
}

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

    sed -i -e "s|GR_PKG_LIBEXEC_DIR|GR_RUNTIME_DIR|" grc/scripts/freedesktop/CMakeLists.txt
    msg "Starting build."
    mkdir -p build
    cd build
    cmake \
        -DENABLE_GRC=ON \
        -DENABLE_GR_QTGUI=ON \
        -DENABLE_INTERNAL_VOLK=OFF \
        -DENABLE_GR_CTRLPORT=OFF \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DGR_PYTHON_DIR=/usr/lib/python3.8/site-packages \
        -DQWT_LIBRARIES=/usr/lib/libqwt.so -Wno-dev ../
    make
}

check() {
    cd "$srcdir/$_gitname/build"
    #make test
}

package() {
    cd "$srcdir/$_gitname/grc/scripts/freedesktop"
    install -Dm644 gnuradio-grc.desktop "$pkgdir/usr/share/applications/$pkgbase.desktop"
    cd "$srcdir/$_gitname/build"
    make DESTDIR="$pkgdir" install
    find "$pkgdir/" -name '*.pyc' -delete
    find "$pkgdir/" -name '*.pyo' -delete
}