]> git.pld-linux.org Git - packages/php-pecl-memcache.git/blame - php-pecl-memcache.spec
- obsolete old php name
[packages/php-pecl-memcache.git] / php-pecl-memcache.spec
CommitLineData
3917ea3d 1%define php_name php%{?php_suffix}
a9222c27 2%define modname memcache
afdaa3d2 3%define php_min_version 5.0.0
3917ea3d 4%include /usr/lib/rpm/macros.php
a9222c27
ER
5Summary: %{modname} - a memcached extension
6Summary(pl.UTF-8): %{modname} - rozszerzenie memcached
3917ea3d 7Name: %{php_name}-pecl-%{modname}
cae44e68 8Version: 3.0.8
41a892be 9Release: 6
d7d5fbe6 10License: PHP 3.01
15f9ce79 11Group: Development/Languages/PHP
a9222c27 12Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
cae44e68 13# Source0-md5: 24505e9b263d2c77f8ae5e9b4725e7d1
20995d54 14Source1: %{modname}.ini
afdaa3d2
ER
15Source2: %{modname}-apache.conf
16Source3: %{modname}-lighttpd.conf
17Source4: config.php
05ce7ff5 18Source5: %{modname}-httpd.conf
afdaa3d2 19Patch0: %{modname}-webapp.patch
016f4b1b 20URL: http://pecl.php.net/package/memcache/
3917ea3d 21BuildRequires: %{php_name}-devel >= 3:5.0.0
fae887d4 22BuildRequires: php-packagexml2cl
afdaa3d2 23BuildRequires: rpm-php-pearprov >= 4.4.2-11
62a21c7f 24BuildRequires: rpmbuild(macros) >= 1.650
0bee29d4 25%{?requires_php_extension}
3917ea3d
ER
26Requires: %{php_name}-session
27Requires: %{php_name}-zlib
afdaa3d2 28Suggests: memcached
85d58e51 29Provides: php(memcache)
41a892be 30Obsoletes: php-pecl-memcache < 3.0.8-5
15f9ce79
AG
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
afdaa3d2
ER
33%define _webapps /etc/webapps
34%define _webapp %{modname}
35%define _sysconfdir %{_webapps}/%{_webapp}
36%define _appdir %{_datadir}/%{_webapp}
37
38# bad depsolver
39%define _noautopear pear
40
41# put it together for rpmbuild
42%define _noautoreq %{?_noautophp} %{?_noautopear}
43
15f9ce79
AG
44%description
45Memcached is a caching daemon designed especially for dynamic web
46applications to decrease database load by storing objects in memory.
47
48This extension allows you to work with memcached through handy OO and
49procedural interfaces.
50
6dd6de29 51%description -l pl.UTF-8
15f9ce79 52Memcached to zaprojektowany dla dynamicznych aplikacji internetowych
6dd6de29
JR
53daemon cachujący mający za zadanie zmniejszenie obciążenia bazy danych
54przez przechowywanie w pamięci obiektów.
15f9ce79 55
6dd6de29 56To rozszerzenie umożliwia pracę z memcached za pomocą poręcznego
15f9ce79
AG
57zorientowanego obiektowo (oraz przez procedury) interfejsu.
58
afdaa3d2
ER
59%package web
60Summary: Web interface for memcache
61Group: Libraries
09120ee3 62# does not require extension itself
fae887d4 63Requires: php(core) >= %{php_min_version}
3917ea3d
ER
64Requires: php(date)
65Requires: php(gd)
66Requires: php(pcre)
afdaa3d2
ER
67Requires: webapps
68Requires: webserver(php) >= 5.0
05ce7ff5 69Conflicts: apache-base < 2.4.0-1
3917ea3d
ER
70%if "%{_rpmversion}" >= "5"
71BuildArch: noarch
72%endif
afdaa3d2
ER
73
74%description web
75Via this web interface script you can manage and view statistics of
76memcache.
77
15f9ce79
AG
78%prep
79%setup -q -c
a9222c27 80mv %{modname}-%{version}/* .
afdaa3d2 81%patch0 -p1
15f9ce79
AG
82
83%build
6c6304c8 84packagexml2cl package.xml > ChangeLog
15f9ce79 85phpize
172c079e
AG
86%configure \
87 --with-zlib-dir=/usr
15f9ce79
AG
88%{__make}
89
90%install
91rm -rf $RPM_BUILD_ROOT
a9222c27 92install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}}
20995d54
ER
93install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
94# we use "session_" prefix in inifile to get loader *after* session extension
95cp -a %{SOURCE1} $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/session_%{modname}.ini
afdaa3d2
ER
96cp -a example.php $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
97
98install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
99cp -a memcache.php $RPM_BUILD_ROOT%{_appdir}
100cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/config.php
101cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
afdaa3d2 102cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
05ce7ff5 103cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
15f9ce79
AG
104
105%clean
106rm -rf $RPM_BUILD_ROOT
107
108%post
86295f4f 109%php_webserver_restart
15f9ce79 110
0bee29d4
ER
111%postun
112if [ "$1" = 0 ]; then
86295f4f 113 %php_webserver_restart
15f9ce79
AG
114fi
115
c69936a3
ER
116%triggerpostun -- %{name} < 3.0.4-2
117if [ -f %{php_sysconfdir}/conf.d/%{modname}.ini.rpmsave ]; then
118 echo >&2 "Restoring old config: %{modname}.ini.rpmsave -> session_%{modname}.ini in %{php_sysconfdir}/conf.d"
119 cp -f %{php_sysconfdir}/conf.d/session_%{modname}.ini{,.rpmnew}
120 mv -f %{php_sysconfdir}/conf.d/{%{modname}.ini.rpmsave,session_%{modname}.ini}
121 %php_webserver_restart
122fi
123
afdaa3d2
ER
124%triggerin web -- apache1 < 1.3.37-3, apache1-base
125%webapp_register apache %{_webapp}
126
127%triggerun web -- apache1 < 1.3.37-3, apache1-base
128%webapp_unregister apache %{_webapp}
129
05ce7ff5 130%triggerin web -- apache-base
afdaa3d2
ER
131%webapp_register httpd %{_webapp}
132
05ce7ff5 133%triggerun web -- apache-base
afdaa3d2
ER
134%webapp_unregister httpd %{_webapp}
135
136%triggerin web -- lighttpd
137%webapp_register lighttpd %{_webapp}
138
139%triggerun web -- lighttpd
140%webapp_unregister lighttpd %{_webapp}
141
15f9ce79
AG
142%files
143%defattr(644,root,root,755)
6c6304c8 144%doc CREDITS README ChangeLog
c69936a3 145%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/session_%{modname}.ini
a9222c27
ER
146%attr(755,root,root) %{php_extensiondir}/%{modname}.so
147%{_examplesdir}/%{name}-%{version}
afdaa3d2
ER
148
149%files web
150%defattr(644,root,root,755)
151%dir %attr(750,root,http) %{_sysconfdir}
152%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
153%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
154%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
1ec0934f 155%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
afdaa3d2 156%{_appdir}
This page took 0.149672 seconds and 4 git commands to generate.