]>
Commit | Line | Data |
---|---|---|
3ac3f251 AG |
1 | %define _modname html_parse |
2 | %define _status alpha | |
96641dd3 ER |
3 | %define _sysconfdir /etc/php |
4 | %define extensionsdir %(php-config --extension-dir 2>/dev/null) | |
3ac3f251 AG |
5 | Summary: %{_modname} - HTML parser extension |
6 | Summary(pl): %{_modname} - parser HTML | |
7 | Name: php-pecl-%{_modname} | |
8 | Version: 0.1 | |
ebeeaa4a | 9 | Release: 2 |
3ac3f251 AG |
10 | License: PHP 2.02 |
11 | Group: Development/Languages/PHP | |
f15671ba | 12 | Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz |
3ac3f251 | 13 | # Source0-md5: cb6035c83d7902708e64b180ee2a1499 |
f15671ba | 14 | URL: http://pecl.php.net/package/html_parse/ |
3ac3f251 | 15 | BuildRequires: ekhtml-devel |
96641dd3 | 16 | BuildRequires: php-devel >= 3:5.0.0 |
a468c2c0 | 17 | BuildRequires: rpmbuild(macros) >= 1.322 |
96641dd3 ER |
18 | %{?requires_php_extension} |
19 | Requires: %{_sysconfdir}/conf.d | |
3ac3f251 AG |
20 | Obsoletes: php-pear-%{_modname} |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
3ac3f251 AG |
23 | %description |
24 | HTML parser extension based on the ekhtml library | |
25 | (http://ekhtml.sourceforge.net/) | |
26 | ||
d66d262a | 27 | In PECL status of this package is: %{_status}. |
3ac3f251 AG |
28 | |
29 | %description -l pl | |
30 | Parser HTML bazowany na bibliotece ekhtml | |
31 | (http://ekhtml.sourceforge.net/) | |
32 | ||
d66d262a | 33 | To rozszerzenie ma w PECL status: %{_status}. |
3ac3f251 AG |
34 | |
35 | %prep | |
36 | %setup -q -c | |
37 | ||
38 | %build | |
39 | cd %{_modname}-%{version} | |
40 | phpize | |
41 | %configure | |
42 | %{__make} | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
96641dd3 | 46 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}} |
3ac3f251 AG |
47 | |
48 | install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir} | |
96641dd3 ER |
49 | cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini |
50 | ; Enable %{_modname} extension module | |
51 | extension=%{_modname}.so | |
52 | EOF | |
3ac3f251 AG |
53 | |
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %post | |
96641dd3 ER |
58 | [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart |
59 | [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart | |
3ac3f251 | 60 | |
96641dd3 ER |
61 | %postun |
62 | if [ "$1" = 0 ]; then | |
63 | [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart | |
64 | [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart | |
3ac3f251 AG |
65 | fi |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
96641dd3 | 69 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini |
3ac3f251 | 70 | %attr(755,root,root) %{extensionsdir}/%{_modname}.so |