php-ext-clearsilver-vl.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. %bcond_with php5
  2. %bcond_with php74
  3. %bcond_with php81
  4. %bcond_without php82
  5. %bcond_without php83
  6. %define modname clearsilver
  7. Summary: ClearSilver extension for PHP
  8. Summary(ja): PHP用ClearSilverモジュール
  9. Name: php-ext-%{modname}
  10. Version: 0.4
  11. Release: 19%{_dist_release}
  12. Group: programming
  13. Vendor: Project Vine
  14. Distribution: Vine Linux
  15. Packager: tomop
  16. License: The PHP License
  17. URL: http://www.geodata.soton.ac.uk/software/php_clearsilver/
  18. Source: php-%{modname}-%{version}.tar.gz
  19. Patch0: php-clearsilver-0.4-php5.6.0.patch
  20. Patch2: php-clearsilver-0.4-php7.2.0.patch
  21. Patch3: php-clearsilver-0.4-php8.0.0.patch
  22. BuildRequires: clearsilver, zlib-devel
  23. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  24. %description
  25. This module adds ClearSilver functions to PHP.
  26. %description -l ja
  27. このモジュールはPHPにClearSilverテンプレート機能を追加します。
  28. %if %{with php5}
  29. %package -n php5-ext-%{modname}
  30. Summary: ClearSilver extension for PHP-5.6.x
  31. Summary(ja): PHP-5.6用ClearSilverモジュール
  32. Group: programming
  33. BuildRequires: php5-devel
  34. %if "%{?req_php5_api}" != ""
  35. Requires: %{req_php5_api}
  36. %endif
  37. Obsoletes: php-ext-clearsilver < 0.4-7
  38. %description -n php5-ext-%{modname}
  39. This module adds ClearSilver functions to PHP.
  40. %description -n php5-ext-%{modname} -l ja
  41. このモジュールはPHPにClearSilverテンプレート機能を追加します。
  42. %endif
  43. %if %{with php74}
  44. %package -n php74-ext-%{modname}
  45. Summary: ClearSilver extension for PHP-7.4
  46. Summary(ja): PHP-7.4用ClearSilverモジュール
  47. Group: programming
  48. BuildRequires: php74-devel
  49. %if "%{?req_php74_api}" != ""
  50. Requires: %{req_php74_api}
  51. %endif
  52. %description -n php74-ext-%{modname}
  53. This module adds ClearSilver functions to PHP.
  54. %description -n php74-ext-%{modname} -l ja
  55. このモジュールはPHPにClearSilverテンプレート機能を追加します。
  56. %endif
  57. %if %{with php83}
  58. %package -n php83-ext-%{modname}
  59. Summary: ClearSilver extension for PHP-8.3
  60. Summary(ja): PHP-8.3用ClearSilverモジュール
  61. Group: programming
  62. BuildRequires: php83-devel
  63. %if "%{?req_php83_api}" != ""
  64. Requires: %{req_php83_api}
  65. %endif
  66. %description -n php83-ext-%{modname}
  67. This module adds ClearSilver functions to PHP.
  68. %description -n php83-ext-%{modname} -l ja
  69. このモジュールはPHPにClearSilverテンプレート機能を追加します。
  70. %endif
  71. %if %{with php82}
  72. %package -n php82-ext-%{modname}
  73. Summary: ClearSilver extension for PHP-8.2
  74. Summary(ja): PHP-8.2用ClearSilverモジュール
  75. Group: programming
  76. BuildRequires: php82-devel
  77. %if "%{?req_php82_api}" != ""
  78. Requires: %{req_php82_api}
  79. %endif
  80. %description -n php82-ext-%{modname}
  81. This module adds ClearSilver functions to PHP.
  82. %description -n php82-ext-%{modname} -l ja
  83. このモジュールはPHPにClearSilverテンプレート機能を追加します。
  84. %endif
  85. %if %{with php81}
  86. %package -n php81-ext-%{modname}
  87. Summary: ClearSilver extension for PHP-8.1
  88. Summary(ja): PHP-8.1用ClearSilverモジュール
  89. Group: programming
  90. BuildRequires: php81-devel
  91. %if "%{?req_php81_api}" != ""
  92. Requires: %{req_php81_api}
  93. %endif
  94. %description -n php81-ext-%{modname}
  95. This module adds ClearSilver functions to PHP.
  96. %description -n php81-ext-%{modname} -l ja
  97. このモジュールはPHPにClearSilverテンプレート機能を追加します。
  98. %endif
  99. %debug_package
  100. %prep
  101. %setup -q -c -n php-%{modname}-%{version}
  102. cp -a php-%{modname}-%{version}/{CREDITS,INSTALL,LICENSE,README,doc} ./
  103. %if %{with php5}
  104. cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php5
  105. pushd php-clearsilver-%{version}-php5
  106. %patch0 -p1 -b .php56
  107. popd
  108. %endif
  109. %if %{with php74}
  110. cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php74
  111. pushd php-clearsilver-%{version}-php74
  112. %patch0 -p1 -b .php56
  113. %patch2 -p1 -b .php72
  114. popd
  115. %endif
  116. %if %{with php83}
  117. cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php83
  118. pushd php-clearsilver-%{version}-php83
  119. %patch3 -p1 -b .php80
  120. popd
  121. %endif
  122. %if %{with php82}
  123. cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php82
  124. pushd php-clearsilver-%{version}-php82
  125. %patch3 -p1 -b .php80
  126. popd
  127. %endif
  128. %if %{with php81}
  129. cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php81
  130. pushd php-clearsilver-%{version}-php81
  131. %patch3 -p1 -b .php80
  132. popd
  133. %endif
  134. %build
  135. export CFLAGS="%{optflags} -Wno-format-security"
  136. %if %{with php5}
  137. pushd php-clearsilver-%{version}-php5
  138. phpize5
  139. aclocal
  140. autoreconf -vif
  141. %configure --with-php-config=/usr/bin/php-config5
  142. %__make %{_smp_mflags}
  143. popd
  144. %endif
  145. %if %{with php74}
  146. pushd php-clearsilver-%{version}-php74
  147. phpize74
  148. aclocal
  149. %configure --with-php-config=/usr/bin/php-config74
  150. %__make %{_smp_mflags}
  151. popd
  152. %endif
  153. %if %{with php83}
  154. pushd php-clearsilver-%{version}-php83
  155. phpize83
  156. aclocal
  157. %configure --with-php-config=/usr/bin/php-config83
  158. %__make %{_smp_mflags}
  159. popd
  160. %endif
  161. %if %{with php82}
  162. pushd php-clearsilver-%{version}-php82
  163. phpize82
  164. aclocal
  165. %configure --with-php-config=/usr/bin/php-config82
  166. %__make %{_smp_mflags}
  167. popd
  168. %endif
  169. %if %{with php81}
  170. pushd php-clearsilver-%{version}-php81
  171. phpize81
  172. aclocal
  173. %configure --with-php-config=/usr/bin/php-config81
  174. %__make %{_smp_mflags}
  175. popd
  176. %endif
  177. %install
  178. rm -rf %{buildroot}
  179. %if %{with php5}
  180. pushd php-clearsilver-%{version}-php5
  181. mkdir -p %{buildroot}%{_libdir}/php5/
  182. mkdir -p %{buildroot}%{_sysconfdir}/php5/php.d
  183. install -m755 modules/%{modname}.so %{buildroot}%{_libdir}/php5/
  184. cat > %{buildroot}%{_sysconfdir}/php5/php.d/%{modname}.ini <<EOF
  185. ; Enable %{modname} extension module
  186. extension=%{modname}.so
  187. EOF
  188. popd
  189. %endif
  190. %if %{with php74}
  191. pushd php-clearsilver-%{version}-php74
  192. mkdir -p %{buildroot}%{_libdir}/php74/
  193. mkdir -p %{buildroot}%{_sysconfdir}/php74/php.d
  194. install -m755 modules/%{modname}.so %{buildroot}%{_libdir}/php74/
  195. cat > %{buildroot}%{_sysconfdir}/php74/php.d/%{modname}.ini <<EOF
  196. ; Enable %{modname} extension module
  197. extension=%{modname}.so
  198. EOF
  199. popd
  200. %endif
  201. %if %{with php83}
  202. pushd php-clearsilver-%{version}-php83
  203. mkdir -p %{buildroot}%{_libdir}/php83/
  204. mkdir -p %{buildroot}%{_sysconfdir}/php83/php.d
  205. install -m755 modules/%{modname}.so %{buildroot}%{_libdir}/php83/
  206. cat > %{buildroot}%{_sysconfdir}/php83/php.d/%{modname}.ini <<EOF
  207. ; Enable %{modname} extension module
  208. extension=%{modname}.so
  209. EOF
  210. popd
  211. %endif
  212. %if %{with php82}
  213. pushd php-clearsilver-%{version}-php82
  214. mkdir -p %{buildroot}%{_libdir}/php82/
  215. mkdir -p %{buildroot}%{_sysconfdir}/php82/php.d
  216. install -m755 modules/%{modname}.so %{buildroot}%{_libdir}/php82/
  217. cat > %{buildroot}%{_sysconfdir}/php82/php.d/%{modname}.ini <<EOF
  218. ; Enable %{modname} extension module
  219. extension=%{modname}.so
  220. EOF
  221. popd
  222. %endif
  223. %if %{with php81}
  224. pushd php-clearsilver-%{version}-php81
  225. mkdir -p %{buildroot}%{_libdir}/php81/
  226. mkdir -p %{buildroot}%{_sysconfdir}/php81/php.d
  227. install -m755 modules/%{modname}.so %{buildroot}%{_libdir}/php81/
  228. cat > %{buildroot}%{_sysconfdir}/php81/php.d/%{modname}.ini <<EOF
  229. ; Enable %{modname} extension module
  230. extension=%{modname}.so
  231. EOF
  232. popd
  233. %endif
  234. %check
  235. %if %{with php5}
  236. pushd php-clearsilver-%{version}-php5
  237. make test NO_INTERACTION=1
  238. popd
  239. %endif
  240. %if %{with php74}
  241. pushd php-clearsilver-%{version}-php74
  242. make test TEST_PHPDBG_EXECUTABLE=/usr/bin/phpdbg74 NO_INTERACTION=1
  243. popd
  244. %endif
  245. %if %{with php83}
  246. pushd php-clearsilver-%{version}-php83
  247. make test TEST_PHPDBG_EXECUTABLE=/usr/bin/phpdbg83 NO_INTERACTION=1
  248. popd
  249. %endif
  250. %if %{with php82}
  251. pushd php-clearsilver-%{version}-php82
  252. make test TEST_PHPDBG_EXECUTABLE=/usr/bin/phpdbg82 NO_INTERACTION=1
  253. popd
  254. %endif
  255. %if %{with php81}
  256. pushd php-clearsilver-%{version}-php81
  257. make test TEST_PHPDBG_EXECUTABLE=/usr/bin/phpdbg81 NO_INTERACTION=1
  258. popd
  259. %endif
  260. %clean
  261. rm -rf %{buildroot}
  262. %if %{with php5}
  263. %files -n php5-ext-%{modname}
  264. %defattr(-,root,root)
  265. %doc CREDITS INSTALL LICENSE README doc
  266. %{_libdir}/php5/*
  267. %{_sysconfdir}/php5/php.d/*
  268. %endif
  269. %if %{with php74}
  270. %files -n php74-ext-%{modname}
  271. %defattr(-,root,root)
  272. %doc CREDITS INSTALL LICENSE README doc
  273. %{_libdir}/php74/*
  274. %{_sysconfdir}/php74/php.d/*
  275. %endif
  276. %if %{with php83}
  277. %files -n php83-ext-%{modname}
  278. %defattr(-,root,root)
  279. %doc CREDITS INSTALL LICENSE README doc
  280. %{_libdir}/php83/*
  281. %{_sysconfdir}/php83/php.d/*
  282. %endif
  283. %if %{with php82}
  284. %files -n php82-ext-%{modname}
  285. %defattr(-,root,root)
  286. %doc CREDITS INSTALL LICENSE README doc
  287. %{_libdir}/php82/*
  288. %{_sysconfdir}/php82/php.d/*
  289. %endif
  290. %if %{with php81}
  291. %files -n php81-ext-%{modname}
  292. %defattr(-,root,root)
  293. %doc CREDITS INSTALL LICENSE README doc
  294. %{_libdir}/php81/*
  295. %{_sysconfdir}/php81/php.d/*
  296. %endif
  297. %changelog
  298. * Sat Jan 20 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-19
  299. - added php83 support.
  300. - disabled php81 support.
  301. * Fri Mar 17 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-18
  302. - added php82 support.
  303. - dropped php80 support.
  304. - disabled php74 support.
  305. * Fri Nov 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-17
  306. - added php81 support.
  307. * Sat Dec 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-16
  308. - added php80 support.
  309. - dropped php73 support.
  310. * Thu Dec 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-15
  311. - added php74 support.
  312. * Wed Sep 04 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-14
  313. - disabled php5/php72 support.
  314. * Sat Dec 08 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-13
  315. - added php73 support.
  316. * Fri Dec 22 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-12
  317. - updated Patch0.
  318. - updated Patch2.
  319. - dropped Patch1: included in Patch0.
  320. - enabled %%check.
  321. * Thu Dec 21 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-11
  322. - updated Patch2.
  323. * Tue Dec 19 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-10
  324. - dropped support for php71.
  325. - added support for php72.
  326. * Thu Mar 16 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-9
  327. - added support for php71.
  328. * Thu Nov 5 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-8
  329. - fixed summary.
  330. - fixed php70 stuff.
  331. * Thu Nov 5 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-7
  332. - added CGI functions.
  333. - added support for php70.
  334. * Fri Apr 10 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-6
  335. - rebuilt with php5-5.6.7.
  336. * Thu Jan 09 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-5
  337. - rebuilt with current environment.
  338. * Tue Jun 25 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-4
  339. - added a patch for PHP 5.5.0.
  340. * Sun Apr 29 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-3
  341. - converted encoding to UTF-8.
  342. * Sat Apr 28 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-2
  343. - added an API version macro to "Requires:".
  344. * Sat Dec 12 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-1
  345. - new upstream release.
  346. * Fri Jul 10 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.1-2
  347. - fixed for php-5.3.0.
  348. * Mon Apr 28 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.1-1
  349. - initial build.