summaryrefslogtreecommitdiffstats
path: root/php-pecl-xlswriter.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-04-23 10:58:14 +0200
committerRemi Collet <remi@php.net>2026-04-23 10:58:14 +0200
commit2a3da241f94673ebed8ccca4c0e2da75c8da8da7 (patch)
treef1fc462412edce2525d06f2b4923d9280d2679e1 /php-pecl-xlswriter.spec
parent0ebfb390e0dcf9e24e4af9615b883df37d55ab48 (diff)
drop pear/pecl dependencyHEADmaster
sources from github
Diffstat (limited to 'php-pecl-xlswriter.spec')
-rw-r--r--php-pecl-xlswriter.spec101
1 files changed, 38 insertions, 63 deletions
diff --git a/php-pecl-xlswriter.spec b/php-pecl-xlswriter.spec
index 0267f7c..4e5520c 100644
--- a/php-pecl-xlswriter.spec
+++ b/php-pecl-xlswriter.spec
@@ -1,63 +1,60 @@
# remirepo spec file for php-pecl-xlswriter
#
-# Copyright (c) 2018-2024 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2018-2026 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-%bcond_with syslib
%bcond_without tests
%{?scl:%scl_package php-pecl-xlswriter}
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name xlswriter
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
-%global _configure ../%{sources}/configure
+%global _configure ../configure
+# Github forge
+%global gh_vend viest
+%global gh_proj php-ext-xlswriter
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+# PIE
+%global pie_vend %{gh_vend}
+%global pie_proj %{pecl_name}
-%if %{with syslib}
-# No soname, so manage dependency on available version
-%global libxlsxwriter_version 1.0.0
-%global libxlsxio_version 0.2.29
-%endif
-Summary: An efficient and fast xlsx file extension
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 1.5.8
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Summary: An efficient and fast xlsx file extension
License: BSD-2-Clause
-URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Version: 1.5.8
+Release: 2%{?dist}
+%forgemeta
+URL: %{forgeurl}
+# use makesrc.sh to create a recursive snapshot
+Source0: %{gh_proj}-%{version}.tgz
+Source1: makesrc.sh
BuildRequires: %{?dtsprefix}gcc
BuildRequires: make
BuildRequires: %{?scl_prefix}php-devel >= 7.0
-BuildRequires: %{?scl_prefix}php-pear
-%if %{with syslib}
-BuildRequires: libxlsxwriter-devel >= %{libxlsxwriter_version}
-BuildRequires: libxlsxio-devel >= %{libxlsxio_version}
-BuildRequires: zlib-devel
-%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%if %{with syslib}
-Requires: libxlsxwriter%{?_isa} >= %{libxlsxwriter_version}
-Requires: libxlsxio%{?_isa} >= %{libxlsxio_version}
-%else
# see library/libxlsxwriter/include/xlsxwriter.h
Provides: bundled(libxlsxwriter) = 1.1.3
# see library/libxlsxio/include/xlsxio_version.h
Provides: bundled(libxlsxio) = 0.2.27
-%endif
-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
@@ -91,18 +88,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 '/name="library/d' \
- -i package.xml
-
-pushd %{sources}
-%if %{with syslib}
-# we use the system libraries
-rm -r library
-%endif
+%forgesetup
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_XLSWRITER_VERSION/{s/.* "//;s/".*$//;p}' php_xlswriter.h)
@@ -110,7 +96,6 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
: Error: Upstream extension version is ${extver}, expecting %{version}%{?prever:-%{prever}}.
exit 1
fi
-popd
mkdir NTS
%if %{with_zts}
@@ -132,22 +117,17 @@ peclbuild() {
%configure \
--without-openssl \
--with-xlswriter \
-%if %{with syslib}
- --with-libxlsxwriter=%{_prefix} \
- --with-libxlsxio=%{_prefix} \
-%endif
--enable-reader \
--with-php-config=$1
%make_build
}
-cd %{sources}
%{__phpize}
[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
-cd ../NTS
+cd NTS
peclbuild %{__phpconfig}
%if %{with_zts}
@@ -164,20 +144,12 @@ peclbuild %{__ztsphpconfig}
# install config file
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}
%make_install -C ZTS
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
OPT="-q -P --show-diff"
@@ -185,7 +157,6 @@ OPT="-q -P --show-diff"
OPT="$OPT %{?_smp_mflags}"
%endif
-cd %{sources}
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
@@ -215,9 +186,9 @@ cd ..
%files
-%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%license LICENSE
+%doc CREDITS
+%doc *.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -229,6 +200,10 @@ cd ..
%changelog
+* Thu Apr 23 2026 Remi Collet <remi@remirepo.net> - 1.5.8-2
+- drop pear/pecl dependency
+- sources from github
+
* Tue Nov 12 2024 Remi Collet <remi@remirepo.net> - 1.5.8-1
- update to 1.5.8
- drop patch merged upstream