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