summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-03-06 08:11:31 +0100
committerRemi Collet <remi@remirepo.net>2018-03-06 08:11:31 +0100
commitfd64ee8559d12e886afa45ec30ab1fe318758e4e (patch)
treeaa5f1de4233dfb8f7d1384b8e948a72cbacb7430
parent7ebb92b84186036b796871343111557e28b73e6b (diff)
cleanup for Fedora review
-rw-r--r--php-pecl-psr.spec83
1 files changed, 21 insertions, 62 deletions
diff --git a/php-pecl-psr.spec b/php-pecl-psr.spec
index d8ca903..f956da0 100644
--- a/php-pecl-psr.spec
+++ b/php-pecl-psr.spec
@@ -1,3 +1,6 @@
+# Fedora spec file for php-pecl-psr
+# without SCL compatibility, from
+#
# remirepo spec file for php-pecl-psr
#
# Copyright (c) 2017-2018 Remi Collet
@@ -10,11 +13,6 @@
# 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-psr
-%endif
-
%global pecl_name psr
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global with_tests 0%{!?_without_tests:1}
@@ -27,55 +25,24 @@
#global upstream_prever RC4
Summary: PSR interfaces
-Name: %{?sub_prefix}php-pecl-psr
+Name: php-pecl-psr
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}
Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
License: PHP
URL: http://pecl.php.net/package/psr
-BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel
-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}}
-
-Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
-Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
+BuildRequires: gcc
+BuildRequires: php-devel >= 5.4
+BuildRequires: php-pear
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "5.6"
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.0"
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%endif
-%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
-%endif
+Requires: php(zend-abi) = %{php_zend_api}
+Requires: php(api) = %{php_core_api}
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter private shared object
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
+Provides: php-%{pecl_name} = %{version}
+Provides: php-%{pecl_name}%{?_isa} = %{version}
+Provides: php-pecl(%{pecl_name}) = %{version}
+Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
%description
@@ -84,17 +51,11 @@ so they can be used in an extension.
See http://www.php-fig.org/psr/
-Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
-
%package devel
Summary: %{name} developer files (header)
Requires: %{name}%{?_isa} = %{version}-%{release}
-Requires: %{?scl_prefix}php-devel%{?_isa}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}-devel = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}-devel%{?_isa} = %{version}-%{release}
-%endif
+Requires: php-devel%{?_isa}
%description devel
These are the files needed to compile programs using %{name}.
@@ -105,10 +66,9 @@ These are the files needed to compile programs using %{name}.
# rename source folder
mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
-%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
+sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
cd NTS
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PSR_VERSION/{s/.* "//;s/".*$//;p}' php_psr.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -130,8 +90,6 @@ EOF
%build
-%{?dtsenable}
-
cd NTS
%{_bindir}/phpize
%configure \
@@ -150,8 +108,6 @@ make %{?_smp_mflags}
%install
-%{?dtsenable}
-
# Install the NTS stuff
make -C NTS install INSTALL_ROOT=%{buildroot}
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -212,7 +168,7 @@ REPORT_EXIT_STATUS=1 \
%if 0%{?fedora} < 24 && 0%{?rhel} < 8
# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
+%triggerin -- php-pear
if [ -x %{__pecl} ] ; then
%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
fi
@@ -231,7 +187,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE.md}
+%license NTS/LICENSE.md
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -255,6 +211,9 @@ fi
%changelog
* Tue Mar 6 2018 Remi Collet <remi@remirepo.net> - 0.4.0-1
+- cleanup for Fedora review
+
+* Tue Mar 6 2018 Remi Collet <remi@remirepo.net> - 0.4.0-1
- Update to 0.4.0
* Fri Feb 9 2018 Remi Collet <remi@remirepo.net> - 0.3.0-1