Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

python-newt PKGBUILD

By: keith_h on May 16th, 2013  |  syntax: Bash  |  size: 0.88 KB  |  views: 59  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. pkgname=python-newt
  2. pkgver=0.52.15
  3. _pyver=3.3
  4. pkgrel=1
  5. pkgdesc="Not Erik's Windowing Toolkit - Python 3 bindings"
  6. arch=('x86_64' 'i686')
  7. url='https://fedorahosted.org/newt/'
  8. license=('GPL')
  9. depends=('python' 'libnewt')
  10. source=("https://fedorahosted.org/releases/n/e/newt/newt-$pkgver.tar.gz")
  11. md5sums=('343ee3a0fd0eacdb7c508a1e1cfabf65')
  12.  
  13. prepare() {
  14.   cd "$srcdir/newt-$pkgver"
  15.   echo '#define USE_INTERP_RESULT 1' >> config.h
  16.   sed -i "s:python2:python3:" configure
  17.  
  18.   2to3 -w snack.py
  19. }
  20.  
  21. build() {
  22.   cd "$srcdir/newt-$pkgver"
  23.  
  24.   ./configure --prefix=/usr --with-gpm-support
  25.   make _snackmodule.so
  26. }
  27.  
  28. package() {
  29.   cd "$srcdir/newt-$pkgver"
  30.   python_lib="/usr/lib/python${_pyver}/site-packages"
  31.   install -D -m 755 _snackmodule.so "${pkgdir}${python_lib}/_snackmodule.so"
  32.   install -D -m 644 snack.py "${pkgdir}${python_lib}/snack.py"
  33. }
  34.  
  35. # vim:set ts=2 sw=2 et: