summaryrefslogtreecommitdiffstats
path: root/php-pecl-vld.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-07-12 08:48:20 +0200
committerRemi Collet <remi@php.net>2024-07-12 08:48:20 +0200
commit287d614b3203c06fe3b2af137b5e99c33f82f6d6 (patch)
tree4ea7e60ed4bc7be3e950edd7f31b49b96461e375 /php-pecl-vld.spec
parent787960771a58257f6d656e9d668ff7bc92711421 (diff)
add upstream patch for PHP 8.4
Diffstat (limited to 'php-pecl-vld.spec')
-rw-r--r--php-pecl-vld.spec67
1 files changed, 17 insertions, 50 deletions
diff --git a/php-pecl-vld.spec b/php-pecl-vld.spec
index 3a2ed6c..54ea477 100644
--- a/php-pecl-vld.spec
+++ b/php-pecl-vld.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-vld
#
-# Copyright (c) 2013-2023 Remi Collet
+# Copyright (c) 2013-2024 Remi Collet
# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -13,29 +13,21 @@
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner derickr
%global gh_project vld
-#global gh_date 20180814
%global pecl_name vld
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
-%if 0%{?gh_date:1}
-%global sources %{gh_project}-%{gh_commit}
-%else
%global sources %{pecl_name}-%{version}
-%endif
%global _configure ../%{sources}/configure
Summary: Dump the internal representation of PHP scripts
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 0.18.0
-%if 0%{?gh_date:1}
-Release: 0.16.%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
-%else
-Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
-Source0: https://pecl.php.net/get/%{sources}.tgz
-%endif
License: PHP-3.01
+Version: 0.18.0
+Release: 3%{?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/%{sources}.tgz
+
+Patch0: %{pecl_name}-upstream.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -60,25 +52,18 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-%if 0%{?gh_date:1}
-%{__php} -r '
- $pkg = simplexml_load_file("NTS/package.xml");
- $pkg->date = substr("%{gh_date}",0,4)."-".substr("%{gh_date}",4,2)."-".substr("%{gh_date}",6,2);
- $pkg->version->release = "%{version}dev";
- $pkg->stability->release = "devel";
- $pkg->asXML("package.xml");
-'
-%endif
-%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
+sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
pushd %{sources}
-: Fix version
-sed -e 's/"0.16.0"/"%{version}"/' -i vld.c
+%patch -P0 -p1
+
+#: Fix version
+#sed -e 's/"0.16.0"/"%{version}"/' -i vld.c
: Check version
-if ! grep -q '"%{version}%{?gh_date:-dev}"' vld.c; then
- : Error: Upstream extension version, expecting %{version}%{?gh_date:-dev}%{?prever:-%{prever}}.
+if ! grep -q '"%{version}"' vld.c; then
+ : Error: Upstream extension version, expecting %{version}.
exit 1
fi
popd
@@ -147,27 +132,6 @@ cd %{sources}
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%{!?_licensedir:install -Dpm 644 LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE}
-
-
-%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
@@ -185,7 +149,7 @@ fi
%files
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -199,6 +163,9 @@ fi
%changelog
+* Fri Jul 12 2024 Remi Collet <remi@remirepo.net> - 0.18.0-3
+- add upstream patch for PHP 8.4
+
* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 0.18.0-2
- build out of sources tree