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