pdflib.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 5.0.3
  27. %define V_comp 503
  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: 20040212
  40. # list of sources
  41. Source0: http://www.pdflib.com/products/pdflib/download/%{V_comp}src/PDFlib-Lite-%{V_long}-Unix-src.tar.gz
  42. Patch0: pdflib.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, make
  47. PreReq: OpenPKG, openpkg >= 20040130
  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__)-Unix-src\.tar\.gz
  59. }
  60. %prep
  61. %setup -q -n PDFlib-Lite-%{V_long}-Unix-src
  62. %patch -p0
  63. %build
  64. CC="%{l_cc}" \
  65. CFLAGS="%{l_cflags -O}" \
  66. INSTALL="%{l_shtool} install -c" \
  67. ./configure \
  68. --prefix=%{l_prefix} \
  69. --disable-shared
  70. %{l_make} %{l_mflags}
  71. %install
  72. rm -rf $RPM_BUILD_ROOT
  73. %{l_shtool} mkdir -f -p -m 755 \
  74. $RPM_BUILD_ROOT%{l_prefix}/bin \
  75. $RPM_BUILD_ROOT%{l_prefix}/lib \
  76. $RPM_BUILD_ROOT%{l_prefix}/include \
  77. $RPM_BUILD_ROOT%{l_prefix}/share/pdflib
  78. %{l_shtool} subst \
  79. -e 's;\($(LIBTOOL)\) \($(INSTALL_DATA)\);\1 --mode=install \2;' \
  80. libs/pdflib/Makefile
  81. %{l_make} %{l_mflags} install \
  82. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  83. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  84. INSTALL="%{l_shtool} install -c"
  85. %{l_shtool} subst \
  86. -e 's;installed=no;installed=yes;' \
  87. -e 's;libdir=.*;libdir="%{l_prefix}/lib";' \
  88. $RPM_BUILD_ROOT%{l_prefix}/lib/libpdf.la
  89. %{l_shtool} install -c -s -m 755 \
  90. progs/pdflib/pdfimage \
  91. progs/pdflib/pdfimpose \
  92. progs/pdflib/text2pdf \
  93. $RPM_BUILD_ROOT%{l_prefix}/bin/
  94. %{l_shtool} install -c -m 644 \
  95. doc/pdflib/PDFlib-manual.pdf \
  96. $RPM_BUILD_ROOT%{l_prefix}/share/pdflib/
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  98. %files -f files
  99. %clean
  100. rm -rf $RPM_BUILD_ROOT