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