SHARE
TWEET

WSPR PKGBUILD

a guest Jan 16th, 2015 205 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Mike WB2FKO <mph at sportscliche dot com>
  2. pkgname=wspr-svn
  3. pkgver=2460
  4. pkgrel=1
  5. pkgdesc="Weak Signal Propagation Reporter"
  6. arch=('x86_64')
  7. url="http://physics.princeton.edu/pulsar/K1JT/wspr.html"
  8. license=('GPL')
  9. depends=('python2' 'python-imaging' 'python2-numpy' 'libsamplerate' 'portaudio' 'fftw' 'gcc-fortran')
  10. makedepends=('subversion')
  11. source=($pkgname.png
  12.         $pkgname.desktop)
  13. md5sums=('dd21318d4aa3423f1fbefc53061cc40d'
  14.          '56e94de2f4fded54a6a199caf8ea65ab')
  15.  
  16. _svntrunk="svn://svn.code.sf.net/p/wsjt/wsjt/branches/wspr"
  17. _svnmod="wspr"
  18.  
  19. build() {
  20. # Set the build environment to python2
  21.  export PYTHON="/usr/bin/python2"
  22.  export F2PY="/usr/bin/python2 f2py.py"
  23.  unset LDFLAGS
  24.  cd "$srcdir"
  25.  
  26.  if [ -d $_svnmod/.svn ]; then
  27.     (cd $_svnmod && svn up -r $pkgver)
  28.   else
  29.     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  30.   fi
  31.  
  32.   msg "SVN checkout done or server timeout"
  33.   msg "Starting make..."
  34.  
  35.   rm -rf "$srcdir/$_svnmod-build"
  36.   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
  37.   cd "$srcdir/$_svnmod-build"
  38.  
  39. # Make problems can sometimes be fixed by replacing g95 with gfortran
  40.   ./configure --prefix=/usr --enable-gcc-fortran
  41.   make
  42. }
  43.  
  44. package() {
  45.   cd "$srcdir/$_svnmod-build"
  46.   rm -rf build/
  47.   python2 setup.py install --root=$pkgdir/
  48.   sed -i 's:python -O wspr.py:python2 -O /usr/bin/wspr.py:' wspr
  49.   install -Dm755 wspr $pkgdir/usr/bin/wspr
  50.  
  51. # Install a menu item with icon
  52.   cd $srcdir
  53.   mkdir -p $pkgdir/usr/share/pixmaps
  54.   mkdir -p $pkgdir/usr/share/applications
  55.   mkdir -p $pkgdir/usr/share/doc/$pkgname
  56.   install -Dm644 $pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
  57.   install -Dm644  $pkgname.png $pkgdir/usr/share/pixmaps/$pkgname.png
  58.   cp -ra $srcdir/$_svnmod-build/*.TXT $pkgdir/usr/share/doc/$pkgname/
  59. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top