summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json33
-rw-r--r--php-pecl-parallel.spec66
2 files changed, 61 insertions, 38 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..6c7904f
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,33 @@
+{
+ "name": "pecl/parallel",
+ "type": "php-ext",
+ "license": "PHP-3.01",
+ "description": "A succinct parallel concurrency API for PHP 8",
+ "require": {
+ "php": ">= 8.0.0"
+ },
+ "php-ext": {
+ "extension-name": "parallel",
+ "support-nts": false,
+ "support-zts": true,
+ "configure-options": [
+ {
+ "name": "enable-parallel",
+ "description": "Enable parallel support",
+ "needs-value": false
+ }, {
+ "name": "enable-parallel-dev",
+ "description": "Enable parallel developer flags",
+ "needs-value": false
+ }, {
+ "name": "enable-parallel-address-sanitizer",
+ "description": "Enable address sanitizer flags for parallel",
+ "needs-value": false
+ }, {
+ "name": "enable-parallel-gcov",
+ "description": "Enable gcov for parallel",
+ "needs-value": false
+ }
+ ]
+ }
+}
diff --git a/php-pecl-parallel.spec b/php-pecl-parallel.spec
index 8e84543..57f5f0c 100644
--- a/php-pecl-parallel.spec
+++ b/php-pecl-parallel.spec
@@ -10,22 +10,29 @@
%bcond_without tests
-%global pie_vend pecl
-%global pie_proj parallel
-%global pecl_name parallel
-%global ini_name 40-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
+%global pie_vend pecl
+%global pie_proj parallel
+%global pecl_name %{pie_proj}
+%global ini_name 40-%{pecl_name}.ini
+
+# Github forge
+%global gh_vend krakjoe
+%global gh_proj %{pie_proj}
+%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: Parallel concurrency API
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 1.2.11
+Summary: Parallel concurrency API
+License: PHP-3.01
+Version: 1.2.12
Release: 1%{?dist}
-License: PHP
-URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{sources}.tgz
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: %{?scl_prefix}php-zts-devel >= 8.0
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: autoconf
@@ -54,21 +61,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
-%setup -q -c
-
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
+%forgesetup
-cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/define PHP_PARALLEL_VERSION/{s/.* "//;s/".*$//;p}' php_parallel.h)
if test "x${extver}" != "x%{version}"; then
: Error: Upstream extension version is ${extver}, expecting %{version}.
exit 1
fi
-cd ..
# Create configuration file
cat << 'EOF' | tee %{ini_name}
@@ -78,8 +78,6 @@ EOF
%build
-cd %{sources}
-
%{__ztsphpize}
sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
@@ -91,27 +89,14 @@ sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
%install
-cd %{sources}
-
: Install the extension
%make_install
: Install config file
-install -D -m 644 ../%{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
-
-: Install XML package description
-install -D -m 644 ../package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
-: INstall Documentation
-for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
-do sed -e 's/\r//' -i $i
- install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
+install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%check
-cd %{sources}
-
: Minimal load test for the extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
@@ -126,15 +111,20 @@ SKIP_ONLINE_TESTS=1 \
%files
-%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%license LICENSE
+%doc composer.json
+%doc *.md
%config(noreplace) %{php_ztsinidir}/%{ini_name}
%{php_ztsextdir}/%{pecl_name}.so
%changelog
+* Wed Mar 18 2026 Remi Collet <remi@remirepo.net> - 1.2.12-1
+- update to 1.2.12
+- drop pear/pecl dependency
+- sources from github
+
* Wed Feb 18 2026 Remi Collet <remi@remirepo.net> - 1.2.11-1
- update to 1.2.11