summaryrefslogtreecommitdiffstats
path: root/php-pecl-rpminfo.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-03-12 11:36:39 +0100
committerRemi Collet <remi@remirepo.net>2020-03-12 11:36:39 +0100
commit9533766ede66dbd6f986df9fc2f621f15f57214d (patch)
tree114e268ae4fd4a4d7f0a76e08236b9547437ba29 /php-pecl-rpminfo.spec
parent54e37d01eb311109667eb65672e0816ebf3caf13 (diff)
cleanup for Fedora review
Diffstat (limited to 'php-pecl-rpminfo.spec')
-rw-r--r--php-pecl-rpminfo.spec93
1 files changed, 17 insertions, 76 deletions
diff --git a/php-pecl-rpminfo.spec b/php-pecl-rpminfo.spec
index f5a3b2b..2008082 100644
--- a/php-pecl-rpminfo.spec
+++ b/php-pecl-rpminfo.spec
@@ -1,3 +1,6 @@
+# Fedora spec file for php-pecl-rpminfo
+# without SCL compatibility from:
+#
# remirepo spec file for php-pecl-rpminfo
#
# Copyright (c) 2018-2020 Remi Collet
@@ -10,63 +13,30 @@
# 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-rpminfo
-%else
-%global _root_prefix %{_prefix}
-%endif
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name rpminfo
%global ini_name 40-%{pecl_name}.ini
Summary: RPM information
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
+Name: php-pecl-%{pecl_name}
Version: 0.3.0
Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-BuildRequires: %{?dtsprefix}gcc
+BuildRequires: gcc
BuildRequires: pkgconfig(rpm) >= 4.11.3
-BuildRequires: %{?scl_prefix}php-devel > 7
-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: php-devel > 7
+BuildRequires: php-pear
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%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
-%endif
+Requires: php(zend-abi) = %{php_zend_api}
+Requires: php(api) = %{php_core_api}
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?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
@@ -78,21 +48,18 @@ Available functions:
- rpmdbinfo to rerieve information from an installed RPM
- rpmdbsearch to search installed RPMs
-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 -q -c
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
mv %{pecl_name}-%{version} NTS
cd NTS
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_RPMINFO_VERSION/{s/.* "//;s/".*$//;p}' php_rpminfo.h)
if test "x${extver}" != "x%{version}"; then
@@ -114,8 +81,6 @@ EOF
%build
-%{?dtsenable}
-
cd NTS
%{_bindir}/phpize
%configure \
@@ -136,10 +101,7 @@ make %{?_smp_mflags}
%install
-%{?dtsenable}
-
-make -C NTS \
- install INSTALL_ROOT=%{buildroot}
+make -C NTS install INSTALL_ROOT=%{buildroot}
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -148,8 +110,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
-make -C ZTS \
- install INSTALL_ROOT=%{buildroot}
+make -C ZTS install INSTALL_ROOT=%{buildroot}
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -160,26 +121,6 @@ do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%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
-
-
%check
cd NTS
# Minimal load test for NTS extension
@@ -211,7 +152,7 @@ REPORT_EXIT_STATUS=1 \
%files
-%{?_licensedir:%license NTS/LICENSE}
+%license NTS/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml