# Maintainer: Victor Wollesen # Official Release PKGBUILD script based on SVN version (gnuradio-svn) by Szymon Jakubczak pkgname=gnuradio pkgver=20121103 _pkgid=git pkgrel=1 pkgdesc="Free software development toolkit that provides the signal processing runtime and processing blocks to implement software radios using readily-available, low-cost external RF hardware and commodity processors" arch=('i686' 'x86_64') url="http://gnuradio.org" license=('GPL') depends=('fftw' 'wxpython' 'qwtplot3d' 'python2-numpy' 'python-lxml' 'boost' 'cppunit' 'swig' 'gsl' 'alsa-utils' 'sdl' 'pygtk' 'python-lxml') makedepends=('git' 'cmake' 'pkgconfig') optdepends=('python2-cheetah: REQUIRED for gnuradio-companion' 'portaudio: audio IO library providing simple audio call backs' 'guile: GNU library implementation of the Scheme language plus various convenient facilities' 'libusb: library for use by user level applications to access USB devices regardless of OS' 'python-opengl: openGL bindings for python (REQUIRED TO USE GRAPHICAL SINKS)' 'sdcc: firmware and all the parts needing USRP' 'doxygen: docs autogenerated documentation' 'qt: REQUIRED for QT-based GUI' 'qwt: REQUIRED for QT-based GUI' 'pyqt: REQUIRED for QT-based GUI' 'pyqwt: REQUIRED for QT-based GUI' 'qwt5: REQUIRED for QT-based GUI' 'python2-numarray: for pyqwt' 'python-numeric: for pyqwt' 'python2-pycuda: for NVIDIA module support.') provides=('gnuradio') #source=('') #md5sums=('') install=gnuradio.install _gitroot=http://gnuradio.org/git/gnuradio.git _gitname=gnuradio build() { cd ${srcdir} if [ -d $_gitname ]; then (cd $_gitname && git clean -x -d -f && git pull origin) msg "Updated the local files." else git clone $_gitroot msg "GIT checkout done or server timeout" fi cd $_gitname #msg "Replacing filenames to use python2." #sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" $(find $srcdir -name '*.py') msg "Ensure that python is linked to python2!." export PYTHON=python2 msg "Starting build." ###CMAKE BUILD msg "Checkout out MASTER branch." git checkout master #git checkout next git pull msg "Starting cmake build." mkdir build cd build export PKG_CONFIG_PATH=/usr/lib64/pkgconfig cmake -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \ -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DCMAKE_BUILD_TYPE="Release" ../ msg "Starting make..." # Parallel builds don't work - need to use -j1 :( # make -j8 || return 1 make -j1 || return 1 make test || return 1 make DESTDIR=${pkgdir} install || return 1 msg "Check optional dependencies for optimal performance." msg "Ensure your /usr/bin/python symlink points to /usr/bin/python2 - GnuRadio currently requires python2." }