summaryrefslogtreecommitdiffstats
path: root/php-pecl-ip2location.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-ip2location.spec')
-rw-r--r--php-pecl-ip2location.spec72
1 files changed, 36 insertions, 36 deletions
diff --git a/php-pecl-ip2location.spec b/php-pecl-ip2location.spec
index 7944c84..fc60434 100644
--- a/php-pecl-ip2location.spec
+++ b/php-pecl-ip2location.spec
@@ -8,30 +8,36 @@
#
%{?scl:%scl_package php-pecl-ip2location}
-%global pecl_name ip2location
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global ini_name 40-%{pecl_name}.ini
+%global pecl_name ip2location
+%global pie_vend ip2location
+%global pie_proj ip2location-pie
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global ini_name 40-%{pecl_name}.ini
%global upstream_version 8.3.0
#global upstream_prever RC1
%global libversion 8.6
-%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
-%global _configure ../%{sources}/configure
+%global sources %{gh_proj}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
+
+# Github forge
+%global gh_vend chrislim2888
+%global gh_proj IP2Location-PECL-Extension
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{upstream_version}%{?upstream_prever}
-Summary: Get geo location information of an IP address
Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Summary: Get geo location information of an IP address
License: PHP-3.01
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
-URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
-
-Patch0: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/25.patch
+Release: 2%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-devel
# ensure proper version is used
BuildRequires: IP2Location-devel >= %{libversion}
@@ -40,10 +46,15 @@ Requires: IP2Location-libs%{?_isa} >= %{libversion}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-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}
+# Extension
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+# PECL
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+# PIE
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
+Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version}
%description
@@ -60,17 +71,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-# Don't install tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -e '/README.TXT/s/role="doc"/role="test"/' \
- -e '/AGREEMENT.PDF/s/role="doc"/role="test"/' \
- -i package.xml
-
cd %{sources}
-%patch -P0 -p1 -b .pr25
-sed -e "s/\r//" -i LICENSE CREDITS *.md *.c *.h
-
# Check version
extver=$(sed -n '/#define PHP_IP2LOCATION_VERSION/{s/.* "//;s/".*$//;p}' php_ip2location.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -114,8 +115,6 @@ cd ../ZTS
%make_install -C NTS
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
# Install the ZTS stuff
@@ -124,11 +123,6 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Documentation
-for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
-
%check
cd %{sources}
@@ -165,11 +159,12 @@ fi
%files
%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%config(noreplace) %{php_inidir}/%{ini_name}
+%doc %{sources}/composer.json
+%doc %{sources}/CREDITS
+%doc %{sources}/*.md
+%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
-%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
%config(noreplace) %{php_ztsinidir}/%{ini_name}
@@ -178,6 +173,11 @@ fi
%changelog
+* Tue Mar 17 2026 Remi Collet <remi@remirepo.net> - 8.3.0-2
+- drop pear/pecl dependency
+- sources from github
+- drop patch merged upstream
+
* Wed Sep 3 2025 Remi Collet <remi@remirepo.net> - 8.3.0-1
- update to 8.3.0
- re-license spec file to CECILL-2.1