/[packages]/cauldron/php-memcached/current/SPECS/php-memcached.spec
ViewVC logotype

Contents of /cauldron/php-memcached/current/SPECS/php-memcached.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1177901 - (show annotations) (download)
Sun Nov 19 23:37:57 2017 UTC (6 years, 4 months ago) by mokraemer
File size: 1848 byte(s)
obsoleting php-memcache
1 %define modname memcached
2 %define dirname %{modname}
3 %define soname %{modname}.so
4 %define inifile A91_%{modname}.ini
5
6 Summary: A libmemcached library interface for PHP
7 Name: php-%{modname}
8 Version: 3.0.3
9 Release: %mkrel 2
10 Group: Development/PHP
11 License: PHP License
12 URL: http://pecl.php.net/package/memcached
13 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
14 Source1: %{modname}.ini
15 Patch0: memcached-2.2.0-build.patch
16 BuildRequires: pkgconfig(libmemcached) >= 1.0.17
17 BuildRequires: php-devel >= 3:5.2.1
18 BuildRequires: dos2unix
19 Obsoletes: php-memcache < 3.0.9
20
21 %description
22 This extension uses libmemcached library to provide API for communicating with
23 memcached servers.
24
25 %prep
26 %setup -q -n %{modname}-%{version}
27 [ "../package.xml" != "/" ] && mv ../package.xml .
28
29 cp %{SOURCE1} %{inifile}
30
31 find . -type d -exec chmod 755 {} \;
32 find . -type f -exec chmod 644 {} \;
33
34 # strip away annoying ^M
35 find -type f | grep -v ".gif" | grep -v ".png" | grep -v ".jpg" | xargs dos2unix
36
37 # Fix FTBFS with libmemcached >= 1.0.17
38 # https://github.com/php-memcached-dev/php-memcached/issues/69#issuecomment-17051990
39 echo 'typedef const struct memcached_server_st *memcached_server_instance_st;' \
40 >>php_libmemcached_compat.h
41
42 %build
43 %serverbuild
44 %autopatch -p1
45
46 phpize
47 %configure2_5x --with-libdir=%{_lib} \
48 --enable-%{modname}=shared,%{_prefix} \
49 --with-zlib-dir=%{_prefix}
50
51 %make_build
52 mv modules/*.so .
53
54 %install
55 install -d %{buildroot}%{_libdir}/php/extensions
56 install -d %{buildroot}%{_sysconfdir}/php.d
57
58 install -m0755 %{soname} %{buildroot}%{_libdir}/php/extensions/
59 install -m0644 %{inifile} %{buildroot}%{_sysconfdir}/php.d/%{inifile}
60
61 %files
62 %doc CREDITS ChangeLog memcached-api.php package.xml
63 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/php.d/%{inifile}
64 %attr(0755,root,root) %{_libdir}/php/extensions/%{soname}
65
66
67

  ViewVC Help
Powered by ViewVC 1.1.30