summaryrefslogtreecommitdiff
path: root/community/gnuradio/PKGBUILD
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-10-27 01:06:08 -0700
committerroot <root@rshg054.dnsready.net>2013-10-27 01:06:08 -0700
commit2886140ddb1db32f36cb0b27e93888442a603a53 (patch)
tree2a85cef112f53e98d1b959951dc7004b9bc89dc9 /community/gnuradio/PKGBUILD
parent24152c3ea77087edccf017c13d44904a75799ff7 (diff)
Sun Oct 27 01:05:45 PDT 2013
Diffstat (limited to 'community/gnuradio/PKGBUILD')
-rw-r--r--community/gnuradio/PKGBUILD78
1 files changed, 78 insertions, 0 deletions
diff --git a/community/gnuradio/PKGBUILD b/community/gnuradio/PKGBUILD
new file mode 100644
index 000000000..724854bfe
--- /dev/null
+++ b/community/gnuradio/PKGBUILD
@@ -0,0 +1,78 @@
+# $Id: PKGBUILD 99273 2013-10-26 16:24:39Z kkeen $
+# Maintainer: Kyle Keen <keenerd@gmail.com>
+# Contributor: Dominik Heidler <dheidler@gmail.com>
+pkgname=gnuradio
+pkgver=3.7.1
+pkgrel=7
+pkgdesc="General purpose DSP and SDR toolkit. Supports usrp and fcd."
+arch=('i686' 'x86_64')
+url="http://gnuradio.org"
+license=('GPL')
+depends=('fftw' 'python2-numpy' 'cppunit' 'swig' 'gsl' 'blas' 'guile' 'boost-libs>=1.53' 'libusbx' 'portaudio' 'libuhd')
+makedepends=('boost' 'cmake' 'python2-lxml' 'pygtk' 'wxpython' 'python2-cheetah')
+optdepends=('python2-cheetah: gnuradio-companion'
+ 'python2-lxml: gnuradio-companion'
+ 'pyxml: gnuradio-companion'
+ 'pygtk: gnuradio-companion'
+ 'wxpython: gr-wxgui'
+ 'qwtplot3d: gr-qtgui'
+ 'pyqwt: gr-qtgui'
+ 'doxygen: autogenerated documentation'
+ 'pkgconfig: ?')
+conflicts=('gnuradio-git')
+
+# todo
+# add gr-osmosdr-git to optdepends
+# split the gui components?
+# build doxygen docs?
+
+source=("http://gnuradio.org/releases/$pkgname/$pkgname-$pkgver.tar.gz"
+ "21-fcd.rules")
+md5sums=('6c5e67da6ed8724dd900d8e343b64be4'
+ '465e12c454c6a22ebec9849181af7bdc')
+
+build() {
+ export PYTHON=python2
+ cd "$srcdir/$pkgname-$pkgver"
+ msg "Starting build."
+ mkdir -p build
+ cd build
+ cmake \
+ -DPYTHON_EXECUTABLE=$(which python2) \
+ -DPYTHON_INCLUDE_DIR=$(echo /usr/include/python2*) \
+ -DPYTHON_LIBRARY=$(echo /usr/lib/libpython2.*.so) \
+ -DENABLE_GRC=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr ../
+ make
+}
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver/build"
+ export PYTHON=python2
+ #make test
+}
+
+package() {
+ cd "$srcdir"
+ install -D -m644 21-fcd.rules "$pkgdir/usr/lib/udev/rules.d/21-fcd.rules"
+ cd "$pkgname-$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')
+ find "$pkgdir/" -name '*.pyc' -delete
+ find "$pkgdir/" -name '*.pyo' -delete
+}
+
+# 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
+
+