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

pdftk-bin PKGBUILD

By: jjmaestro on Oct 9th, 2012  |  syntax: Diff  |  size: 1.47 KB  |  views: 98  |  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. --- pdftk-bin.PKGBUILD.orig     2012-10-09 16:39:36.020947630 +0200
  2. +++ pdftk-bin.PKGBUILD  2012-10-09 16:47:29.458382800 +0200
  3. @@ -1,5 +1,6 @@
  4.  # Maintainer: Dan Serban
  5.  # Contributor: Liu Chang <goduck777@gmail.com>
  6. +# Contributor: J. Javier Maestro <jjmaestro@ieee.org>
  7.  
  8.  pkgname=pdftk-bin
  9.  pkgver=1.44
  10. @@ -8,7 +9,6 @@
  11.  url=http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
  12.  arch=(i686 x86_64)
  13.  license=(GPL)
  14. -makedepends=(lynx)
  15.  provides=(pdftk)
  16.  conflicts=(pdftk pdfchain-all-inclusive)
  17.  _filearch=i386
  18. @@ -20,16 +20,16 @@
  19.  
  20.    # --- pdftk ---
  21.    rm pdftk_*.deb 2>/dev/null || true
  22. -  _url=$(lynx -dump ${_url_prefix}/p/pdftk/ | grep -o http.*/pdftk_.*_${_filearch}\.deb | tail -1)
  23. -  wget ${_url}
  24. +  _url="${_url_prefix}/p/pdftk/$(curl -s -o - ${_url_prefix}/p/pdftk/ | sed 's|>|>\n|g' | grep href | grep pdftk_.*_${_filearch}\.deb | tail -1 | cut -d'"' -f4)"
  25. +  curl -s -O ${_url}
  26.    bsdtar -xf $(basename ${_url}) data.tar.gz
  27.    bsdtar -xf data.tar.gz -C "${pkgdir}"
  28.    rm data.tar.gz
  29.  
  30.    # --- libgcj12 ---
  31.    rm libgcj12_*.deb 2>/dev/null || true
  32. -  _url=$(lynx -dump ${_url_prefix}/g/gcj-4.6/ | grep -o http.*/libgcj12_.*_${_filearch}\.deb | tail -1)
  33. -  wget ${_url}
  34. +  _url="${_url_prefix}/g/gcj-4.6/$(curl -s -o - ${_url_prefix}/g/gcj-4.6/ | sed 's|>|>\n|g' | grep href | grep libgcj12_.*_${_filearch}\.deb | tail -1 | cut -d'"' -f4)"
  35. +  curl -s -O ${_url}
  36.    bsdtar -xf $(basename ${_url}) data.tar.gz
  37.    bsdtar -xf data.tar.gz || true
  38.    rm data.tar.gz
clone this paste RAW Paste Data