summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-ip2location.spec99
1 files changed, 22 insertions, 77 deletions
diff --git a/php-pecl-ip2location.spec b/php-pecl-ip2location.spec
index d0d55fc..fe25a88 100644
--- a/php-pecl-ip2location.spec
+++ b/php-pecl-ip2location.spec
@@ -1,3 +1,6 @@
+# Fedora spec file for php-pecl-ip2location
+# without SCL compatibility from:
+#
# remirepo spec file for php-pecl-ip2location
#
# Copyright (c) 2017-2020 Remi Collet
@@ -6,28 +9,19 @@
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-ip2location
-%endif
-
%global pecl_name ip2location
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%if "%{php_version}" < "5.6"
-%global ini_name %{pecl_name}.ini
-%else
%global ini_name 40-%{pecl_name}.ini
-%endif
%global upstream_version 8.0.1
#global upstream_prever RC1
Summary: Get geo location information of an IP address
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
+Name: php-pecl-%{pecl_name}
License: PHP
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
-URL: https://pecl.php.net/package/igbinary
+URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/5 - test suite
@@ -41,42 +35,18 @@ Patch3: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Loc
# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/11 - config.m4
Patch4: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/11.patch
-BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-pear
-BuildRequires: %{?scl_prefix}php-devel
+BuildRequires: gcc
+BuildRequires: php-pear
+BuildRequires: php-devel
BuildRequires: IP2Location-devel
-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
-
-%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
-%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
@@ -87,8 +57,6 @@ company name, domain name, net speed, area code, weather station code,
weather station name, mobile country code (MCC), mobile network code
(MNC) and carrier brand, elevation, and usage type.
-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
@@ -96,14 +64,17 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-e '/README.TXT/s/role="doc"/role="src"/' \
-i package.xml
cd NTS
-chmod -x *.c *.h LICENSE README
+sed -e "s/\r//" -i LICENSE CREDITS README
+chmod -x *.c *.h LICENSE CREDITS README
+
+: Patches
mv test tests
-sed -e "s/\r//" -i *.c config.m4
+sed -e "s/\r//" -i *.c config.m4 CREDITS README
%patch0 -p1 -b .pr5
%patch1 -p1 -b .pr8
%patch2 -p1 -b .pr9
@@ -129,24 +100,20 @@ EOF
%build
-%{?dtsenable}
-
cd NTS
%{_bindir}/phpize
%configure --with-php-config=%{_bindir}/php-config
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
%{_bindir}/zts-phpize
%configure --with-php-config=%{_bindir}/zts-php-config
-make %{?_smp_mflags}
+%make_build
%endif
%install
-%{?dtsenable}
-
make install -C NTS INSTALL_ROOT=%{buildroot}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
@@ -195,28 +162,7 @@ REPORT_EXIT_STATUS=1 \
%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/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -229,7 +175,6 @@ fi
%endif
-
%changelog
* Fri Sep 25 2020 Remi Collet <remi@remirepo.net> - 8.0.1-6
- add patches for library version 8.1 and for PHP 8 from