pdflib-lite-vl.spec 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. %define binding_langs perl python
  2. Summary: Portable C library for dynamically generating PDF files
  3. Summary(ja): PDF ファイルを動的に生成できる取扱い易い C 言語ライブラリ
  4. Name: pdflib-lite
  5. Version: 7.0.5
  6. Release: 1%{?dist}
  7. License: Distributable
  8. Group: Development/Libraries
  9. URL: http://www.pdflib.com/
  10. Source: http://www.pdflib.com/binaries/PDFlib/704/PDFlib-Lite-%{version}.tar.gz
  11. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  12. Vendor: Project Vine
  13. Distribution: Vine Linux
  14. Conflicts: pdflib <= 4
  15. %description
  16. PDFlib is a development tool for PDF-enabling your software,
  17. or generating PDF on your server. PDFlib offers a simple-to-use API
  18. for programmatically creating PDF files from within your own server-
  19. or client-side software. PDFlib doesn't make use of third-party software
  20. for generating PDF, nor does it require any other tools.
  21. %package devel
  22. Summary: Development files for pdflib
  23. Group: Development/Libraries
  24. Requires: %{name} = %{version}-%{release}
  25. %description devel
  26. PDFlib is a development tool for PDF-enabling your software,
  27. or generating PDF on your server. PDFlib offers a simple-to-use API
  28. for programmatically creating PDF files from within your own server-
  29. or client-side software. PDFlib doesn't make use of third-party software
  30. for generating PDF, nor does it require any other tools.
  31. This package contains the files needed for compiling programs that will use
  32. the PDFlib library.
  33. %package python
  34. Summary: Python shared library for pdflib
  35. Group: System Environment/Libraries
  36. BuildRequires: python-devel
  37. Requires: %{name} = %{version}-%{release}
  38. Provides: python-pdflib = %{version}-%{release}
  39. %description python
  40. PDFlib is a development tool for PDF-enabling your software,
  41. or generating PDF on your server. PDFlib offers a simple-to-use API
  42. for programmatically creating PDF files from within your own server-
  43. or client-side software. PDFlib doesn't make use of third-party software
  44. for generating PDF, nor does it require any other tools.
  45. This package contains the library needed for python programs
  46. that will use the PDFlib library.
  47. %package perl
  48. Summary: Perl shared library for pdflib
  49. Group: System Environment/Libraries
  50. Requires: %{name} = %{version}-%{release}
  51. Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
  52. Provides: perl-pdflib = %{version}-%{release}
  53. %description perl
  54. PDFlib is a development tool for PDF-enabling your software,
  55. or generating PDF on your server. PDFlib offers a simple-to-use API
  56. for programmatically creating PDF files from within your own server-
  57. or client-side software. PDFlib doesn't make use of third-party software
  58. for generating PDF, nor does it require any other tools.
  59. This package contains the library needed for perl programs
  60. that will use the PDFlib library.
  61. %prep
  62. %setup -q -n PDFlib-Lite-%{version}
  63. sed -i -e "s|^PYTHONLIBDIR.*|PYTHONLIBDIR = %{python_sitearch}|" config/mkcommon.inc.in
  64. sed -i -e "s|^PERLLIBDIR.*|PERLLIBDIR = %{perl_vendorarch}|" config/mkcommon.inc.in
  65. %build
  66. # java, ruby and tcl disabled.
  67. # File a bug with RFE and patch if you need it (by fedora12).
  68. %configure \
  69. --enable-large_files \
  70. --enable-tiffwrite \
  71. --disable-static \
  72. --with-pyincl=%{_includedir}/python%{pyver} \
  73. --with-py=yes \
  74. --with-java=no \
  75. --with-ruby=no \
  76. --with-tcl=no \
  77. --with-openssl \
  78. %ifarch x86_64
  79. --enable-64bit \
  80. %endif
  81. ;
  82. %{__make} %{?_smp_mflags}
  83. for lang in %{binding_langs}; do
  84. %{__make} -C bind/pdflib/$lang
  85. done
  86. %install
  87. rm -rf %{buildroot}
  88. mkdir -p %{buildroot}%{python_sitearch}
  89. mkdir -p %{buildroot}%{perl_vendorarch}
  90. make install DESTDIR=%{buildroot}
  91. for lang in %{binding_langs} ; do
  92. make -C bind/pdflib/$lang install DESTDIR=%{buildroot}
  93. done
  94. install -p -m 0644 bind/pdflib/cpp/pdflib.hpp %{buildroot}%{_includedir}/pdflib.hpp
  95. chmod +x %{buildroot}%{_libdir}/libpdf*
  96. chmod +x %{buildroot}%{python_sitearch}/pdflib_py.so*
  97. chmod +x %{buildroot}%{perl_vendorarch}/pdflib_pl.so*
  98. rm -rf examples
  99. mkdir -p examples/{c,cpp,perl,php,python}
  100. cp -r bind/pdflib/data examples/data
  101. cp bind/pdflib/c/*.c bind/pdflib/c/Makefile bind/pdflib/c/readme.txt \
  102. examples/c
  103. cp bind/pdflib/cpp/*.cpp bind/pdflib/cpp/Makefile bind/pdflib/cpp/readme.txt \
  104. examples/cpp
  105. cp bind/pdflib/perl/*.pl bind/pdflib/perl/Makefile bind/pdflib/perl/readme.txt \
  106. examples/perl
  107. cp bind/pdflib/python/*.py bind/pdflib/python/Makefile bind/pdflib/python/readme.txt \
  108. examples/python
  109. cp bind/pdflib/php/*.php bind/pdflib/php/readme.txt \
  110. examples/php
  111. cp bind/pdflib/php/examples.php5/*.php \
  112. examples/php
  113. %post -p /sbin/ldconfig
  114. %postun -p /sbin/ldconfig
  115. %clean
  116. rm -rf %{buildroot}
  117. %files
  118. %defattr(-, root, root)
  119. %doc readme.txt
  120. %doc doc/pdflib/PDFlib-Lite-license.pdf
  121. %{_bindir}/pdfimage
  122. %{_bindir}/pdflib-config
  123. %{_bindir}/text2pdf
  124. %{_libdir}/libpdf.so.*
  125. %files devel
  126. %defattr(-, root, root)
  127. %doc doc/pdflib/PDFlib-Lite-license.pdf
  128. %doc doc/pdflib/changes.txt doc/pdflib/compatibility.txt
  129. %doc doc/pdflib/PDFlib-API-reference.pdf
  130. %doc doc/pdflib/PDFlib-tutorial.pdf
  131. %doc doc/pdflib/readme-source-unix.txt
  132. %doc examples
  133. %{_bindir}/pdflib-config
  134. %{_includedir}/pdflib.h
  135. %{_includedir}/pdflib.hpp
  136. %{_libdir}/libpdf.so
  137. %exclude %{_libdir}/*.la
  138. %files python
  139. %defattr(-, root, root)
  140. %doc doc/pdflib/PDFlib-Lite-license.pdf
  141. %{python_sitearch}/pdflib_py.so*
  142. %exclude %{python_sitearch}/*.la
  143. %files perl
  144. %defattr(-, root, root)
  145. %doc doc/pdflib/PDFlib-Lite-license.pdf
  146. %{perl_vendorarch}/pdflib_pl.*
  147. %changelog
  148. * Mon Dec 20 2010 Shu KONNO <owa@bg.wakwak.com> 7.0.5-1
  149. - initial build for VineSeed