Blame SPECS/php-pecl-apcu.spec

5a78a7
# RHSCL spec file for rh-php72-php-pecl-apcu, from:
5a78a7
#
5a78a7
# centos/sclo spec file for sclo-php70-php-pecl-apcu, from:
5a78a7
#
5a78a7
# remirepo spec file for php-pecl-apcu
5a78a7
# with SCL compatibility, from:
5a78a7
#
5a78a7
# Fedora spec file for php-pecl-apcu
5a78a7
#
5a78a7
# Copyright (c) 2013-2017 Remi Collet
5a78a7
# License: CC-BY-SA
5a78a7
# http://creativecommons.org/licenses/by-sa/4.0/
5a78a7
#
5a78a7
# Please, preserve the changelog entries
5a78a7
#
5a78a7
%if 0%{?scl:1}
5a78a7
%scl_package        php-pecl-apcu
5a78a7
%else
5a78a7
%global pkg_name    %{name}
5a78a7
%endif
5a78a7
5a78a7
%global pecl_name  apcu
5a78a7
%global ini_name   40-%{pecl_name}.ini
5a78a7
5a78a7
Name:           %{?scl_prefix}php-pecl-apcu
5a78a7
Summary:        APC User Cache
5a78a7
Version:        5.1.12
5a78a7
Release:        1%{?dist}
5a78a7
Source0:        http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
5a78a7
Source1:        %{pecl_name}.ini
5a78a7
5a78a7
License:        PHP
5a78a7
Group:          Development/Languages
5a78a7
URL:            http://pecl.php.net/package/APCu
5a78a7
5a78a7
BuildRequires:  %{?scl_prefix}php-devel > 7
5a78a7
BuildRequires:  %{?scl_prefix}php-pear
5a78a7
BuildRequires:  pcre-devel
5a78a7
5a78a7
Requires:       %{?scl_prefix}php(zend-abi) = %{php_zend_api}
5a78a7
Requires:       %{?scl_prefix}php(api) = %{php_core_api}
5a78a7
5a78a7
Provides:       %{?scl_prefix}php-apcu = %{version}
5a78a7
Provides:       %{?scl_prefix}php-apcu%{?_isa} = %{version}
5a78a7
Provides:       %{?scl_prefix}php-pecl(apcu) = %{version}
5a78a7
Provides:       %{?scl_prefix}php-pecl(apcu)%{?_isa} = %{version}
5a78a7
5a78a7
5a78a7
%description
5a78a7
APCu is userland caching: APC stripped of opcode caching.
5a78a7
5a78a7
APCu only supports userland caching of variables.
5a78a7
5a78a7
5a78a7
%package devel
5a78a7
Summary:       APCu developer files (header)
5a78a7
Group:         Development/Libraries
5a78a7
Requires:      %{name}%{?_isa} = %{version}-%{release}
5a78a7
Requires:      %{?scl_prefix}php-devel%{?_isa}
5a78a7
5a78a7
%description devel
5a78a7
These are the files needed to compile programs using APCu.
5a78a7
5a78a7
5a78a7
%prep
5a78a7
%setup -qc
5a78a7
mv %{pecl_name}-%{version} NTS
5a78a7
5a78a7
cd NTS
5a78a7
5a78a7
# Sanity check, really often broken
5a78a7
extver=$(sed -n '/#define PHP_APCU_VERSION/{s/.* "//;s/".*$//;p}' php_apc.h)
5a78a7
if test "x${extver}" != "x%{version}"; then
5a78a7
   : Error: Upstream extension version is ${extver}, expecting %{version}.
5a78a7
   exit 1
5a78a7
fi
5a78a7
cd ..
5a78a7
5a78a7
5a78a7
%build
5a78a7
cd NTS
5a78a7
%{_bindir}/phpize
5a78a7
%configure --with-php-config=%{_bindir}/php-config
5a78a7
make %{?_smp_mflags}
5a78a7
5a78a7
5a78a7
%install
5a78a7
# Install the NTS stuff
5a78a7
make -C NTS install INSTALL_ROOT=%{buildroot}
5a78a7
install -D -m 644 %{SOURCE1} %{buildroot}%{php_inidir}/%{ini_name}
5a78a7
5a78a7
# Install the package XML file
5a78a7
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
5a78a7
5a78a7
# Test & Documentation
5a78a7
cd NTS
5a78a7
for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
5a78a7
do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
5a78a7
done
5a78a7
for i in apc.php $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
5a78a7
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
5a78a7
done
5a78a7
5a78a7
5a78a7
%check
5a78a7
cd NTS
5a78a7
5a78a7
%{_bindir}/php -n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so -m | grep 'apcu'
5a78a7
5a78a7
# Upstream test suite for NTS extension
5a78a7
TEST_PHP_EXECUTABLE=%{_bindir}/php \
5a78a7
TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
5a78a7
NO_INTERACTION=1 \
5a78a7
REPORT_EXIT_STATUS=1 \
5a78a7
%{_bindir}/php -n run-tests.php --show-diff
5a78a7
5a78a7
5a78a7
# when pear installed alone, after us
5a78a7
%triggerin -- %{?scl_prefix}php-pear
5a78a7
if [ -x %{__pecl} ] ; then
5a78a7
    %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
5a78a7
fi
5a78a7
5a78a7
# posttrans as pear can be installed after us
5a78a7
%posttrans
5a78a7
if [ -x %{__pecl} ] ; then
5a78a7
    %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
5a78a7
fi
5a78a7
5a78a7
%postun
5a78a7
if [ $1 -eq 0 -a -x %{__pecl} ] ; then
5a78a7
    %{pecl_uninstall} %{pecl_name} >/dev/null || :
5a78a7
fi
5a78a7
5a78a7
5a78a7
%files
5a78a7
%doc %{pecl_docdir}/%{pecl_name}
5a78a7
%{pecl_xmldir}/%{name}.xml
5a78a7
5a78a7
%config(noreplace) %{php_inidir}/%{ini_name}
5a78a7
%{php_extdir}/%{pecl_name}.so
5a78a7
5a78a7
5a78a7
%files devel
5a78a7
%doc %{pecl_testdir}/%{pecl_name}
5a78a7
%{php_incldir}/ext/%{pecl_name}
5a78a7
5a78a7
5a78a7
%changelog
5a78a7
* Tue Jul 10 2018 Remi Collet <rcollet@redhat.com> - 5.1.12-1
5a78a7
- update to 5.1.12
5a78a7
5a78a7
* Tue Aug  8 2017 Remi Collet <rcollet@redhat.com> - 5.1.8-1
5a78a7
- cleaup for rh-php71 in RHSCL #1398827
5a78a7
5a78a7
* Fri Jan 20 2017 Remi Collet <remi@remirepo.net> - 5.1.8-1
5a78a7
- update to 5.1.8 for PHP 7
5a78a7
5a78a7
* Thu Nov  3 2016 Remi Collet <remi@fedoraproject.org> - 5.1.7-1
5a78a7
- update to 5.1.7 for PHP 7
5a78a7
5a78a7
* Mon Jan 18 2016 Remi Collet <remi@fedoraproject.org> - 4.0.10-1
5a78a7
- cleanup for SCLo build
5a78a7
5a78a7
* Mon Dec  7 2015 Remi Collet <remi@fedoraproject.org> - 4.0.10-1
5a78a7
- Update to 4.0.10 (stable)
5a78a7
5a78a7
* Fri Nov 20 2015 Remi Collet <remi@fedoraproject.org> - 4.0.8-1
5a78a7
- Update to 4.0.8 (stable)
5a78a7
5a78a7
* Fri Nov 20 2015 Remi Collet <remi@fedoraproject.org> - 4.0.8-0.1.20151120git0911f48
5a78a7
- test build for upcoming 4.0.8
5a78a7
- sources from github
5a78a7
5a78a7
* Fri Jun 19 2015 Remi Collet <remi@fedoraproject.org> - 4.0.7-3
5a78a7
- allow build against rh-php56 (as more-php56)
5a78a7
5a78a7
* Tue Jun  9 2015 Remi Collet <remi@fedoraproject.org> - 4.0.7-2
5a78a7
- upstream fix for the control panel
5a78a7
- drop runtime dependency on pear, new scriptlets
5a78a7
5a78a7
* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 4.0.7-1.1
5a78a7
- Fedora 21 SCL mass rebuild
5a78a7
5a78a7
* Sat Oct 11 2014 Remi Collet <remi@fedoraproject.org> - 4.0.7-1
5a78a7
- Update to 4.0.7
5a78a7
5a78a7
* Sun Aug 24 2014 Remi Collet <remi@fedoraproject.org> - 4.0.6-2
5a78a7
- improve SCL stuff
5a78a7
5a78a7
* Thu Jun 12 2014 Remi Collet <remi@fedoraproject.org> - 4.0.6-1
5a78a7
- Update to 4.0.6 (beta)
5a78a7
5a78a7
* Wed Jun 11 2014 Remi Collet <remi@fedoraproject.org> - 4.0.5-1
5a78a7
- Update to 4.0.5 (beta)
5a78a7
- open https://github.com/krakjoe/apcu/pull/74 (PHP 5.4)
5a78a7
5a78a7
* Sun Jun  8 2014 Remi Collet <remi@fedoraproject.org> - 4.0.4-3
5a78a7
- add build patch for php 5.6.0beta4
5a78a7
5a78a7
* Wed Apr  9 2014 Remi Collet <remi@fedoraproject.org> - 4.0.4-2
5a78a7
- add numerical prefix to extension configuration file
5a78a7
5a78a7
* Sat Mar 01 2014 Remi Collet <remi@fedoraproject.org> - 4.0.4-1
5a78a7
- Update to 4.0.4 (beta)
5a78a7
5a78a7
* Mon Jan 27 2014 Remi Collet <remi@fedoraproject.org> - 4.0.3-1
5a78a7
- Update to 4.0.3 (beta)
5a78a7
- install doc in pecl doc_dir
5a78a7
- install tests in pecl test_dir (in devel)
5a78a7
- drop panel sub-package in SCL
5a78a7
- add SCL stuff
5a78a7
5a78a7
* Mon Sep 16 2013 Remi Collet <rcollet@redhat.com> - 4.0.2-2
5a78a7
- fix perm on config dir
5a78a7
- always provides php-pecl-apc-devel and apc-panel
5a78a7
5a78a7
* Mon Sep 16 2013 Remi Collet <remi@fedoraproject.org> - 4.0.2-1
5a78a7
- Update to 4.0.2
5a78a7
5a78a7
* Fri Aug 30 2013 Remi Collet <remi@fedoraproject.org> - 4.0.1-3
5a78a7
- rebuild to have NEVR > EPEL (or Fedora)
5a78a7
5a78a7
* Thu Jul  4 2013 Remi Collet <remi@fedoraproject.org> - 4.0.1-2
5a78a7
- obsoletes APC with php 5.5
5a78a7
- restore APC serializers ABI (patch merged upstream)
5a78a7
5a78a7
* Tue Apr 30 2013 Remi Collet <remi@fedoraproject.org> - 4.0.1-1
5a78a7
- Update to 4.0.1
5a78a7
- add missing scriptlet
5a78a7
- fix Conflicts
5a78a7
5a78a7
* Thu Apr 25 2013 Remi Collet <remi@fedoraproject.org> - 4.0.0-2
5a78a7
- fix segfault when used from command line
5a78a7
5a78a7
* Wed Mar 27 2013 Remi Collet <remi@fedoraproject.org> - 4.0.0-1
5a78a7
- first pecl release
5a78a7
- rename from php-apcu to php-pecl-apcu
5a78a7
5a78a7
* Tue Mar 26 2013 Remi Collet <remi@fedoraproject.org> - 4.0.0-0.4.git4322fad
5a78a7
- new snapshot (test before release)
5a78a7
5a78a7
* Mon Mar 25 2013 Remi Collet <remi@fedoraproject.org> - 4.0.0-0.3.git647cb2b
5a78a7
- new snapshot with our pull request
5a78a7
- allow to run test suite simultaneously on 32/64 arch
5a78a7
- build warning free
5a78a7
5a78a7
* Mon Mar 25 2013 Remi Collet <remi@fedoraproject.org> - 4.0.0-0.2.git6d20302
5a78a7
- new snapshot with full APC compatibility
5a78a7
5a78a7
* Sat Mar 23 2013 Remi Collet <remi@fedoraproject.org> - 4.0.0-0.1.git44e8dd4
5a78a7
- initial package, version 4.0.0