summaryrefslogtreecommitdiffstats
path: root/php-pecl-apcu.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-apcu.spec')
-rw-r--r--php-pecl-apcu.spec234
1 files changed, 106 insertions, 128 deletions
diff --git a/php-pecl-apcu.spec b/php-pecl-apcu.spec
index a17ff5e..0d4dc89 100644
--- a/php-pecl-apcu.spec
+++ b/php-pecl-apcu.spec
@@ -3,8 +3,8 @@
#
# Fedora spec file for php-pecl-apcu
#
-# Copyright (c) 2013-2020 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2013-2024 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
@@ -13,94 +13,44 @@
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-apcu
-%endif
+%{?scl:%scl_package php-pecl-apcu}
+
+%bcond_without tests
%global gh_commit b771cd50a7fe519b6aaccbe5dc97594e68e0c88f
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner krakjoe
%global gh_project apcu
-#global gh_date 20161018
%global pecl_name apcu
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
-Name: %{?sub_prefix}php-pecl-apcu
+Name: %{?scl_prefix}php-pecl-apcu
Summary: APC User Cache
-Version: 5.1.18
-License: PHP
+Version: 5.1.24
+License: PHP-3.01
URL: https://pecl.php.net/package/APCu
-%if 0%{?gh_date:1}
-Release: 0.7.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
-%else
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-%endif
-Source1: %{pecl_name}-5.1.2.ini
+Source1: %{pecl_name}-5.1.19.ini
Source2: %{pecl_name}-panel.conf
Source3: %{pecl_name}.conf.php
-Patch0: %{pecl_name}-upstream.patch
-
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Obsoletes: %{?scl_prefix}php-apcu < 4.0.0-1
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}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-apcu = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-apcu%{?_isa} = %{version}-%{release}
-%endif
-
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-Obsoletes: php53-pecl-%{pecl_name} <= %{version}
-Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
%description
@@ -108,7 +58,7 @@ APCu is userland caching: APC stripped of opcode caching.
APCu only supports userland caching of variables.
-The %{?sub_prefix}php-pecl-apcu-bc package provides a drop
+The %{?scl_prefix}php-pecl-apcu-bc package provides a drop
in replacement for APC.
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -122,10 +72,6 @@ Requires: %{?scl_prefix}php-devel%{?_isa}
Obsoletes: %{?scl_prefix}php-pecl-apc-devel < 4
Provides: %{?scl_prefix}php-pecl-apc-devel = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-apc-devel%{?_isa} = %{version}-%{release}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-apcu-devel = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-apcu-devel%{?_isa} = %{version}-%{release}
-%endif
%description devel
These are the files needed to compile programs using APCu.
@@ -151,35 +97,26 @@ configuration, available on http://localhost/apcu-panel/
%prep
%setup -qc
-%if 0%{?gh_date:1}
-mv %{gh_project}-%{gh_commit} NTS
-mv NTS/package.xml .
-%else
-mv %{pecl_name}-%{version} NTS
-%endif
-
-%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
-
-cd NTS
-%patch0 -p1 -b .up
+sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
+cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_APCU_VERSION/{s/.* "//;s/".*$//;p}' php_apc.h)
-if test "x${extver}" != "x%{version}%{?prever}%{?gh_date:-dev}"; then
- : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}%{?gh_date:-dev}.
+if test "x${extver}" != "x%{version}%{?prever}"; then
+ : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}.
exit 1
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
%if 0%{!?scl:1}
# Fix path to configuration file
sed -e s:apc.conf.php:%{_sysconfdir}/apcu-panel/conf.php:g \
- -i NTS/apc.php
+ -i %{sources}/apc.php
%else
# Provide the control panel as doc
sed -e '/"apc.php"/s/role="src"/role="doc"/' -i package.xml
@@ -188,20 +125,23 @@ sed -e '/"apc.php"/s/role="src"/role="doc"/' -i package.xml
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
+
+cd ../NTS
%configure \
--enable-apcu \
- --with-php-config=%{_bindir}/php-config
-make %{?_smp_mflags}
+ --with-php-config=%{__phpconfig}
+%make_build
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--enable-apcu \
- --with-php-config=%{_bindir}/zts-php-config
-make %{?_smp_mflags}
+ --with-php-config=%{__ztsphpconfig}
+%make_build
%endif
@@ -209,12 +149,12 @@ make %{?_smp_mflags}
%{?dtsenable}
# Install the NTS stuff
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
install -D -m 644 %{SOURCE1} %{buildroot}%{php_inidir}/%{ini_name}
%if %{with_zts}
# Install the ZTS stuff
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{SOURCE1} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -224,7 +164,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if 0%{!?scl:1}
# Install the Control Panel
# Pages
-install -D -m 644 -p NTS/apc.php \
+install -D -m 644 -p %{sources}/apc.php \
%{buildroot}%{_datadir}/apcu-panel/index.php
# Apache config
install -D -m 644 -p %{SOURCE2} \
@@ -236,7 +176,7 @@ install -D -m 644 -p %{SOURCE3} \
# Test & Documentation
-cd NTS
+cd %{sources}
for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do [ -f $i ] && install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
[ -f tests/$i ] && install -Dpm 644 tests/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/$i
@@ -247,59 +187,37 @@ done
%check
-%if "%{php_version}" > "8.0"
-rm ?TS/tests/not_enough_shm.phpt
-%endif
+cd %{sources}
-cd NTS
%{_bindir}/php -n \
-d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- -m | grep 'apcu'
+ -m | grep '^apcu$'
+%if %{with tests}
# Upstream test suite for NTS extension
-TEST_PHP_EXECUTABLE=%{_bindir}/php \
+TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
-NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{_bindir}/php -n run-tests.php --show-diff
+%{__php} -n run-tests.php -q --show-diff
+%endif
%if %{with_zts}
-cd ../ZTS
%{__ztsphp} -n \
-d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- -m | grep 'apcu'
+ -m | grep '^apcu$'
+%if %{with tests}
# Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
-NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php --show-diff
+%{__ztsphp} -n run-tests.php -q --show-diff
%endif
-
-
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# 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
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -332,6 +250,66 @@ fi
%changelog
+* Tue Sep 24 2024 Remi Collet <remi@remirepo.net> - 5.1.24-2
+- rebuild for 8.4.0RC1
+
+* Mon Sep 23 2024 Remi Collet <remi@remirepo.net> - 5.1.24-1
+- update to 5.1.24
+
+* Thu Jul 4 2024 Remi Collet <remi@remirepo.net> - 5.1.23-2
+- skip 1 test with 8.4
+
+* Sun Nov 12 2023 Remi Collet <remi@remirepo.net> - 5.1.23-1
+- update to 5.1.23
+
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 5.1.22-3
+- rebuild for PHP 8.3.0RC1
+
+* Tue Jun 6 2023 Remi Collet <remi@remirepo.net> - 5.1.22-2
+- build out of sources tree
+- add upstream patch for 8.3
+- add patch for tests when build out of sources tree from
+ https://github.com/krakjoe/apcu/pull/490
+
+* Mon Sep 19 2022 Remi Collet <remi@remirepo.net> - 5.1.22-1
+- update to 5.1.22
+
+* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 5.1.21-3
+- rebuild for PHP 8.2.0RC1
+
+* Thu Aug 18 2022 Remi Collet <remi@remirepo.net> - 5.1.21-2
+- add upstream patches for PHP 8.2
+
+* Thu Oct 7 2021 Remi Collet <remi@remirepo.net> - 5.1.21-1
+- update to 5.1.21
+
+* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 5.1.20-5
+- rebuild for 8.1.0RC1
+
+* Fri Jul 23 2021 Remi Collet <remi@remirepo.net> - 5.1.20-4
+- add upstream patch for PHP 8.1.0beta1
+
+* Wed Jul 7 2021 Remi Collet <remi@remirepo.net> - 5.1.20-3
+- add upstream patch for test suite with PHP 8.1
+
+* Thu Jun 10 2021 Remi Collet <remi@remirepo.net> - 5.1.20-2
+- temporarily ignore 3 tests with PHP 8.1
+
+* Thu Mar 4 2021 Remi Collet <remi@remirepo.net> - 5.1.20-1
+- update to 5.1.20
+
+* Mon Oct 5 2020 Remi Collet <remi@remirepo.net> - 5.1.19-1
+- update to 5.1.19
+
+* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 5.1.18-7
+- rebuild for PHP 8.0.0RC1
+
+* Wed Sep 23 2020 Remi Collet <remi@remirepo.net> - 5.1.18-6
+- rebuild for PHP 8.0.0beta4
+
+* Wed Sep 2 2020 Remi Collet <remi@remirepo.net> - 5.1.18-5
+- more upstream patches
+
* Wed Sep 2 2020 Remi Collet <remi@remirepo.net> - 5.1.18-4
- rebuild for PHP 8.0.0beta3