PKGBUILDs/community/gnuradio/PKGBUILD

112 lines
3.8 KiB
Bash
Raw Normal View History

2015-03-06 06:38:58 +00:00
# $Id$
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Dominik Heidler <dheidler@gmail.com>
# Contributor: Jonatan Sastre <jsastreh [ at ] hotmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set -Dhave_mfpu_neon=0 for v5/v6
pkgbase=gnuradio
pkgname=(gnuradio gnuradio-companion)
2015-04-17 00:03:39 +00:00
pkgver=3.7.7
2015-04-28 12:27:58 +00:00
pkgrel=3
2015-03-06 06:38:58 +00:00
pkgdesc="General purpose DSP and SDR toolkit. With drivers for usrp and fcd."
arch=('i686' 'x86_64')
url="http://gnuradio.org"
license=('GPL')
depends=('fftw' 'python2-numpy' 'cppunit' 'gsl' 'blas' 'guile' 'boost-libs>=1.53' 'libusbx' 'portaudio' 'libuhd' 'zeromq')
2015-03-15 16:56:21 +00:00
makedepends=('boost' 'cmake' 'python2-lxml' 'python2-cheetah' 'glu' 'swig'
'pygtk' 'wxpython' 'python2-pyqwt' 'qwtplot3d')
2015-03-06 06:38:58 +00:00
install=gnuradio.install
# todo
# split the gui components?
# build doxygen docs?
2015-03-15 16:56:21 +00:00
# gr-video-sdl ?
2015-03-06 06:38:58 +00:00
# icons
# comedilib: gr-comedi
# zeroc-ice: gr-ctrlport
# doxygen: C++ autogenerated documentation
# python2-sphinx: Python autogenerated documentation
#source=("http://gnuradio.org/releases/$pkgbase/$pkgbase-$pkgver.tar.gz"
# secret release directory
source=("http://s3-dist.gnuradio.org/gnuradio-$pkgver.tar.gz"
"21-fcd.rules")
2015-04-17 00:03:39 +00:00
md5sums=('a798a089a3c899bb68e78c878a403510'
2015-03-06 06:38:58 +00:00
'465e12c454c6a22ebec9849181af7bdc')
build() {
export PYTHON=python2
cd "$srcdir/$pkgbase-$pkgver"
sed -i -e "s|GR_PKG_LIBEXEC_DIR|GR_RUNTIME_DIR|" grc/freedesktop/CMakeLists.txt
sed -i -e "s|/qwt$|/qwt5|" -e "s| qwt | qwt5 |" cmake/Modules/FindQwt.cmake
sed -i -e "s| sphinx-build$| sphinx-build2|" cmake/Modules/FindSphinx.cmake
msg "Starting build."
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && NEON="-Dhave_mfpu_neon=0"
mkdir -p build
cd build
cmake \
-DPYTHON_EXECUTABLE=$(which python2) \
-DPYTHON_INCLUDE_DIR=$(echo /usr/include/python2*) \
2015-03-15 16:56:21 +00:00
-DENABLE_GR_QTGUI=ON \
2015-03-06 06:38:58 +00:00
-DPYTHON_LIBRARY=$(echo /usr/lib/libpython2.*.so) \
-DENABLE_GRC=ON \
-DENABLE_GR_WXGUI=ON \
-DCMAKE_INSTALL_PREFIX=/usr -Wno-dev $NEON ../
make
}
check() {
cd "$srcdir/$pkgbase-$pkgver/build"
export PYTHON=python2
#make test
}
package_gnuradio() {
optdepends=('boost: gr_modtool'
'swig: gr_modtool'
'cmake: gr_modtool'
'pkgconfig: libuhd')
conflicts=('gnuradio-git')
cd "$srcdir"
install -Dm644 21-fcd.rules "$pkgdir/usr/lib/udev/rules.d/21-fcd.rules"
cd "$srcdir/$pkgbase-$pkgver/grc/freedesktop"
install -Dm644 gnuradio-grc.desktop "$pkgdir/usr/share/applications/$pkgbase.desktop"
cd "$srcdir/$pkgbase-$pkgver/build"
make DESTDIR="$pkgdir" install
msg "Replacing filenames to use python2."
sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
$(find "$pkgdir" -name '*.py') \
$(find "$pkgdir" -name 'gnuradio-companion' -o -name 'flow_graph.tmpl')
sed -i -e "s|#![ ]*/usr/bin/env /usr/bin/python$|#!/usr/bin/env python2|" \
$(find "$pkgdir" -name '*.py')
find "$pkgdir/" -name '*.pyc' -delete
find "$pkgdir/" -name '*.pyo' -delete
}
package_gnuradio-companion() {
pkgdesc="GUI frontend for gnuradio and SDR."
2015-03-15 16:56:21 +00:00
depends=('gnuradio' 'python2-cheetah' 'python2-lxml'
'pygtk' 'wxpython' 'python2-opengl' 'python2-pyqwt' 'qwtplot3d')
2015-04-17 00:03:39 +00:00
optdepends=('python2-numarray: filter design tool')
2015-03-06 06:38:58 +00:00
conflicts=()
install="gnuradio-companion.install"
# Yup, nothing in the package except dependencies,
2015-03-15 16:56:21 +00:00
# because more than five optdeps is too many for most people.
2015-03-06 06:38:58 +00:00
}
# options for armv6:
# -Dhave_mfpu_neon=0 \
# -DCMAKE_CXX_FLAGS:STRING="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \
# -DCMAKE_C_FLAGS:STRING="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \
# options for armv7:
# -DCMAKE_CXX_FLAGS:STRING="-march=armv7-a -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=hard"
# -DCMAKE_C_FLAGS:STRING="-march=armv7-a -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=hard"
# line 341 add /usr/lib/arm-linux-gnueabihf /usr/lib/arm-linux-gnueabi