diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fa1abaa --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/apcu-5.1.17.tgz diff --git a/.rh-php73-php-pecl-apcu.metadata b/.rh-php73-php-pecl-apcu.metadata new file mode 100644 index 0000000..eb86ef0 --- /dev/null +++ b/.rh-php73-php-pecl-apcu.metadata @@ -0,0 +1 @@ +41c87ed7518062271ef355ea6c795c9a3d12950a SOURCES/apcu-5.1.17.tgz diff --git a/SOURCES/apcu.ini b/SOURCES/apcu.ini new file mode 100644 index 0000000..ed8dd16 --- /dev/null +++ b/SOURCES/apcu.ini @@ -0,0 +1,63 @@ +; Enable APCu extension module +extension = apcu.so + +; This can be set to 0 to disable APCu +apc.enabled=1 + +; Setting this enables APCu for the CLI version of PHP +; (Mostly for testing and debugging). +;apc.enable_cli=0 + +; Sets the path to text files containing caches to load from disk upon +; initialization of APCu. preload_path should be a directory where each +; file follows $key.data where $key should be used as the entry name +; and the contents of the file contains serialized data to use as the value +; of the entry. +;apc.preload_path= + +; The size of each shared memory segment, with M/G suffixe +;apc.shm_size=32M + +; The number of seconds a cache entry is allowed to idle in a slot in case +; this cache entry slot is needed by another entry. +;apc.ttl=0 + +; The number of seconds that a cache entry may remain on the +; garbage-collection list. +;apc.gc_ttl=3600 + +; If you begin to get low on resources, an expunge of the cache +; is performed if it is less than half full. This is not always +; a suitable way of determining if an expunge of the cache +; should be per apc.smart allows you to set a runtime configuration +; value which is used to determine if an expunge should be run +; if (available_size < apc.smart * requested_size) +;apc.smart=0 + +; A "hint" about the number variables expected in the cache. +; Set to zero or omit if you are not sure; +;apc.entries_hint=4096 + +; The mktemp-style file_mask to pass to the mmap module +apc.mmap_file_mask=/tmp/apc.XXXXXX + +; On very busy servers whenever you start the server or +; modify files you can create a race of many processes +; all trying to cache the same data at the same time. +; By default, APCu attempts to prevent "slamming" of a key. +; A key is considered "slammed" if it was the last key set, +; and a context other than the current one set it ( ie. it +; was set by another process or thread ) +;apc.slam_defense=0 + +; Defines which serializer should be used +; Default is the standard PHP serializer. +;apc.serializer='php' + +; use the SAPI request start time for TTL +;apc.use_request_time=1 + +; Enables APCu handling of signals, such as SIGSEGV, that write core files +; when signaled. APCu will attempt to unmap the shared memory segment in +; order to exclude it from the core file +;apc.coredump_unmap=0 diff --git a/SPECS/php-pecl-apcu.spec b/SPECS/php-pecl-apcu.spec new file mode 100644 index 0000000..3b7e72f --- /dev/null +++ b/SPECS/php-pecl-apcu.spec @@ -0,0 +1,255 @@ +# RHSCL spec file for rh-php73-php-pecl-apcu, from: +# +# centos/sclo spec file for sclo-php70-php-pecl-apcu, from: +# +# remirepo spec file for php-pecl-apcu +# with SCL compatibility, from: +# +# Fedora spec file for php-pecl-apcu +# +# Copyright (c) 2013-2019 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# +%if 0%{?scl:1} +%scl_package php-pecl-apcu +%else +%global pkg_name %{name} +%endif + +%global pecl_name apcu +%global ini_name 40-%{pecl_name}.ini + +Name: %{?scl_prefix}php-pecl-apcu +Summary: APC User Cache +Version: 5.1.17 +Release: 1%{?dist} +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Source1: %{pecl_name}.ini + +License: PHP +Group: Development/Languages +URL: http://pecl.php.net/package/APCu + +BuildRequires: %{?scl_prefix}php-devel > 7 +BuildRequires: %{?scl_prefix}php-pear +BuildRequires: pcre-devel + +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}php(api) = %{php_core_api} + +Provides: %{?scl_prefix}php-apcu = %{version} +Provides: %{?scl_prefix}php-apcu%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl(apcu) = %{version} +Provides: %{?scl_prefix}php-pecl(apcu)%{?_isa} = %{version} + + +%description +APCu is userland caching: APC stripped of opcode caching. + +APCu only supports userland caching of variables. + + +%package devel +Summary: APCu developer files (header) +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{?scl_prefix}php-devel%{?_isa} + +%description devel +These are the files needed to compile programs using APCu. + + +%prep +%setup -qc +mv %{pecl_name}-%{version} NTS + +cd NTS + +# Sanity check, really often broken +extver=$(sed -n '/#define PHP_APCU_VERSION/{s/.* "//;s/".*$//;p}' php_apc.h) +if test "x${extver}" != "x%{version}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}. + exit 1 +fi +cd .. + + +%build +cd NTS +%{_bindir}/phpize +%configure --with-php-config=%{_bindir}/php-config +make %{?_smp_mflags} + + +%install +# Install the NTS stuff +make -C NTS install INSTALL_ROOT=%{buildroot} +install -D -m 644 %{SOURCE1} %{buildroot}%{php_inidir}/%{ini_name} + +# Install the package XML file +install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml + +# Test & Documentation +cd NTS +for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') +do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i +done +for i in apc.php $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') +do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +done + + +%check +cd NTS + +%{_bindir}/php -n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so -m | grep 'apcu' + +# Upstream test suite for NTS extension +TEST_PHP_EXECUTABLE=%{_bindir}/php \ +TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{_bindir}/php -n run-tests.php --show-diff + + +# when pear installed alone, after us +%triggerin -- %{?scl_prefix}php-pear +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi + +# posttrans as pear can be installed after us +%posttrans +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi + +%postun +if [ $1 -eq 0 -a -x %{__pecl} ] ; then + %{pecl_uninstall} %{pecl_name} >/dev/null || : +fi + + +%files +%doc %{pecl_docdir}/%{pecl_name} +%{pecl_xmldir}/%{name}.xml + +%config(noreplace) %{php_inidir}/%{ini_name} +%{php_extdir}/%{pecl_name}.so + + +%files devel +%doc %{pecl_testdir}/%{pecl_name} +%{php_incldir}/ext/%{pecl_name} + + +%changelog +* Fri Jul 12 2019 Remi Collet - 5.1.17-1 +- update to 5.1.17 + +* Tue Jul 10 2018 Remi Collet - 5.1.12-1 +- update to 5.1.12 + +* Tue Aug 8 2017 Remi Collet - 5.1.8-1 +- cleaup for rh-php71 in RHSCL #1398827 + +* Fri Jan 20 2017 Remi Collet - 5.1.8-1 +- update to 5.1.8 for PHP 7 + +* Thu Nov 3 2016 Remi Collet - 5.1.7-1 +- update to 5.1.7 for PHP 7 + +* Mon Jan 18 2016 Remi Collet - 4.0.10-1 +- cleanup for SCLo build + +* Mon Dec 7 2015 Remi Collet - 4.0.10-1 +- Update to 4.0.10 (stable) + +* Fri Nov 20 2015 Remi Collet - 4.0.8-1 +- Update to 4.0.8 (stable) + +* Fri Nov 20 2015 Remi Collet - 4.0.8-0.1.20151120git0911f48 +- test build for upcoming 4.0.8 +- sources from github + +* Fri Jun 19 2015 Remi Collet - 4.0.7-3 +- allow build against rh-php56 (as more-php56) + +* Tue Jun 9 2015 Remi Collet - 4.0.7-2 +- upstream fix for the control panel +- drop runtime dependency on pear, new scriptlets + +* Wed Dec 24 2014 Remi Collet - 4.0.7-1.1 +- Fedora 21 SCL mass rebuild + +* Sat Oct 11 2014 Remi Collet - 4.0.7-1 +- Update to 4.0.7 + +* Sun Aug 24 2014 Remi Collet - 4.0.6-2 +- improve SCL stuff + +* Thu Jun 12 2014 Remi Collet - 4.0.6-1 +- Update to 4.0.6 (beta) + +* Wed Jun 11 2014 Remi Collet - 4.0.5-1 +- Update to 4.0.5 (beta) +- open https://github.com/krakjoe/apcu/pull/74 (PHP 5.4) + +* Sun Jun 8 2014 Remi Collet - 4.0.4-3 +- add build patch for php 5.6.0beta4 + +* Wed Apr 9 2014 Remi Collet - 4.0.4-2 +- add numerical prefix to extension configuration file + +* Sat Mar 01 2014 Remi Collet - 4.0.4-1 +- Update to 4.0.4 (beta) + +* Mon Jan 27 2014 Remi Collet - 4.0.3-1 +- Update to 4.0.3 (beta) +- install doc in pecl doc_dir +- install tests in pecl test_dir (in devel) +- drop panel sub-package in SCL +- add SCL stuff + +* Mon Sep 16 2013 Remi Collet - 4.0.2-2 +- fix perm on config dir +- always provides php-pecl-apc-devel and apc-panel + +* Mon Sep 16 2013 Remi Collet - 4.0.2-1 +- Update to 4.0.2 + +* Fri Aug 30 2013 Remi Collet - 4.0.1-3 +- rebuild to have NEVR > EPEL (or Fedora) + +* Thu Jul 4 2013 Remi Collet - 4.0.1-2 +- obsoletes APC with php 5.5 +- restore APC serializers ABI (patch merged upstream) + +* Tue Apr 30 2013 Remi Collet - 4.0.1-1 +- Update to 4.0.1 +- add missing scriptlet +- fix Conflicts + +* Thu Apr 25 2013 Remi Collet - 4.0.0-2 +- fix segfault when used from command line + +* Wed Mar 27 2013 Remi Collet - 4.0.0-1 +- first pecl release +- rename from php-apcu to php-pecl-apcu + +* Tue Mar 26 2013 Remi Collet - 4.0.0-0.4.git4322fad +- new snapshot (test before release) + +* Mon Mar 25 2013 Remi Collet - 4.0.0-0.3.git647cb2b +- new snapshot with our pull request +- allow to run test suite simultaneously on 32/64 arch +- build warning free + +* Mon Mar 25 2013 Remi Collet - 4.0.0-0.2.git6d20302 +- new snapshot with full APC compatibility + +* Sat Mar 23 2013 Remi Collet - 4.0.0-0.1.git44e8dd4 +- initial package, version 4.0.0