php-ext-clearsilver-vl.spec 12 KB

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