Debian Codegraph @

archlinux/gnuradio.PKGBUILD

raw
1 # Maintainer: Victor Wollesen <[email protected]>
2 # Official Release PKGBUILD script based on SVN version (gnuradio-svn) by Szymon Jakubczak <[email protected]>
3
4 pkgname=gnuradio
5 pkgver=20121103
6 _pkgid=git
7 pkgrel=1
8 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"
9 arch=('i686' 'x86_64')
10 url="http://gnuradio.org"
11 license=('GPL')
12 depends=('fftw' 'wxpython' 'qwtplot3d' 'python2-numpy' 'python-lxml' 'boost' 'cppunit' 'swig' 'gsl' 'alsa-utils' 'sdl' 'pygtk' 'python-lxml')
13 makedepends=('git' 'cmake' 'pkgconfig')
14 optdepends=('python2-cheetah: REQUIRED for gnuradio-companion'
15 'portaudio: audio IO library providing simple audio call backs'
16 'guile: GNU library implementation of the Scheme language plus various convenient facilities'
17 'libusb: library for use by user level applications to access USB devices regardless of OS'
18 'python-opengl: openGL bindings for python (REQUIRED TO USE GRAPHICAL SINKS)'
19 'sdcc: firmware and all the parts needing USRP'
20 'doxygen: docs autogenerated documentation'
21 'qt: REQUIRED for QT-based GUI'
22 'qwt: REQUIRED for QT-based GUI'
23 'pyqt: REQUIRED for QT-based GUI'
24 'pyqwt: REQUIRED for QT-based GUI'
25 'qwt5: REQUIRED for QT-based GUI'
26 'python2-numarray: for pyqwt'
27 'python-numeric: for pyqwt'
28 'python2-pycuda: for NVIDIA module support.')
29 provides=('gnuradio')
30 #source=('')
31 #md5sums=('')
32 install=gnuradio.install
33
34 _gitroot=http://gnuradio.org/git/gnuradio.git
35 _gitname=gnuradio
36
37
38 build() {
39
40 cd ${srcdir}
41
42 if [ -d $_gitname ]; then
43 (cd $_gitname && git clean -x -d -f && git pull origin)
44 msg "Updated the local files."
45 else
46 git clone $_gitroot
47 msg "GIT checkout done or server timeout"
48 fi
49
50 cd $_gitname
51 #msg "Replacing filenames to use python2."
52 #sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" $(find $srcdir -name '*.py')
53 msg "Ensure that python is linked to python2!."
54 export PYTHON=python2
55 msg "Starting build."
56 ###CMAKE BUILD
57 msg "Checkout out MASTER branch."
58 git checkout master
59 #git checkout next
60 git pull
61 msg "Starting cmake build."
62 mkdir build
63 cd build
64 export PKG_CONFIG_PATH=/usr/lib64/pkgconfig
65
66 cmake -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
67 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so -DCMAKE_INSTALL_PREFIX=/usr \
68 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DCMAKE_BUILD_TYPE="Release" ../
69
70
71 msg "Starting make..."
72
73 # Parallel builds don't work - need to use -j1 :(
74 # make -j8 || return 1
75 make -j1 || return 1
76 make test || return 1
77 make DESTDIR=${pkgdir} install || return 1
78 msg "Check optional dependencies for optimal performance."
79 msg "Ensure your /usr/bin/python symlink points to /usr/bin/python2 - GnuRadio currently requires python2."
80
81 }
82