summaryrefslogtreecommitdiffstats
path: root/php-ast.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-ast.spec')
-rw-r--r--php-ast.spec38
1 files changed, 22 insertions, 16 deletions
diff --git a/php-ast.spec b/php-ast.spec
index 072ec0f..8a657c6 100644
--- a/php-ast.spec
+++ b/php-ast.spec
@@ -14,21 +14,29 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
# After 20-tokenizer.ini
%global ini_name 40-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
+%global sources %{archivename}
%global _configure ../%{sources}/configure
+# Github forge
+%global gh_vend nikic
+%global gh_proj php-ast
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag v%{version}
+# for EL-8 to avoid TAG usage
+%global archivename %{gh_proj}-%{version}
+
Summary: Abstract Syntax Tree
Name: %{?scl_prefix}php-ast
-Version: 1.1.3
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: BSD-3-Clause
-URL: https://pecl.php.net/package/ast
-Source0: http://pecl.php.net/get/%{sources}.tgz
+Version: 1.1.3
+Release: 3%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.2
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-tokenizer
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -54,11 +62,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qc
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
-
cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_AST_VERSION/{s/.* "//;s/".*$//;p}' php_ast.h)
@@ -106,9 +109,6 @@ cd ../ZTS
%install
%{?dtsenable}
-# Install XML package description
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
# Install the NTS stuff
%make_install -C NTS
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -157,8 +157,10 @@ TEST_PHP_ARGS="-n -d extension=tokenizer.so -d extension=%{buildroot}%{php_ztsex
%files
%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%doc %{sources}/composer.json
+%doc %{sources}/*.md
+%doc %{sources}/ast_stub.php
+%doc %{sources}/util.php
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -170,6 +172,10 @@ TEST_PHP_ARGS="-n -d extension=tokenizer.so -d extension=%{buildroot}%{php_ztsex
%changelog
+* Fri Mar 13 2026 Remi Collet <remi@remirepo.net> - 1.1.3-3
+- drop pear/pecl dependency
+- sources from github
+
* Thu Sep 25 2025 Remi Collet <remi@remirepo.net> - 1.1.3-2
- rebuild for PHP 8.5.0RC1