[arch-commits] Commit in gnuradio/trunk (3 files)

Kyle Keen kkeen at archlinux.org
Sun Dec 27 21:09:27 UTC 2015


    Date: Sunday, December 27, 2015 @ 22:09:27
  Author: kkeen
Revision: 154601

upgpkg: gnuradio 3.7.9-1

Modified:
  gnuradio/trunk/PKGBUILD
  gnuradio/trunk/gnuradio-companion.install
  gnuradio/trunk/gnuradio.install

----------------------------+
 PKGBUILD                   |   28 ++++++++++++++--------------
 gnuradio-companion.install |   11 ++++++-----
 gnuradio.install           |   37 -------------------------------------
 3 files changed, 20 insertions(+), 56 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-12-27 20:14:58 UTC (rev 154600)
+++ PKGBUILD	2015-12-27 21:09:27 UTC (rev 154601)
@@ -4,8 +4,8 @@
 # Contributor:	Jonatan Sastre <jsastreh [ at ] hotmail.com>
 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"
@@ -30,9 +30,19 @@
 #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"
@@ -64,21 +74,12 @@
               '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() {
@@ -86,7 +87,6 @@
   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.

Modified: gnuradio-companion.install
===================================================================
--- gnuradio-companion.install	2015-12-27 20:14:58 UTC (rev 154600)
+++ gnuradio-companion.install	2015-12-27 21:09:27 UTC (rev 154601)
@@ -1,15 +1,16 @@
 
-# null file because devtools breaks without it
+post_upgrade() {
 
-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
 }
 

Modified: gnuradio.install
===================================================================
--- gnuradio.install	2015-12-27 20:14:58 UTC (rev 154600)
+++ gnuradio.install	2015-12-27 21:09:27 UTC (rev 154601)
@@ -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



More information about the arch-commits mailing list