# we don't want -z defs linker flag %undefine _strict_symbol_defs_build %bcond_without tests %global pecl_name oauth %global with_zts 0%{?__ztsphp:1} %global ini_name 40-%{pecl_name}.ini Name: php-pecl-oauth Version: 2.0.7 Release: 9%{?dist} Summary: PHP OAuth consumer extension License: BSD URL: https://pecl.php.net/package/oauth Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz Patch0: %{pecl_name}-pcre.patch Patch1: %{pecl_name}-php82.patch BuildRequires: make BuildRequires: gcc BuildRequires: php-devel > 7 BuildRequires: php-pear %if %{with tests} BuildRequires: php-posix %endif BuildRequires: libcurl-devel Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} Provides: php-pecl(%{pecl_name}) = %{version} Provides: php-pecl(%{pecl_name})%{_isa} = %{version} Provides: php-%{pecl_name} = %{version} Provides: php-%{pecl_name}%{_isa} = %{version} %description OAuth is an authorization protocol built on top of HTTP which allows applications to securely access data without having to store user names and passwords. %prep %setup -q -c mv %{pecl_name}-%{version} NTS # Don't install/register tests sed -e 's/role="test"/role="src"/' \ -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml cd NTS %patch0 -p1 -b .up %patch1 -p1 -b .pr24 # Sanity check, really often broken extver=$(sed -n '/#define PHP_OAUTH_VERSION/{s/.* //;s/".*$//;p}' php_oauth.h) if test "x${extver}" != "x%{version}"; then : Error: Upstream extension version is ${extver}, expecting %{version}. exit 1 fi cd .. cat >%{ini_name} << 'EOF' ; Enable %{pecl_name} extension module extension=%{pecl_name}.so EOF %if %{with_zts} # duplicate for ZTS build cp -pr NTS ZTS %endif %build cd NTS %{_bindir}/phpize %configure --with-php-config=%{_bindir}/php-config make %{?_smp_mflags} %if %{with_zts} cd ../ZTS %{_bindir}/zts-phpize %configure --with-php-config=%{_bindir}/zts-php-config make %{?_smp_mflags} %endif %install make install -C NTS INSTALL_ROOT=%{buildroot} # Drop in the bit of configuration install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} # Install XML package description install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} make install -C ZTS INSTALL_ROOT=%{buildroot} install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Test & Documentation cd NTS for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done %check : Minimal load test for NTS extension %{__php} -n \ -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep OAuth %if %{with tests} cd NTS : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=posix.so -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php --show-diff %endif %if %{with_zts} : Minimal load test for ZTS extension %{__ztsphp} -n \ -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep OAuth %endif %files %license NTS/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{_sysconfdir}/php.d/%{ini_name} %{php_extdir}/%{pecl_name}.so %if %{with_zts} %config(noreplace) %{php_ztsinidir}/%{ini_name} %{php_ztsextdir}/%{pecl_name}.so %endif %changelog * Wed Oct 05 2022 Remi Collet - 2.0.7-9 - rebuild for https://fedoraproject.org/wiki/Changes/php82 * Tue Sep 20 2022 Remi Collet - 2.0.7-8 - drop unneeded build dependency on pcre #2128353 - add patch for PHP 8.2 from https://github.com/php/pecl-web_services-oauth/pull/24 * Fri Jul 22 2022 Fedora Release Engineering - 2.0.7-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jan 21 2022 Fedora Release Engineering - 2.0.7-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Oct 28 2021 Remi Collet - 2.0.7-5 - rebuild for https://fedoraproject.org/wiki/Changes/php81 * Fri Jul 23 2021 Fedora Release Engineering - 2.0.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Mar 4 2021 Remi Collet - 2.0.7-3 - rebuild for https://fedoraproject.org/wiki/Changes/php80 * Wed Jan 27 2021 Fedora Release Engineering - 2.0.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Sep 18 2020 Remi Collet - 2.0.7-1 - update to 2.0.7 - enable test suite * Wed Sep 9 2020 Remi Collet - 2.0.6-1 - update to 2.0.6 * Tue Jul 28 2020 Fedora Release Engineering - 2.0.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu Feb 6 2020 Remi Collet - 2.0.5-1 - update to 2.0.5 * Thu Jan 30 2020 Fedora Release Engineering - 2.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Mon Dec 2 2019 Remi Collet - 2.0.4-1 - update to 2.0.4 * Thu Oct 03 2019 Remi Collet - 2.0.3-4 - rebuild for https://fedoraproject.org/wiki/Changes/php74 - add upstream patch for 7.4 * Fri Jul 26 2019 Fedora Release Engineering - 2.0.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 2.0.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Thu Oct 11 2018 Remi Collet - 2.0.3-1 - Rebuild for https://fedoraproject.org/wiki/Changes/php73 - update to 2.0.3 * Fri Jul 13 2018 Fedora Release Engineering - 2.0.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Feb 09 2018 Fedora Release Engineering - 2.0.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Mon Jan 29 2018 Remi Collet - 2.0.2-7 - undefine _strict_symbol_defs_build * Tue Oct 03 2017 Remi Collet - 2.0.2-6 - rebuild for https://fedoraproject.org/wiki/Changes/php72 * Thu Aug 03 2017 Fedora Release Engineering - 2.0.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 2.0.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 2.0.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Nov 14 2016 Remi Collet - 2.0.2-2 - rebuild for https://fedoraproject.org/wiki/Changes/php71 * Mon Jun 27 2016 Remi Collet - 2.0.2-1 - update to 2.0.2 - fix license installation * Thu Feb 25 2016 Remi Collet - 1.2.3-11 - drop scriptlets (replaced by file triggers in php-pear) #1310546 * Thu Feb 04 2016 Fedora Release Engineering - 1.2.3-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 1.2.3-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Mon Sep 8 2014 Remi Collet - 1.2.3-8 - cleanup and modernize the spec - build ZTS extension (fedora) - install doc in pecl_docdir * Sun Aug 17 2014 Fedora Release Engineering - 1.2.3-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Thu Jun 19 2014 Remi Collet - 1.2.3-6 - rebuild for https://fedoraproject.org/wiki/Changes/Php56 - add numerical prefix to extension configuration file * Sat Jun 07 2014 Fedora Release Engineering - 1.2.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 1.2.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Mar 22 2013 Remi Collet - 1.2.3-3 - rebuild for http://fedoraproject.org/wiki/Features/Php55 * Thu Feb 14 2013 Fedora Release Engineering - 1.2.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Oct 02 2012 F. Kooman - 1.2.3-1 - update to 1.2.3, bugfix, see http://pecl.php.net/package-changelog.php?package=oauth&release=1.2.3 * Sat Jul 21 2012 Fedora Release Engineering - 1.2.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Jan 19 2012 Remi Collet - 1.2.2-3 - build against php 5.4 - fix filters * Sat Jan 14 2012 Fedora Release Engineering - 1.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Sun Jul 24 2011 F. Kooman - 1.2.2-1 - Update to 1.2.2 (really fix RHBZ #724872 this time) * Fri Jul 22 2011 F. Kooman - 1.2.1-1 - update to 1.2.1 (RHBZ #724872). See http://pecl.php.net/package-changelog.php?package=oauth&release=1.2.1 * Sun Jul 03 2011 F. Kooman - 1.2-1 - upgrade to 1.2 * Sun Jun 19 2011 F. Kooman - 1.1.0-6 - add fix for http://pecl.php.net/bugs/bug.php?id=22337 * Mon Jun 13 2011 F. Kooman - 1.1.0-5 - remove php_apiver marco, was not used * Mon Jun 13 2011 F. Kooman - 1.1.0-4 - add minimal check to see if module loads - fix private-shared-object-provides rpmlint warning * Sat Jun 11 2011 F. Kooman - 1.1.0-3 - BR pcre-devel * Sat May 28 2011 F. Kooman - 1.1.0-2 - require libcurl for cURL request engine support * Sat May 28 2011 F. Kooman - 1.1.0-1 - initial package