pdftk.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ##
  2. ## pdftk.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: pdftk
  27. Summary: PDF Toolkit
  28. URL: http://www.accesspdf.com/pdftk/
  29. Vendor: Sid Steward
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Text
  34. License: GPL
  35. Version: 1.12
  36. Release: 20041207
  37. # list of sources
  38. Source0: http://www.pdfhacks.com/pdftk/pdftk-%{version}.tar.gz
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, gcc::with_java = yes
  43. PreReq: OpenPKG, openpkg >= 20040130
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. PDFTk is a toolkit for manipulating PDF files. It can merge PDF
  48. Documents, split PDF pages into a new document, decrypt input as
  49. necessary (password required), encrypt output as desired, fill
  50. PDF forms with FDF data and/or flatten forms, apply a background
  51. watermark, report on PDF metrics such as metadata, bookmarks, and
  52. page labelsm zpdate PDF metadata, attach files to PDF pages or the
  53. PDF document, unpack PDF attachments, burst a PDF document into
  54. single pages, uncompress and re-compress page streams, and repair
  55. corrupted PDF (where possible).
  56. %track
  57. prog pdftk = {
  58. version = %{version}
  59. url = http://www.accesspdf.com/pdftk/
  60. regex = Latest\s+Version:\s+(__VER__)
  61. }
  62. %prep
  63. %setup -q
  64. %build
  65. cd pdftk
  66. export CLASSPATH="`echo %{l_prefix}/share/gcc/libgcj*.jar`:."
  67. case "%{l_platform -t}" in
  68. *-freebsd4* )
  69. %{l_shtool} subst \
  70. -e 's;^\(CPPFLAGS=.*\)$;\1 -pthread %{l_cppflags gcc};' \
  71. Makefile.Generic
  72. ;;
  73. * )
  74. %{l_shtool} subst \
  75. -e 's;^\(CPPFLAGS=.*\)$;\1 %{l_cppflags gcc};' \
  76. -e 's;^\(CXXFLAGS=.*\)$;\1 -lpthread;' \
  77. Makefile.Generic
  78. ;;
  79. esac
  80. %{l_make} %{l_mflags} -f Makefile.Generic
  81. %install
  82. rm -rf $RPM_BUILD_ROOT
  83. %{l_shtool} mkdir -f -p -m 755 \
  84. $RPM_BUILD_ROOT%{l_prefix}/bin \
  85. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  86. %{l_shtool} install -c -s -m 755 \
  87. pdftk/pdftk $RPM_BUILD_ROOT%{l_prefix}/bin/
  88. %{l_shtool} install -c -m 644 \
  89. debian/pdftk.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  90. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  91. %files -f files
  92. %clean
  93. rm -rf $RPM_BUILD_ROOT