Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 22nd, 2012  |  syntax: None  |  size: 0.98 KB  |  views: 34  |  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=python2-pdfrw-svn
  2. pkgver=latest
  3. pkgrel=1
  4. pkgdesc="Python library to read and write PDF files"
  5. arch=('any')
  6. url="http://pdfrw.googlecode.com/"
  7. license=('MIT')
  8. makedepends=('subversion')
  9.  
  10. _svntrunk="http://pdfrw.googlecode.com/svn/trunk/"
  11. _svnmod=pdfrw
  12.  
  13. build() {
  14.   cd "$srcdir"
  15.   msg "Connecting to SVN server...."
  16.  
  17.   if [[ -d "$_svnmod/.svn" ]]; then
  18.     (cd "$_svnmod" && svn up -r "$pkgver")
  19.   else
  20.     svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
  21.   fi
  22.  
  23.   msg "SVN checkout done or server timeout"
  24.   msg "Starting build..."
  25.  
  26. }
  27.  
  28. package() {
  29.   cd "$srcdir/"
  30.  
  31.   _ver=$(python2 -V 2>&1 | sed 's/.* //; s/\..$//')
  32.  
  33.   mkdir -p "$pkgdir"/usr/lib/python"${_ver}"/site-packages/
  34.   mkdir p "$pkgdir"/usr/share/licenses/"$pkgname"/
  35.  
  36.   cp -a pdfrw/pdfrw "$pkgdir"/usr/lib/python"${_ver}"/site-packages
  37.   cp -a pdfrw/{examples,tests} "$pkgdir"/usr/lib/python"${_ver}"/site-packages/pdfrw
  38.   cp -a pdfrw/LICENSE.txt "$pkgdir"/usr/share/licenses/"$pkgname"/
  39. }
clone this paste RAW Paste Data