]> git.pld-linux.org Git - packages/php-pecl-memcache.git/blob - php-pecl-memcache.spec
- rel 5 (rebuild with new php)
[packages/php-pecl-memcache.git] / php-pecl-memcache.spec
1 %define         _modname        memcache
2 %define         _status         stable
3 %define         _sysconfdir     /etc/php
4 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
5 Summary:        %{_modname} - a memcached extension
6 Summary(pl):    %{_modname} - rozszerzenie memcached
7 Name:           php-pecl-%{_modname}
8 Version:        1.5
9 Release:        5
10 License:        PHP 2.02
11 Group:          Development/Languages/PHP
12 Source0:        http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5:  f521dd4d3cad4ccb05d9ade4e1cc04d4
14 URL:            http://pecl.php.net/package/memcached/
15 BuildRequires:  php-devel >= 3:5.0.0
16 BuildRequires:  rpmbuild(macros) >= 1.254
17 %{?requires_php_extension}
18 Requires:       %{_sysconfdir}/conf.d
19 Obsoletes:      php-pear-%{_modname}
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 Memcached is a caching daemon designed especially for dynamic web
24 applications to decrease database load by storing objects in memory.
25
26 This extension allows you to work with memcached through handy OO and
27 procedural interfaces.
28
29 In PECL status of this extension is: %{_status}.
30
31 %description -l pl
32 Memcached to zaprojektowany dla dynamicznych aplikacji internetowych
33 daemon cachuj±cy maj±cy za zadanie zmniejszenie obci±¿enia bazy danych
34 przez przechowywanie w pamiêci obiektów.
35
36 To rozszerzenie umo¿liwia pracê z memcached za pomoc± porêcznego
37 zorientowanego obiektowo (oraz przez procedury) interfejsu.
38
39 To rozszerzenie ma w PECL status: %{_status}.
40
41 %prep
42 %setup -q -c
43
44 %build
45 cd %{_modname}-%{version}
46 phpize
47 %configure \
48         --with-zlib-dir=/usr
49 %{__make}
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
54
55 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
56 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
57 ; Enable %{_modname} extension module
58 extension=%{_modname}.so
59 EOF
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %post
65 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
66 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
67
68 %postun
69 if [ "$1" = 0 ]; then
70         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
71         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
72 fi
73
74 %files
75 %defattr(644,root,root,755)
76 %doc %{_modname}-%{version}/{CREDITS,README}
77 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
78 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.042315 seconds and 4 git commands to generate.