/[packages]/backports/8/php-igbinary/current/SPECS/php-igbinary.spec
ViewVC logotype

Contents of /backports/8/php-igbinary/current/SPECS/php-igbinary.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1760654 - (show annotations) (download)
Sat Dec 4 00:22:45 2021 UTC (2 years, 4 months ago) by rapsys
File size: 1813 byte(s)
Enable igbinary session support even if session is built as shared

1 %define modname igbinary
2 %define soname %{modname}.so
3 %define inifile A50_%{modname}.ini
4
5 Name: php-%{modname}
6 Version: 3.2.6
7 Release: %mkrel 4
8 Group: Development/PHP
9 Summary: PHP igbinary extension
10 License: BSD-3-Clause
11 URL: https://pecl.php.net/package/igbinary
12 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
13 Patch0: igbinary-3.2.6-session_support.patch
14 BuildRequires: php-devel >= 3:8.0.0
15 Requires: php >= 3:8.0.0
16 Requires: php-common >= 3:8.1
17 Requires: php-session >= 3:8.1.0
18
19 %description
20 Igbinary is a drop in replacement for the standard php serializer. Instead of
21 time and space consuming textual representation, igbinary stores php data
22 structures in a compact binary form. Savings are significant when using
23 memcached or similar memory based storages for serialized data.
24
25
26 %prep
27
28 %setup -q -n %{modname}-%{version}
29 [ "../package*.xml" != "/" ] && mv ../package*.xml .
30
31 # lib64 fix
32 perl -pi -e "s|/lib\b|/%{_lib}|g" config.m4
33
34 %build
35 %serverbuild
36 %autopatch -p1
37
38 export CFLAGS="$CFLAGS -DHAVE_PHP_SESSION"
39
40 phpize
41 %configure --with-libdir=%{_lib} \
42 --enable-%{modname}
43
44 %make_build
45 mv modules/*.so .
46
47 %install
48 install -d %{buildroot}%{_libdir}/php/extensions
49 install -d %{buildroot}%{_sysconfdir}/php.d
50 install -d %{buildroot}%{_includedir}/php/ext/%{modname}
51
52 install -m755 %{soname} %{buildroot}%{_libdir}/php/extensions/
53 install src/php7/igbinary.h %{buildroot}%{_includedir}/php/ext/%{modname}/
54
55 cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF
56 extension = %{soname}
57 ; Use igbinary as session serializer
58 session.serialize_handler=igbinary
59 EOF
60
61 %files
62 %doc package*.xml README.md
63 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/php.d/%{inifile}
64 %attr(0755,root,root) %{_libdir}/php/extensions/%{soname}
65 %{_includedir}/php/ext/%{modname}/igbinary.h
66

  ViewVC Help
Powered by ViewVC 1.1.30