summaryrefslogtreecommitdiff
path: root/php-pecl-tidy.spec
blob: 22780d3cbc4e275b6b765d77292029380dda5e1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
%define		php_name	php%{?php_suffix}
%define		modname	tidy
%define		php_extensiondir	%(php-config --extension-dir 2>/dev/null)
Summary:	%{modname} - Tidy HTML Repairing and Parsing
Summary(pl.UTF-8):	%{modname} - Czyszczenie, naprawa oraz parsowanie HTML
Name:		%{php_name}-pecl-%{modname}
Version:	1.2
Release:	2
License:	PHP
Group:		Development/Languages/PHP
Source0:	http://pecl.php.net/get/%{modname}-%{version}.tgz
# Source0-md5:	8c1c92d9386c56d483b1115d207c0293
URL:		http://pecl.php.net/package/tidy/
BuildRequires:	%{php_name}-devel >= 4:5.0.4
BuildRequires:	rpmbuild(macros) >= 1.650
BuildRequires:	tidy-devel
%{?requires_php_extension}
Provides:	php(%{modname}) = %{version}
Obsoletes:	php-pear-%{modname}
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
Tidy is a binding for the Tidy HTML clean and repair utility which
allows you to not only clean and otherwise manipluate HTML documents,
but also traverse the document tree using the Zend Engine 2 OO
semantics.

%description -l pl.UTF-8
Tidy jest dowiązaniem do narzędzia "Tidy HTML clean and repair", które
pozwala nie tylko na czyszczenie oraz manipulację dokumentami HTML,
ale także na przemierzanie przez strukturę dokumentu za pomocą
zorientowanej obiektowo semantyki silnika Zend Engine 2.

%prep
%setup -qc
mv %{modname}-%{version}/* .

%build
phpize
%configure
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
%{__make} install \
	EXTENSION_DIR=%{php_extensiondir} \
	INSTALL_ROOT=$RPM_BUILD_ROOT
cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
; Enable %{modname} extension module
extension=%{modname}.so
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%post
%php_webserver_restart

%postun
if [ "$1" = 0 ]; then
	%php_webserver_restart
fi

%files
%defattr(644,root,root,755)
%doc CREDITS TODO README
%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
%attr(755,root,root) %{php_extensiondir}/%{modname}.so