|
|
c0be329 |
# Fedora spec file for php-pecl-yac (previously php-yac)
|
|
|
8191f61 |
#
|
|
|
52387c8 |
# Copyright (c) 2013-2021 Remi Collet
|
|
|
8191f61 |
# License: CC-BY-SA
|
|
|
c0be329 |
# http://creativecommons.org/licenses/by-sa/4.0/
|
|
|
8191f61 |
#
|
|
|
8191f61 |
# Please, preserve the changelog entries
|
|
|
8191f61 |
#
|
|
|
3aac9f4 |
|
|
|
3aac9f4 |
# we don't want -z defs linker flag
|
|
|
3aac9f4 |
%undefine _strict_symbol_defs_build
|
|
|
3aac9f4 |
|
|
|
8191f61 |
%global with_zts 0%{?__ztsphp:1}
|
|
|
8191f61 |
%global pecl_name yac
|
|
|
8191f61 |
%global with_tests %{!?_without_tests:1}%{?_without_tests:0}
|
|
|
567ed3e |
# after 20-json, 40-igbinary and 40-msgpack
|
|
|
567ed3e |
%global ini_name 50-%{pecl_name}.ini
|
|
|
8191f61 |
|
|
|
8191f61 |
Summary: Lockless user data cache
|
|
|
8191f61 |
Name: php-pecl-%{pecl_name}
|
|
|
52387c8 |
Version: 2.3.0
|
|
|
f79daf5 |
Release: 2%{?dist}
|
|
|
8191f61 |
|
|
|
8191f61 |
License: PHP
|
|
|
a1edd9f |
URL: https://pecl.php.net/package/%{pecl_name}
|
|
|
a1edd9f |
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
|
|
|
ae1205b |
|
|
|
52387c8 |
BuildRequires: php-devel >= 7.0
|
|
|
8191f61 |
BuildRequires: php-pear
|
|
|
3924a71 |
BuildRequires: php-json
|
|
|
567ed3e |
BuildRequires: php-pecl-msgpack-devel
|
|
|
567ed3e |
BuildRequires: php-pecl-igbinary-devel
|
|
|
8191f61 |
BuildRequires: fastlz-devel
|
|
|
8191f61 |
|
|
|
8191f61 |
Requires: php(zend-abi) = %{php_zend_api}
|
|
|
8191f61 |
Requires: php(api) = %{php_core_api}
|
|
|
567ed3e |
Requires: php-json%{?_isa}
|
|
|
567ed3e |
Requires: php-igbinary%{?_isa}
|
|
|
567ed3e |
Requires: php-msgpack%{?_isa}
|
|
|
8191f61 |
|
|
|
8191f61 |
# Package have be renamed
|
|
|
8191f61 |
Obsoletes: php-%{pecl_name} < %{version}
|
|
|
8191f61 |
Provides: php-%{pecl_name} = %{version}
|
|
|
8191f61 |
Provides: php-%{pecl_name}%{?_isa} = %{version}
|
|
|
8191f61 |
Provides: php-pecl(%{pecl_name}) = %{version}
|
|
|
8191f61 |
Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
|
|
|
8191f61 |
|
|
|
8191f61 |
|
|
|
8191f61 |
%description
|
|
|
8191f61 |
Yac (Yet Another Cache) is a shared memory user data cache for PHP.
|
|
|
8191f61 |
|
|
|
8191f61 |
It can be used to replace APC or local memcached.
|
|
|
8191f61 |
|
|
|
8191f61 |
Yac is lockless, that means, it is very fast, but there could be a
|
|
|
8191f61 |
chance you will get a wrong data(depends on how many key slots are
|
|
|
8191f61 |
allocated and how many keys are stored), so you'd better make sure
|
|
|
8191f61 |
that your product is not very sensitive to that.
|
|
|
8191f61 |
|
|
|
8191f61 |
|
|
|
8191f61 |
%prep
|
|
|
8191f61 |
%setup -qc
|
|
|
8191f61 |
mv %{pecl_name}-%{version} NTS
|
|
|
8191f61 |
|
|
|
8191f61 |
# Don't install (register) the tests
|
|
|
c0be329 |
sed -e 's/role="test"/role="src"/' \
|
|
|
c0be329 |
-e '/LICENSE/s/role="doc"/role="src"/' \
|
|
|
c0be329 |
-i package.xml
|
|
|
8191f61 |
|
|
|
8191f61 |
cd NTS
|
|
|
8191f61 |
# drop bundled fastlz to ensure it is not used
|
|
|
8191f61 |
sed -e '\:name="compressor/fastlz:d' -i ../package.xml
|
|
|
8191f61 |
rm -r compressor/fastlz
|
|
|
8191f61 |
|
|
|
8191f61 |
# Check version as upstream often forget to update this
|
|
|
8191f61 |
extver=$(sed -n '/#define PHP_YAC_VERSION/{s/.* "//;s/".*$//;p}' php_yac.h)
|
|
|
8191f61 |
if test "x${extver}" != "x%{version}%{?prever}"; then
|
|
|
8191f61 |
: Error: Upstream YAC version is ${extver}, expecting %{version}%{?prever}.
|
|
|
8191f61 |
exit 1
|
|
|
8191f61 |
fi
|
|
|
8191f61 |
cd ..
|
|
|
8191f61 |
|
|
|
8191f61 |
# Drop in the bit of configuration
|
|
|
8191f61 |
cat > %{ini_name} << 'EOF'
|
|
|
8191f61 |
; Enable Yet Another Cache extension module
|
|
|
8191f61 |
extension = %{pecl_name}.so
|
|
|
8191f61 |
|
|
|
8191f61 |
;yac.enable=1
|
|
|
8191f61 |
;yac.enable_cli=0
|
|
|
8191f61 |
;yac.debug=0
|
|
|
8191f61 |
;yac.keys_memory_size=4M
|
|
|
8191f61 |
;yac.values_memory_size=64M
|
|
|
8191f61 |
;yac.compress_threshold=-1
|
|
|
567ed3e |
;yac.serializer=php
|
|
|
8191f61 |
EOF
|
|
|
8191f61 |
|
|
|
8191f61 |
|
|
|
8191f61 |
%if %{with_zts}
|
|
|
8191f61 |
# duplicate for ZTS build
|
|
|
8191f61 |
cp -pr NTS ZTS
|
|
|
8191f61 |
%endif
|
|
|
8191f61 |
|
|
|
8191f61 |
|
|
|
8191f61 |
%build
|
|
|
8191f61 |
peclconf() {
|
|
|
8191f61 |
%configure \
|
|
|
567ed3e |
--enable-json \
|
|
|
567ed3e |
--enable-msgpack \
|
|
|
567ed3e |
--enable-igbinary \
|
|
|
8191f61 |
--with-system-fastlz \
|
|
|
8191f61 |
--with-php-config=$1
|
|
|
8191f61 |
}
|
|
|
8191f61 |
|
|
|
8191f61 |
cd NTS
|
|
|
8191f61 |
%{_bindir}/phpize
|
|
|
8191f61 |
peclconf %{_bindir}/php-config
|
|
|
8191f61 |
make %{?_smp_mflags}
|
|
|
8191f61 |
|
|
|
8191f61 |
%if %{with_zts}
|
|
|
8191f61 |
cd ../ZTS
|
|
|
8191f61 |
%{_bindir}/zts-phpize
|
|
|
8191f61 |
peclconf %{_bindir}/zts-php-config
|
|
|
8191f61 |
make %{?_smp_mflags}
|
|
|
8191f61 |
%endif
|
|
|
8191f61 |
|
|
|
8191f61 |
|
|
|
8191f61 |
%install
|
|
|
8191f61 |
# Install the NTS stuff
|
|
|
8191f61 |
make -C NTS install INSTALL_ROOT=%{buildroot}
|
|
|
8191f61 |
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
|
|
|
8191f61 |
|
|
|
8191f61 |
# Install XML package description
|
|
|
8191f61 |
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
|
|
|
8191f61 |
|
|
|
8191f61 |
# Install the ZTS stuff
|
|
|
8191f61 |
%if %{with_zts}
|
|
|
8191f61 |
make -C ZTS install INSTALL_ROOT=%{buildroot}
|
|
|
8191f61 |
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
|
|
|
8191f61 |
%endif
|
|
|
8191f61 |
|
|
|
8191f61 |
# Test & Documentation
|
|
|
8191f61 |
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
|
|
|
8191f61 |
do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
|
|
|
8191f61 |
done
|
|
|
8191f61 |
|
|
|
8191f61 |
|
|
|
8191f61 |
%check
|
|
|
52387c8 |
OPTS="-n"
|
|
|
52387c8 |
[ -f %{php_extdir}/json.so ] && OPTS="$OPTS -d extension=json.so"
|
|
|
52387c8 |
[ -f %{php_extdir}/igbinary.so ] && OPTS="$OPTS -d extension=igbinary.so"
|
|
|
52387c8 |
[ -f %{php_extdir}/msgpack.so ] && OPTS="$OPTS -d extension=msgpack.so"
|
|
|
35944f7 |
|
|
|
8191f61 |
cd NTS
|
|
|
8191f61 |
|
|
|
8191f61 |
: Minimal load test for NTS extension
|
|
|
567ed3e |
%{_bindir}/php $OPTS \
|
|
|
8191f61 |
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
|
|
|
52387c8 |
--modules | grep '^%{pecl_name}$'
|
|
|
8191f61 |
|
|
|
8191f61 |
%if %{with_tests}
|
|
|
8191f61 |
: Upstream test suite for NTS extension
|
|
|
8191f61 |
TEST_PHP_EXECUTABLE=%{__php} \
|
|
|
567ed3e |
TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \
|
|
|
8191f61 |
NO_INTERACTION=1 \
|
|
|
8191f61 |
REPORT_EXIT_STATUS=1 \
|
|
|
8191f61 |
%{__php} -n run-tests.php --show-diff
|
|
|
8191f61 |
%else
|
|
|
8191f61 |
: Upstream test suite disabled
|
|
|
8191f61 |
%endif
|
|
|
8191f61 |
|
|
|
8191f61 |
%if %{with_zts}
|
|
|
8191f61 |
cd ../ZTS
|
|
|
8191f61 |
|
|
|
8191f61 |
: Minimal load test for ZTS extension
|
|
|
567ed3e |
%{__ztsphp} $OPTS \
|
|
|
8191f61 |
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
|
|
|
52387c8 |
--modules | grep '^%{pecl_name}$'
|
|
|
8191f61 |
|
|
|
8191f61 |
%if %{with_tests}
|
|
|
8191f61 |
: Upstream test suite for ZTS extension
|
|
|
8191f61 |
TEST_PHP_EXECUTABLE=%{__ztsphp} \
|
|
|
567ed3e |
TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \
|
|
|
8191f61 |
NO_INTERACTION=1 \
|
|
|
8191f61 |
REPORT_EXIT_STATUS=1 \
|
|
|
8191f61 |
%{__ztsphp} -n run-tests.php --show-diff
|
|
|
8191f61 |
%else
|
|
|
8191f61 |
: Upstream test suite disabled
|
|
|
8191f61 |
%endif
|
|
|
8191f61 |
%endif
|
|
|
8191f61 |
|
|
|
8191f61 |
|
|
|
8191f61 |
%files
|
|
|
c0be329 |
%license NTS/LICENSE
|
|
|
8191f61 |
%doc %{pecl_docdir}/%{pecl_name}
|
|
|
8191f61 |
%{pecl_xmldir}/%{name}.xml
|
|
|
8191f61 |
|
|
|
8191f61 |
%config(noreplace) %{php_inidir}/%{ini_name}
|
|
|
8191f61 |
%{php_extdir}/%{pecl_name}.so
|
|
|
8191f61 |
|
|
|
8191f61 |
%if %{with_zts}
|
|
|
8191f61 |
%{php_ztsextdir}/%{pecl_name}.so
|
|
|
8191f61 |
%config(noreplace) %{php_ztsinidir}/%{ini_name}
|
|
|
8191f61 |
%endif
|
|
|
8191f61 |
|
|
|
8191f61 |
|
|
|
8191f61 |
%changelog
|
|
|
f79daf5 |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2
|
|
|
f79daf5 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
f79daf5 |
|
|
|
52387c8 |
* Wed Jan 6 2021 Remi Collet <remi@remirepo.net> - 2.3.0-1
|
|
|
52387c8 |
- update to 2.3.0
|
|
|
52387c8 |
|
|
|
3986caf |
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
|
|
|
3986caf |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
3986caf |
|
|
|
d5f1f71 |
* Fri May 15 2020 Remi Collet <remi@remirepo.net> - 2.2.1-1
|
|
|
d5f1f71 |
- update to 2.2.1
|
|
|
d5f1f71 |
|
|
|
567ed3e |
* Tue Mar 31 2020 Remi Collet <remi@remirepo.net> - 2.2.0-1
|
|
|
567ed3e |
- update to 2.2.0
|
|
|
567ed3e |
- enable json, igbinary and msgpack serializers
|
|
|
567ed3e |
- rename configuration file to 50-yac.ini to ensure proper load order
|
|
|
567ed3e |
|
|
|
240352d |
* Fri Mar 27 2020 Remi Collet <remi@remirepo.net> - 2.1.2-1
|
|
|
240352d |
- update to 2.1.2
|
|
|
240352d |
|
|
|
0cc9d65 |
* Wed Mar 25 2020 Remi Collet <remi@remirepo.net> - 2.1.1-1
|
|
|
0cc9d65 |
- update to 2.1.1
|
|
|
0cc9d65 |
|
|
|
9cd3691 |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-2
|
|
|
9cd3691 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
9cd3691 |
|
|
|
a1edd9f |
* Mon Jan 6 2020 Remi Collet <remi@remirepo.net> - 2.0.3-1
|
|
|
a1edd9f |
- update to 2.0.3
|
|
|
a1edd9f |
|
|
|
35944f7 |
* Fri Oct 04 2019 Remi Collet <remi@remirepo.net> - 2.0.2-9
|
|
|
35944f7 |
- rebuild for https://fedoraproject.org/wiki/Changes/php74
|
|
|
35944f7 |
|
|
|
0c97357 |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-8
|
|
|
0c97357 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
0c97357 |
|
|
|
441d303 |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-7
|
|
|
441d303 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
441d303 |
|
|
|
ae1205b |
* Thu Oct 11 2018 Remi Collet <remi@remirepo.net> - 2.0.2-6
|
|
|
ae1205b |
- Rebuild for https://fedoraproject.org/wiki/Changes/php73
|
|
|
ae1205b |
- add patch for PHP 7.3 from
|
|
|
ae1205b |
https://github.com/laruence/yac/pull/89
|
|
|
ae1205b |
|
|
|
c65f044 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-5
|
|
|
c65f044 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
c65f044 |
|
|
|
f07125f |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-4
|
|
|
f07125f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
f07125f |
|
|
|
3aac9f4 |
* Mon Jan 29 2018 Remi Collet <remi@remirepo.net> - 2.0.2-3
|
|
|
3aac9f4 |
- undefine _strict_symbol_defs_build
|
|
|
3aac9f4 |
|
|
|
ce381b3 |
* Tue Oct 03 2017 Remi Collet <remi@fedoraproject.org> - 2.0.2-2
|
|
|
ce381b3 |
- rebuild for https://fedoraproject.org/wiki/Changes/php72
|
|
|
ce381b3 |
|
|
|
3af42bc |
* Tue Aug 1 2017 Remi Collet <remi@remirepo.net> - 2.0.2-1
|
|
|
3af42bc |
- Update to 2.0.2
|
|
|
3af42bc |
|
|
|
711c087 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-4
|
|
|
711c087 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
711c087 |
|
|
|
7e40237 |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-3
|
|
|
7e40237 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
7e40237 |
|
|
|
49231e3 |
* Mon Nov 14 2016 Remi Collet <remi@fedoraproject.org> - 2.0.1-2
|
|
|
49231e3 |
- rebuild for https://fedoraproject.org/wiki/Changes/php71
|
|
|
49231e3 |
|
|
|
c4cf89f |
* Sat Jul 2 2016 Remi Collet <remi@fedoraproject.org> - 2.0.1-1
|
|
|
c4cf89f |
- update to 2.0.1 (php 7)
|
|
|
c4cf89f |
|
|
|
d97edde |
* Mon Jun 27 2016 Remi Collet <remi@fedoraproject.org> - 2.0.0-1
|
|
|
d97edde |
- update to 2.0.0 (php 7)
|
|
|
d97edde |
|
|
|
c0be329 |
* Sat Feb 13 2016 Remi Collet <remi@fedoraproject.org> - 0.9.2-4
|
|
|
c0be329 |
- drop scriptlets (replaced by file triggers in php-pear)
|
|
|
c0be329 |
- cleanup
|
|
|
c0be329 |
|
|
|
7b77082 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-3
|
|
|
7b77082 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
7b77082 |
|
|
|
c062a3d |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-2
|
|
|
c062a3d |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
c062a3d |
|
|
|
8191f61 |
* Sat Oct 25 2014 Remi Collet <remi@fedoraproject.org> - 0.9.2-1
|
|
|
8191f61 |
- Update to 0.9.2
|
|
|
8191f61 |
|
|
|
8191f61 |
* Sat Sep 6 2014 Remi Collet <remi@fedoraproject.org> - 0.9.1-3
|
|
|
8191f61 |
- cleanup for review
|
|
|
8191f61 |
- build with system fastlz
|
|
|
8191f61 |
- don't install the tests
|
|
|
8191f61 |
|
|
|
8191f61 |
* Tue Aug 26 2014 Remi Collet <rcollet@redhat.com> - 0.9.1-2
|
|
|
8191f61 |
- improve SCL build
|
|
|
8191f61 |
|
|
|
8191f61 |
* Fri Jul 25 2014 Remi Collet <remi@fedoraproject.org> - 0.9.1-1
|
|
|
8191f61 |
- Update to 0.9.1 (beta)
|
|
|
8191f61 |
|
|
|
8191f61 |
* Thu Jul 24 2014 Remi Collet <remi@fedoraproject.org> - 0.9.0-1
|
|
|
8191f61 |
- upstream move to pecl
|
|
|
8191f61 |
- rename from php-yac to php-pecl-yac
|
|
|
8191f61 |
- update to 0.9.0 (beta)
|
|
|
8191f61 |
|
|
|
8191f61 |
* Thu Apr 17 2014 Remi Collet <remi@fedoraproject.org> - 0.1.1-3
|
|
|
8191f61 |
- add numerical prefix to extension configuration file (php 5.6)
|
|
|
8191f61 |
|
|
|
8191f61 |
* Tue Mar 25 2014 Remi Collet <remi@fedoraproject.org> - 0.1.1-2
|
|
|
8191f61 |
- allow SCL build
|
|
|
8191f61 |
|
|
|
8191f61 |
* Sun Mar 16 2014 Remi Collet <remi@fedoraproject.org> - 0.1.1-1
|
|
|
8191f61 |
- version 0.1.1
|
|
|
8191f61 |
|
|
|
8191f61 |
* Sat Mar 23 2013 Remi Collet <remi@fedoraproject.org> - 0.1.0-0.1.git57fe00d
|
|
|
d97edde |
- initial package, version 0.1.0 (experimental)
|