summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-06-28 10:38:57 +0200
committerRemi Collet <remi@remirepo.net>2021-06-28 10:38:57 +0200
commiteee2ddbfb8896ae6d5d659f9dd34e7037ff01728 (patch)
treee7de0175334206f9e703642b5a1b69290e58b5a9
parentea0041737bfe4b0083dbbe5db4300b50e07128ba (diff)
cleanup for Fedorafedora
-rw-r--r--php-pecl-var-representation.spec87
1 files changed, 20 insertions, 67 deletions
diff --git a/php-pecl-var-representation.spec b/php-pecl-var-representation.spec
index 032d2c6..e5ae5fe 100644
--- a/php-pecl-var-representation.spec
+++ b/php-pecl-var-representation.spec
@@ -1,3 +1,6 @@
+# Fedora spec file for php-pecl-var-representation
+# without SCL compatibility from
+#
# remirepo spec file for php-pecl-var-representation
#
# Copyright (c) 2021 Remi Collet
@@ -10,10 +13,6 @@
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
-%if 0%{?scl:1}
-%scl_package php-pecl-var-representation
-%endif
-
%bcond_without tests
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name var_representation
@@ -23,54 +22,35 @@
#global upstream_prever RC1
Summary: var_representation extension
-Name: %{?scl_prefix}php-pecl-var-representation
+Name: php-pecl-var-representation
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}
License: BSD
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
BuildRequires: make
-BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel >= 7.2
-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}
-# Notice pecl_name != name
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+BuildRequires: gcc
+BuildRequires: php-devel >= 7.2
+BuildRequires: php-pear
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
+Requires: php(zend-abi) = %{php_zend_api}
+Requires: php(api) = %{php_core_api}
+
+Provides: php-%{pecl_name} = %{version}
+Provides: php-%{pecl_name}%{?_isa} = %{version}
+Provides: php-pecl(%{pecl_name}) = %{version}
+Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
+# Notice pecl_name != name
+Provides: php-pecl-%{pecl_name} = %{version}-%{release}
+Provides: php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%description
var_representation is a compact alternative to var_export that
properly escapes control characters.
-Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
-
%prep
%setup -qc
@@ -78,11 +58,10 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/COPYING/s/role="doc"/role="src"/' } \
+ -e '/COPYING/s/role="doc"/role="src"/' \
-i package.xml
cd NTS
-
# Check version as upstream often forget to update this
extver=$(sed -n '/define PHP_VAR_REPRESENTATION_VERSION/{s/.* "//;s/".*$//;p}' php_var_representation.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}"; then
@@ -105,8 +84,6 @@ EOF
%build
-%{?dtsenable}
-
peclconf() {
%configure \
--with-var_representation \
@@ -127,8 +104,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}
@@ -159,7 +134,6 @@ done
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
-
%endif
%if %{with tests}
@@ -167,33 +141,12 @@ cd NTS
: Run upstream test suite
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
%{__php} -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/COPYING}
+%license NTS/COPYING
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml