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