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

kachelaqa

By: a guest on Nov 5th, 2010  |  syntax: Bash  |  size: 1.18 KB  |  views: 80  |  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=pyalpmm-svn
  2. pkgver=103
  3. pkgrel=1
  4. pkgdesc="The Python ALPM high-level API"
  5. arch=('i686' 'x86_64')
  6. license=('GPL')
  7. url="http://www.infolexikon.de/code/pyalpmm"
  8. depends=('python2')
  9. makedepends=('swig' 'subversion')
  10. conflicts=('pyalpmm')
  11. provides=('pyalpmm')
  12. source=()
  13. md5sums=()
  14.  
  15. _svntrunk=svn://infolexikon.de/pyalpmm/trunk
  16. _svnmod=pyalpmm
  17.  
  18. build() {
  19.   cd ${srcdir}
  20.   msg "Connecting to SVN server...."
  21.   if [ -d $_svnmod/.svn ]; then
  22.     (cd $_svnmod && svn up -r $pkgver)
  23.   else
  24.     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  25.   fi
  26.  
  27.   msg "SVN checkout done or server timeout"
  28.   msg "Starting make..."
  29.   svn export $_svnmod $_svnmod-build
  30.   cd $_svnmod-build
  31.  
  32.   sed -i -e "s|^#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
  33.          -e "s|^#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
  34.     $(find . -type f)
  35.    
  36.   sed -i -e 's|python setup.py|python2 setup.py|g' \
  37.          -e 's|linux-\$(ARCH)-2.6|linux-$(ARCH)-2.7|g' \
  38.     ./Makefile
  39.  
  40.   make || return 1
  41.   make install DESTDIR=${pkgdir} || return 1
  42.   install -Dm755 mmacman ${pkgdir}/usr/bin/mmacman || return 1
  43.   install -Dm644 pyalpmm.conf ${pkgdir}/etc/pyalpmm.conf || return 1
  44. }
clone this paste RAW Paste Data