php-ext-clearsilver-vl.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. %bcond_without php5
  2. %bcond_with php70
  3. %define modname clearsilver
  4. Summary: ClearSilver extension for PHP
  5. Summary(ja): PHP用ClearSilverモジュール
  6. Name: php-ext-%{modname}
  7. Version: 0.4
  8. Release: 8%{_dist_release}
  9. URL: http://www.geodata.soton.ac.uk/software/php_clearsilver/
  10. Source: php-%{modname}-%{version}.tar.gz
  11. Patch0: php-clearsilver-0.4-php5.5.0.patch
  12. Patch1: php-clearsilver-0.4-cgifunctions.patch
  13. Patch2: php-clearsilver-0.4-php7.0.0.patch
  14. License: The PHP License
  15. Group: Development/Languages
  16. BuildRequires: clearsilver, zlib-devel
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  18. %if %{with php5}
  19. BuildRequires: php5-devel
  20. %endif
  21. %if %{with php70}
  22. BuildRequires: php70-devel
  23. %endif
  24. Vendor: Project Vine
  25. Distribution: Vine Linux
  26. Packager: tomop
  27. %description
  28. This module adds ClearSilver functions to PHP.
  29. %description -l ja
  30. このモジュールはPHPにClearSilverテンプレート機能を追加します。
  31. %if %{with php5}
  32. %package -n php5-ext-%{modname}
  33. Summary: ClearSilver extension for PHP-5.6.x
  34. Summary(ja): PHP-5.6.x用ClearSilverモジュール
  35. Group: Development/Languages
  36. %if "%{?req_php5_api}" != ""
  37. Requires: %{req_php5_api}
  38. %endif
  39. Obsoletes: php-ext-clearsilver < 0.4-7
  40. %description -n php5-ext-%{modname}
  41. This module adds ClearSilver functions to PHP.
  42. %description -n php5-ext-%{modname} -l ja
  43. このモジュールはPHPにClearSilverテンプレート機能を追加します。
  44. %endif
  45. %if %{with php70}
  46. %package -n php70-ext-%{modname}
  47. Summary: ClearSilver extension for PHP-7.0.x
  48. Summary(ja): PHP-7.0.x用ClearSilverモジュール
  49. Group: Development/Languages
  50. %if "%{?req_php70_api}" != ""
  51. Requires: %{req_php70_api}
  52. %endif
  53. %description -n php70-ext-%{modname}
  54. This module adds ClearSilver functions to PHP.
  55. %description -n php70-ext-%{modname} -l ja
  56. このモジュールはPHPにClearSilverテンプレート機能を追加します。
  57. %endif
  58. %prep
  59. %setup -q -c -n php-%{modname}-%{version}
  60. cp -a php-%{modname}-%{version}/{CREDITS,INSTALL,LICENSE,README,doc} ./
  61. %if %{with php5}
  62. cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php5
  63. pushd php-clearsilver-%{version}-php5
  64. %patch0 -p1 -b .php55
  65. %patch1 -p1 -b .cgifunctions
  66. popd
  67. %endif
  68. %if %{with php70}
  69. cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php70
  70. pushd php-clearsilver-%{version}-php70
  71. %patch0 -p1 -b .php55
  72. %patch1 -p1 -b .cgifunctions
  73. %patch2 -p1 -b .php70
  74. popd
  75. %endif
  76. %build
  77. %if %{with php5}
  78. pushd php-clearsilver-%{version}-php5
  79. aclocal
  80. autoconf
  81. phpize5
  82. libtoolize --copy --force
  83. %configure --with-php-config=/usr/bin/php-config5
  84. %__make %{_smp_mflags}
  85. popd
  86. %endif
  87. %if %{with php70}
  88. pushd php-clearsilver-%{version}-php70
  89. aclocal
  90. autoconf
  91. phpize70
  92. libtoolize --copy --force
  93. %configure --with-php-config=/usr/bin/php-config70
  94. %__make %{_smp_mflags}
  95. popd
  96. %endif
  97. %install
  98. rm -rf %{buildroot}
  99. %if %{with php5}
  100. pushd php-clearsilver-%{version}-php5
  101. mkdir -p %{buildroot}%{_libdir}/php5/
  102. mkdir -p %{buildroot}%{_sysconfdir}/php5/php.d
  103. install -m644 modules/%{modname}.so %{buildroot}%{_libdir}/php5/
  104. cat > %{buildroot}%{_sysconfdir}/php5/php.d/%{modname}.ini <<EOF
  105. ; Enable %{modname} extension module
  106. extension=%{modname}.so
  107. EOF
  108. popd
  109. %endif
  110. %if %{with php70}
  111. pushd php-clearsilver-%{version}-php70
  112. mkdir -p %{buildroot}%{_libdir}/php70/
  113. mkdir -p %{buildroot}%{_sysconfdir}/php70/php.d
  114. install -m644 modules/%{modname}.so %{buildroot}%{_libdir}/php70/
  115. cat > %{buildroot}%{_sysconfdir}/php70/php.d/%{modname}.ini <<EOF
  116. ; Enable %{modname} extension module
  117. extension=%{modname}.so
  118. EOF
  119. popd
  120. %endif
  121. %clean
  122. rm -rf %{buildroot}
  123. %if %{with php5}
  124. %files -n php5-ext-%{modname}
  125. %defattr(-,root,root)
  126. %doc CREDITS INSTALL LICENSE README doc
  127. %{_libdir}/php5/*
  128. %{_sysconfdir}/php5/php.d/*
  129. %endif
  130. %if %{with php70}
  131. %files -n php70-ext-%{modname}
  132. %defattr(-,root,root)
  133. %doc CREDITS INSTALL LICENSE README doc
  134. %{_libdir}/php70/*
  135. %{_sysconfdir}/php70/php.d/*
  136. %endif
  137. %changelog
  138. * Thu Nov 5 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-8
  139. - fixed summary.
  140. - fixed php70 stuff.
  141. * Thu Nov 5 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-7
  142. - added CGI functions.
  143. - added support for php70.
  144. * Fri Apr 10 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-6
  145. - rebuilt with php5-5.6.7.
  146. * Thu Jan 09 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-5
  147. - rebuilt with current environment.
  148. * Tue Jun 25 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-4
  149. - added a patch for PHP 5.5.0.
  150. * Sun Apr 29 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-3
  151. - converted encoding to UTF-8.
  152. * Sat Apr 28 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-2
  153. - added an API version macro to "Requires:".
  154. * Sat Dec 12 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-1
  155. - new upstream release.
  156. * Fri Jul 10 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.1-2
  157. - fixed for php-5.3.0.
  158. * Mon Apr 28 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.1-1
  159. - initial build.