summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json14
-rw-r--r--php-zstd.spec44
2 files changed, 33 insertions, 25 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..0797215
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,14 @@
+{
+ "name": "kjdev/zstd",
+ "type": "php-ext",
+ "license": "MIT",
+ "description": "A compression/decompression with Zstandard",
+ "require": {
+ "php": ">= 7.0.0"
+ },
+ "php-ext": {
+ "extension-name": "zstd",
+ "download-url-method": "pre-packaged-source",
+ "configure-options": []
+ }
+}
diff --git a/php-zstd.spec b/php-zstd.spec
index 41a1440..4149a18 100644
--- a/php-zstd.spec
+++ b/php-zstd.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-zstd
#
-# SPDX-FileCopyrightText: Copyright 2018-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2018-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
@@ -21,28 +21,34 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
%global buildver %(pkg-config --silence-errors --modversion libzstd 2>/dev/null || echo 65536)
-%global sources %{pecl_name}-%{version}
+%global sources %{gh_proj}-%{version}
%global _configure ../%{sources}/configure
+# Github forge
+%global gh_vend kjdev
+%global gh_proj php-ext-zstd
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{version}
+
Summary: Zstandard extension
Name: %{?scl_prefix}php-%{pecl_name}
Version: 0.15.2
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+%forgemeta
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%if %{with libzstd}
License: MIT
%else
# bundled library is BSD-3-Clause
License: MIT AND BSD-3-Clause
%endif
-URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{sources}.tgz
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
%if %{with apcu}
BuildRequires: %{?scl_prefix}php-pecl-apcu-devel
%endif
-BuildRequires: %{?scl_prefix}php-pear
%if %{with libzstd}
BuildRequires: libzstd-devel >= 1.4
Requires: libzstd%{?_isa} >= %{buildver}
@@ -83,13 +89,10 @@ These are the files needed to compile programs using %{name}.
%prep
%setup -qc
-sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
-
cd %{sources}
%if %{with libzstd}
# Use the system library
rm -r zstd
-sed -e '\:"zstd/:d' -i ../package.xml
%else
cp zstd/LICENSE LICENSE-libzstd
%endif
@@ -159,25 +162,12 @@ cd ../ZTS
%make_install -C NTS
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
-# Install XML package description
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
%if %{with_zts}
# Install the ZTS stuff
%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Test & Documentation
-cd %{sources}
-for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
-done
-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
-
-
%check
cd %{sources}
@@ -222,8 +212,8 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%files
%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%doc %{sources}/composer.json
+%doc %{sources}/*.md
%if ! %{with libzstd}
%license %{sources}/LICENSE-libzstd
%endif
@@ -238,7 +228,7 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%files devel
-%doc %{pecl_testdir}/%{pecl_name}
+%doc %{sources}/tests
%{php_incldir}/ext/%{pecl_name}
%if %{with_zts}
@@ -247,6 +237,10 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%changelog
+* Wed Mar 11 2026 Remi Collet <remi@remirepo.net> - 0.15.2-3
+- drop pear/pecl dependency
+- sources from github
+
* Thu Sep 25 2025 Remi Collet <remi@remirepo.net> - 0.15.2-2
- rebuild for PHP 8.5.0RC1