]> git.pld-linux.org Git - packages/php-pecl-xslcache.git/blob - php-pecl-xslcache.spec
- %install should begin with rm -rf $RPM_BUILD_ROOT; unified %install a little
[packages/php-pecl-xslcache.git] / php-pecl-xslcache.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define         modname xslcache
6 Summary:        %{modname} - A modification of PHP's standard XSL extension that caches the parsed XSL stylesheet representation
7 Summary(pl.UTF-8):      %{modname} - modyfikacja standardowego rozszerzenia XSL PHP, które buforuje przetworzone reprezentacje arkuszów stylów XSL
8 Name:           php-pecl-%{modname}
9 Version:        0.7.1
10 Release:        3
11 License:        PHP 3.01
12 Group:          Development/Languages/PHP
13 Source0:        http://pecl.php.net/get/%{modname}-%{version}.tgz
14 # Source0-md5:  1e32327f62122055ece6f78fa2b851b2
15 URL:            http://pecl.php.net/package/xslcache
16 BuildRequires:  libxslt-devel >= 1.1.0
17 BuildRequires:  php-devel >= 3:5.0.0
18 BuildRequires:  rpmbuild(macros) >= 1.519
19 %{?requires_php_extension}
20 Requires:       php-common >= 4:5.0.4
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 The XSL Cache extension is a modification of PHP's standard XSL
25 extension that caches the parsed XSL stylesheet representation between
26 sessions for 2.5x boost in performance for sites that repeatedly apply
27 the same transform. Although there is still some further work that
28 could be done on the extension, this code is already proving
29 beneficial in production use for a few applications on the New York
30 Times' website.
31
32 %prep
33 %setup -q -c
34 mv %{modname}-%{version}/* .
35
36 %build
37 phpize
38 %configure \
39         --with-xslcache=%{_libdir} \
40         --with-xsl-exsl-dir=%{_libdir}
41 %{__make}
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
46
47 %{__make} install \
48         INSTALL_ROOT=$RPM_BUILD_ROOT \
49         EXTENSION_DIR=%{php_extensiondir}
50 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
51 ; Enable %{modname} extension module
52 extension=%{modname}.so
53 EOF
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %post
59 %php_webserver_restart
60
61 %postun
62 if [ "$1" = 0 ]; then
63         %php_webserver_restart
64 fi
65
66 %files
67 %defattr(644,root,root,755)
68 %doc CREDITS
69 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
70 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.062447 seconds and 4 git commands to generate.