pdflib.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. ##
  2. ## pdflib.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 version
  26. %define V_long 6.0.1
  27. %define V_comp 601
  28. # package information
  29. Name: pdflib
  30. Summary: Library for Generating PDF Documents
  31. URL: http://www.pdflib.com/
  32. Vendor: PDFlib GmbH
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG
  35. Class: BASE
  36. Group: Graphics
  37. License: PDFlib
  38. Version: %{V_long}
  39. Release: 20041222
  40. # list of sources
  41. Source0: http://www.pdflib.com/products/pdflib/download/%{V_comp}src/PDFlib-Lite-%{V_long}.tar.gz
  42. Patch0: pdflib.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, png, zlib, jpeg, make
  47. PreReq: OpenPKG, openpkg >= 20040130, png, zlib, jpeg
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. PDFlib is the premier software component if you want to generate PDF
  52. on your server, convert text and graphics, or implement PDF output
  53. in your own products.
  54. %track
  55. prog pdflib = {
  56. version = %{version}
  57. url = http://www.pdflib.com/products/pdflib/download-source.html
  58. regex = PDFlib-Lite-(__VER__)\.tar\.gz
  59. }
  60. %prep
  61. %setup -q -n PDFlib-Lite-%{V_long}
  62. rm -rf libs/png
  63. rm -rf libs/jpeg
  64. rm -rf libs/flate
  65. %patch -p0
  66. %build
  67. CC="%{l_cc}" \
  68. CFLAGS="%{l_cflags -O}" \
  69. INSTALL="%{l_shtool} install -c" \
  70. PNGLIBINC="%{l_cppflags libpng .}" \
  71. PNGLIBLINK="-lpng" \
  72. JPEGLIBINC="%{l_cppflags}" \
  73. JPEGLIBLINK="-ljpeg" \
  74. FLATELIBINC="%{l_cppflags}" \
  75. FLATELIBLINK="-lz" \
  76. ./configure \
  77. --prefix=%{l_prefix} \
  78. --disable-shared
  79. %{l_make} %{l_mflags}
  80. %install
  81. rm -rf $RPM_BUILD_ROOT
  82. %{l_shtool} mkdir -f -p -m 755 \
  83. $RPM_BUILD_ROOT%{l_prefix}/bin \
  84. $RPM_BUILD_ROOT%{l_prefix}/lib \
  85. $RPM_BUILD_ROOT%{l_prefix}/include \
  86. $RPM_BUILD_ROOT%{l_prefix}/share/pdflib
  87. %{l_shtool} subst \
  88. -e 's;\($(LIBTOOL)\) \($(INSTALL_DATA)\);\1 --mode=install \2;' \
  89. libs/pdflib/Makefile
  90. %{l_make} %{l_mflags} install \
  91. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  92. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  93. INSTALL="%{l_shtool} install -c"
  94. %{l_shtool} subst \
  95. -e 's;installed=no;installed=yes;' \
  96. -e 's;libdir=.*;libdir="%{l_prefix}/lib";' \
  97. $RPM_BUILD_ROOT%{l_prefix}/lib/libpdf.la
  98. %{l_shtool} install -c -s -m 755 \
  99. progs/pdflib/pdfimage \
  100. progs/pdflib/pdfimpose \
  101. progs/pdflib/text2pdf \
  102. $RPM_BUILD_ROOT%{l_prefix}/bin/
  103. %{l_shtool} install -c -m 644 \
  104. doc/pdflib/PDFlib-manual.pdf \
  105. $RPM_BUILD_ROOT%{l_prefix}/share/pdflib/
  106. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  107. %files -f files
  108. %clean
  109. rm -rf $RPM_BUILD_ROOT