pdflib-lite-vl.spec 5.8 KB

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