| 1 | %bcond_without php5 |
|---|
| 2 | %bcond_without php72 |
|---|
| 3 | |
|---|
| 4 | %define modname clearsilver |
|---|
| 5 | |
|---|
| 6 | Summary: ClearSilver extension for PHP |
|---|
| 7 | Summary(ja): PHP用ClearSilverモジュール |
|---|
| 8 | Name: php-ext-%{modname} |
|---|
| 9 | Version: 0.4 |
|---|
| 10 | Release: 12%{_dist_release} |
|---|
| 11 | URL: http://www.geodata.soton.ac.uk/software/php_clearsilver/ |
|---|
| 12 | Source: php-%{modname}-%{version}.tar.gz |
|---|
| 13 | Patch0: php-clearsilver-0.4-php5.6.0.patch |
|---|
| 14 | Patch2: php-clearsilver-0.4-php7.2.0.patch |
|---|
| 15 | License: The PHP License |
|---|
| 16 | Group: Development/Languages |
|---|
| 17 | BuildRequires: clearsilver, zlib-devel |
|---|
| 18 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
|---|
| 19 | |
|---|
| 20 | %if %{with php5} |
|---|
| 21 | BuildRequires: php5-devel |
|---|
| 22 | %endif |
|---|
| 23 | |
|---|
| 24 | %if %{with php72} |
|---|
| 25 | BuildRequires: php72-devel |
|---|
| 26 | %endif |
|---|
| 27 | |
|---|
| 28 | Vendor: Project Vine |
|---|
| 29 | Distribution: Vine Linux |
|---|
| 30 | Packager: tomop |
|---|
| 31 | |
|---|
| 32 | %description |
|---|
| 33 | This module adds ClearSilver functions to PHP. |
|---|
| 34 | |
|---|
| 35 | %description -l ja |
|---|
| 36 | このモジュールはPHPにClearSilverテンプレート機能を追加します。 |
|---|
| 37 | |
|---|
| 38 | %if %{with php5} |
|---|
| 39 | %package -n php5-ext-%{modname} |
|---|
| 40 | Summary: ClearSilver extension for PHP-5.6.x |
|---|
| 41 | Summary(ja): PHP-5.6.x用ClearSilverモジュール |
|---|
| 42 | Group: Development/Languages |
|---|
| 43 | %if "%{?req_php5_api}" != "" |
|---|
| 44 | Requires: %{req_php5_api} |
|---|
| 45 | %endif |
|---|
| 46 | Obsoletes: php-ext-clearsilver < 0.4-7 |
|---|
| 47 | |
|---|
| 48 | %description -n php5-ext-%{modname} |
|---|
| 49 | This module adds ClearSilver functions to PHP. |
|---|
| 50 | |
|---|
| 51 | %description -n php5-ext-%{modname} -l ja |
|---|
| 52 | このモジュールはPHPにClearSilverテンプレート機能を追加します。 |
|---|
| 53 | |
|---|
| 54 | %endif |
|---|
| 55 | |
|---|
| 56 | %if %{with php72} |
|---|
| 57 | %package -n php72-ext-%{modname} |
|---|
| 58 | Summary: ClearSilver extension for PHP-7.0.x |
|---|
| 59 | Summary(ja): PHP-7.0.x用ClearSilverモジュール |
|---|
| 60 | Group: Development/Languages |
|---|
| 61 | %if "%{?req_php72_api}" != "" |
|---|
| 62 | Requires: %{req_php72_api} |
|---|
| 63 | %endif |
|---|
| 64 | |
|---|
| 65 | %description -n php72-ext-%{modname} |
|---|
| 66 | This module adds ClearSilver functions to PHP. |
|---|
| 67 | |
|---|
| 68 | %description -n php72-ext-%{modname} -l ja |
|---|
| 69 | このモジュールはPHPにClearSilverテンプレート機能を追加します。 |
|---|
| 70 | |
|---|
| 71 | %endif |
|---|
| 72 | |
|---|
| 73 | %prep |
|---|
| 74 | %setup -q -c -n php-%{modname}-%{version} |
|---|
| 75 | |
|---|
| 76 | cp -a php-%{modname}-%{version}/{CREDITS,INSTALL,LICENSE,README,doc} ./ |
|---|
| 77 | |
|---|
| 78 | %if %{with php5} |
|---|
| 79 | cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php5 |
|---|
| 80 | pushd php-clearsilver-%{version}-php5 |
|---|
| 81 | %patch0 -p1 -b .php56 |
|---|
| 82 | popd |
|---|
| 83 | %endif |
|---|
| 84 | |
|---|
| 85 | %if %{with php72} |
|---|
| 86 | cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php7 |
|---|
| 87 | pushd php-clearsilver-%{version}-php7 |
|---|
| 88 | %patch0 -p1 -b .php56 |
|---|
| 89 | %patch2 -p1 -b .php72 |
|---|
| 90 | popd |
|---|
| 91 | %endif |
|---|
| 92 | |
|---|
| 93 | %build |
|---|
| 94 | %if %{with php5} |
|---|
| 95 | pushd php-clearsilver-%{version}-php5 |
|---|
| 96 | phpize5 |
|---|
| 97 | aclocal |
|---|
| 98 | autoconf |
|---|
| 99 | libtoolize --copy --force |
|---|
| 100 | %configure --with-php-config=/usr/bin/php-config5 |
|---|
| 101 | %__make %{_smp_mflags} |
|---|
| 102 | popd |
|---|
| 103 | %endif |
|---|
| 104 | |
|---|
| 105 | %if %{with php72} |
|---|
| 106 | pushd php-clearsilver-%{version}-php7 |
|---|
| 107 | phpize72 |
|---|
| 108 | aclocal |
|---|
| 109 | autoconf |
|---|
| 110 | libtoolize --copy --force |
|---|
| 111 | %configure --with-php-config=/usr/bin/php-config72 |
|---|
| 112 | %__make %{_smp_mflags} |
|---|
| 113 | popd |
|---|
| 114 | %endif |
|---|
| 115 | |
|---|
| 116 | %install |
|---|
| 117 | rm -rf %{buildroot} |
|---|
| 118 | %if %{with php5} |
|---|
| 119 | pushd php-clearsilver-%{version}-php5 |
|---|
| 120 | mkdir -p %{buildroot}%{_libdir}/php5/ |
|---|
| 121 | mkdir -p %{buildroot}%{_sysconfdir}/php5/php.d |
|---|
| 122 | |
|---|
| 123 | install -m644 modules/%{modname}.so %{buildroot}%{_libdir}/php5/ |
|---|
| 124 | |
|---|
| 125 | cat > %{buildroot}%{_sysconfdir}/php5/php.d/%{modname}.ini <<EOF |
|---|
| 126 | ; Enable %{modname} extension module |
|---|
| 127 | extension=%{modname}.so |
|---|
| 128 | EOF |
|---|
| 129 | popd |
|---|
| 130 | %endif |
|---|
| 131 | |
|---|
| 132 | %if %{with php72} |
|---|
| 133 | pushd php-clearsilver-%{version}-php7 |
|---|
| 134 | mkdir -p %{buildroot}%{_libdir}/php72/ |
|---|
| 135 | mkdir -p %{buildroot}%{_sysconfdir}/php72/php.d |
|---|
| 136 | |
|---|
| 137 | install -m644 modules/%{modname}.so %{buildroot}%{_libdir}/php72/ |
|---|
| 138 | |
|---|
| 139 | cat > %{buildroot}%{_sysconfdir}/php72/php.d/%{modname}.ini <<EOF |
|---|
| 140 | ; Enable %{modname} extension module |
|---|
| 141 | extension=%{modname}.so |
|---|
| 142 | EOF |
|---|
| 143 | popd |
|---|
| 144 | %endif |
|---|
| 145 | |
|---|
| 146 | %check |
|---|
| 147 | |
|---|
| 148 | pushd php-clearsilver-%{version}-php5 |
|---|
| 149 | make test NO_INTERACTION=1 |
|---|
| 150 | popd |
|---|
| 151 | |
|---|
| 152 | pushd php-clearsilver-%{version}-php7 |
|---|
| 153 | make test NO_INTERACTION=1 |
|---|
| 154 | popd |
|---|
| 155 | |
|---|
| 156 | %clean |
|---|
| 157 | rm -rf %{buildroot} |
|---|
| 158 | |
|---|
| 159 | %if %{with php5} |
|---|
| 160 | %files -n php5-ext-%{modname} |
|---|
| 161 | %defattr(-,root,root) |
|---|
| 162 | %doc CREDITS INSTALL LICENSE README doc |
|---|
| 163 | %{_libdir}/php5/* |
|---|
| 164 | %{_sysconfdir}/php5/php.d/* |
|---|
| 165 | %endif |
|---|
| 166 | |
|---|
| 167 | %if %{with php72} |
|---|
| 168 | %files -n php72-ext-%{modname} |
|---|
| 169 | %defattr(-,root,root) |
|---|
| 170 | %doc CREDITS INSTALL LICENSE README doc |
|---|
| 171 | %{_libdir}/php72/* |
|---|
| 172 | %{_sysconfdir}/php72/php.d/* |
|---|
| 173 | %endif |
|---|
| 174 | |
|---|
| 175 | %changelog |
|---|
| 176 | * Fri Dec 22 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-12 |
|---|
| 177 | - updated Patch0. |
|---|
| 178 | - updated Patch2. |
|---|
| 179 | - dropped Patch1: included in Patch0. |
|---|
| 180 | - enabled %%check. |
|---|
| 181 | |
|---|
| 182 | * Thu Dec 21 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-11 |
|---|
| 183 | - updated Patch2. |
|---|
| 184 | |
|---|
| 185 | * Tue Dec 19 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-10 |
|---|
| 186 | - dropped support for php71. |
|---|
| 187 | - added support for php72. |
|---|
| 188 | |
|---|
| 189 | * Thu Mar 16 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-9 |
|---|
| 190 | - added support for php71. |
|---|
| 191 | |
|---|
| 192 | * Thu Nov 5 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-8 |
|---|
| 193 | - fixed summary. |
|---|
| 194 | - fixed php70 stuff. |
|---|
| 195 | |
|---|
| 196 | * Thu Nov 5 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-7 |
|---|
| 197 | - added CGI functions. |
|---|
| 198 | - added support for php70. |
|---|
| 199 | |
|---|
| 200 | * Fri Apr 10 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-6 |
|---|
| 201 | - rebuilt with php5-5.6.7. |
|---|
| 202 | |
|---|
| 203 | * Thu Jan 09 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-5 |
|---|
| 204 | - rebuilt with current environment. |
|---|
| 205 | |
|---|
| 206 | * Tue Jun 25 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-4 |
|---|
| 207 | - added a patch for PHP 5.5.0. |
|---|
| 208 | |
|---|
| 209 | * Sun Apr 29 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-3 |
|---|
| 210 | - converted encoding to UTF-8. |
|---|
| 211 | |
|---|
| 212 | * Sat Apr 28 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-2 |
|---|
| 213 | - added an API version macro to "Requires:". |
|---|
| 214 | |
|---|
| 215 | * Sat Dec 12 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-1 |
|---|
| 216 | - new upstream release. |
|---|
| 217 | |
|---|
| 218 | * Fri Jul 10 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.1-2 |
|---|
| 219 | - fixed for php-5.3.0. |
|---|
| 220 | |
|---|
| 221 | * Mon Apr 28 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.1-1 |
|---|
| 222 | - initial build. |
|---|
| 223 | |
|---|