From 289bea8380898ab20a0f5def21e054d2713b309d Mon Sep 17 00:00:00 2001 From: Kevin Mihelich <kevin@archlinuxarm.org> Date: Sun, 27 Dec 2015 23:01:33 +0000 Subject: [PATCH] community/gnuradio to 3.7.9-1 --- community/gnuradio/PKGBUILD | 28 +++++++------- community/gnuradio/gnuradio-companion.install | 11 +++--- community/gnuradio/gnuradio.install | 37 ------------------- 3 files changed, 20 insertions(+), 56 deletions(-) diff --git a/community/gnuradio/PKGBUILD b/community/gnuradio/PKGBUILD index 2723ac020..f6f8dd736 100644 --- a/community/gnuradio/PKGBUILD +++ b/community/gnuradio/PKGBUILD @@ -8,8 +8,8 @@ pkgbase=gnuradio pkgname=(gnuradio gnuradio-companion) -pkgver=3.7.8.1 -pkgrel=3 +pkgver=3.7.9 +pkgrel=1 pkgdesc="General purpose DSP and SDR toolkit. With drivers for usrp and fcd." arch=('i686' 'x86_64') url="http://gnuradio.org" @@ -34,9 +34,19 @@ install=gnuradio.install #source=("http://s3-dist.gnuradio.org/gnuradio-$pkgver.tar.gz" source=("http://gnuradio.org/releases/$pkgbase/$pkgbase-$pkgver.tar.gz" "21-fcd.rules") -md5sums=('961d5ba5089f409f0c9e5e5b7f6ee0f2' +md5sums=('bf1a2abd0abc492c7f67cba1080ceb8c' '465e12c454c6a22ebec9849181af7bdc') +prepare() { + cd "$srcdir/$pkgbase-$pkgver" + msg "Replacing filenames to use python2." + sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + $(find ./ -name '*.py') \ + $(find ./ -name 'gnuradio-companion' -o -name 'flow_graph.tmpl') + sed -i -e "s|#![ ]*/usr/bin/env /usr/bin/python$|#!/usr/bin/env python2|" \ + $(find ./ -name '*.py') +} + build() { export PYTHON=python2 cd "$srcdir/$pkgbase-$pkgver" @@ -71,21 +81,12 @@ package_gnuradio() { '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" + install -Dm644 gnuradio-grc.desktop "$pkgdir/usr/share/applications/gnuradio-grc.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() { @@ -93,7 +94,6 @@ package_gnuradio-companion() { depends=('gnuradio' 'python2-cheetah' 'python2-lxml' 'pygtk' 'wxpython' 'python2-opengl' 'python2-pyqwt' 'qwtplot3d') optdepends=('python2-numarray: filter design tool') - conflicts=() install="gnuradio-companion.install" # Yup, nothing in the package except dependencies, # because more than five optdeps is too many for most people. diff --git a/community/gnuradio/gnuradio-companion.install b/community/gnuradio/gnuradio-companion.install index e42c50b4c..7d9877e5c 100644 --- a/community/gnuradio/gnuradio-companion.install +++ b/community/gnuradio/gnuradio-companion.install @@ -1,15 +1,16 @@ -# null file because devtools breaks without it - post_upgrade() { - true + + if [[ -e /usr/bin/update-desktop-database ]]; then + update-desktop-database -q + fi } post_install() { - true + post_upgrade $1 } pre_remove() { - true + post_upgrade $1 } diff --git a/community/gnuradio/gnuradio.install b/community/gnuradio/gnuradio.install index 1761a296e..7d9877e5c 100644 --- a/community/gnuradio/gnuradio.install +++ b/community/gnuradio/gnuradio.install @@ -1,42 +1,5 @@ -# clean up for anyone silly enough to run this as root - -# it would be great if pkgname and not just pkgver was passed in the arg list - -_pkg='gnuradio' -_cpython='cpython-35' - post_upgrade() { - while read _f; do - if [[ "${_f:(-3)}" != ".py" ]]; then - continue - fi - if [[ ! -f "$_f" ]]; then - continue - fi - if [[ -e "${_f}c" ]]; then - rm -f "${_f}c" - fi - if [[ -e "${_f}o" ]]; then - rm -f "${_f}o" - fi - continue - _thisdir="$(dirname "$_f")/__pycache__" - if [[ ! -d "$_thisdir" ]]; then - continue - fi - _thisfile="$(basename "$_f")" - _thisfile="${_thisfile/%.py/.${_cpython}.py}" - if [[ -e "${_thisdir}/${_thisfile}c" ]]; then - rm -f "${_thisdir}/${_thisfile}c" - fi - if [[ -e "${_thisdir}/${_thisfile}o" ]]; then - rm -f "${_thisdir}/${_thisfile}o" - fi - # no good way to test for empty dir - # would be 25% faster if there were - rmdir --ignore-fail-on-non-empty "$_thisdir" &> /dev/null - done <<< "$(pacman -Qql $_pkg | grep '\.py$')" if [[ -e /usr/bin/update-desktop-database ]]; then update-desktop-database -q