[buildout]
parts = pdftk

[pdftk-patch-download]
recipe = hexagonit.recipe.download
url = http://www.nexedi.org/static/patches/${:filename}
download-only = true

[pdftk-Makefiles.patch]
<= pdftk-patch-download
md5sum = 1e8cf2219af76f36991ad0dac664405d
filename = pdftk-Makefiles.patch

[pdftk-remove-postscript.patch]
<= pdftk-patch-download
md5sum = 3ee4916c7456b4b35a4c52c68e5804db
filename = pdftk-remove-postscript.patch

[pdftk-no_gnu_local.patch]
<= pdftk-patch-download
md5sum = a650d8462cb9ac94b5705c15da0ad516
filename = pdftk-no_gnu_local.patch

[pdftk-bug-427046_pdftk.cc.patch]
<= pdftk-patch-download
md5sum = 3b62f2597f293bc02d542bf14466be22
filename = pdftk-bug-427046_pdftk.cc.patch

[pdftk-hooks-download]
recipe = hexagonit.recipe.download
url = http://www.nexedi.org/static/buildout-hooks/pdftk-hooks.py-r38757
filename = pdftk-hooks.py
md5sum = b4b4a31ded6b59888e2a56d1b5726c99
download-only = true

[pdftk]
recipe = hexagonit.recipe.cmmi
url = http://www.pdfhacks.com/pdftk/pdftk-1.41.tar.gz
patches =
  ${pdftk-Makefiles.patch:location}/${pdftk-Makefiles.patch:filename}
  ${pdftk-remove-postscript.patch:location}/${pdftk-remove-postscript.patch:filename}
  ${pdftk-no_gnu_local.patch:location}/${pdftk-no_gnu_local.patch:filename}
#  ${pdftk-bug-427046_pdftk.cc.patch:location}/${pdftk-bug-427046_pdftk.cc.patch:filename}

configure-command = true
make-options =
  -f Makefile.RedHat
  VERSUFF=-4.3

pre-make-hook = ${pdftk-hooks-download:location}/${pdftk-hooks-download:filename}:pre_make_hook