/[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 1177094 - (show annotations) (download)
Sun Nov 12 21:10:18 2017 UTC (2 years ago) by zezinho
File size: 1816 byte(s)
new version
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 1
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
20 %description
21 This extension uses libmemcached library to provide API for communicating with
22 memcached servers.
23
24 %prep
25 %setup -q -n %{modname}-%{version}
26 [ "../package.xml" != "/" ] && mv ../package.xml .
27
28 cp %{SOURCE1} %{inifile}
29
30 find . -type d -exec chmod 755 {} \;
31 find . -type f -exec chmod 644 {} \;
32
33 # strip away annoying ^M
34 find -type f | grep -v ".gif" | grep -v ".png" | grep -v ".jpg" | xargs dos2unix
35
36 # Fix FTBFS with libmemcached >= 1.0.17
37 # https://github.com/php-memcached-dev/php-memcached/issues/69#issuecomment-17051990
38 echo 'typedef const struct memcached_server_st *memcached_server_instance_st;' \
39 >>php_libmemcached_compat.h
40
41 %build
42 %serverbuild
43 %autopatch -p1
44
45 phpize
46 %configure2_5x --with-libdir=%{_lib} \
47 --enable-%{modname}=shared,%{_prefix} \
48 --with-zlib-dir=%{_prefix}
49
50 %make_build
51 mv modules/*.so .
52
53 %install
54 install -d %{buildroot}%{_libdir}/php/extensions
55 install -d %{buildroot}%{_sysconfdir}/php.d
56
57 install -m0755 %{soname} %{buildroot}%{_libdir}/php/extensions/
58 install -m0644 %{inifile} %{buildroot}%{_sysconfdir}/php.d/%{inifile}
59
60 %files
61 %doc CREDITS ChangeLog memcached-api.php package.xml
62 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/php.d/%{inifile}
63 %attr(0755,root,root) %{_libdir}/php/extensions/%{soname}
64
65
66

  ViewVC Help
Powered by ViewVC 1.1.26