summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-03-19 11:50:23 +0100
committerRemi Collet <remi@php.net>2025-03-19 11:50:23 +0100
commitf54767774f36f5b3451994353d555452be41c46a (patch)
treef1bbe2cf5e6ffbc4a9a759729b7df6b6df603036
parent53be94f69a997ebfacbc9372c438175220ee6dae (diff)
re-license spec file to CECILL-2.1HEADmaster
spec cleanup
-rw-r--r--php-pdlib.spec38
1 files changed, 18 insertions, 20 deletions
diff --git a/php-pdlib.spec b/php-pdlib.spec
index 50300e2..e1afda4 100644
--- a/php-pdlib.spec
+++ b/php-pdlib.spec
@@ -1,16 +1,13 @@
# remirepo spec file for php-pdlib
#
-# Copyright (c) 2020-2023 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2024-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%scl_package php-pdlib
-%else
-%global pkg_name %{name}
-%endif
+
+%{?scl:%scl_package php-pdlib}
%bcond_without tests
@@ -32,18 +29,12 @@ Version: 1.1.0
%if 0%{?gh_date:1}
Release: 1%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%endif
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
-%if 0%{?rhel} == 7 && 0%{?dtsversion} == 0
-%global dtsversion 7
-%global dtsenable source /opt/rh/devtoolset-7/enable
-%global dtsprefix devtoolset-7-
-BuildRequires: devtoolset-7-toolchain
-%endif
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?dtsprefix}gcc-c++
@@ -92,13 +83,16 @@ EOF
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
cd ../NTS
%configure \
--with-php-config=%{__phpconfig} \
--with-libdir=%{_lib} \
--with-pdlib
-make %{?_smp_mflags}
+
+%make_build
%if %{with_zts}
cd ../ZTS
@@ -106,7 +100,8 @@ cd ../ZTS
--with-php-config=%{__ztsphpconfig} \
--with-libdir=%{_lib} \
--with-pdlib
-make %{?_smp_mflags}
+
+%make_build
%endif
@@ -114,12 +109,12 @@ make %{?_smp_mflags}
%{?dtsenable}
# Install the NTS stuff
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
%if %{with_zts}
# Install the ZTS stuff
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -159,7 +154,6 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
%files
-%{!?_licensedir:%global license %%doc}
%license %{sources}/LICENSE
%doc %{sources}/README.md
@@ -173,6 +167,10 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
%changelog
+* Wed Mar 19 2025 Remi Collet <remi@remirepo.net> - 1.1.0-3
+- re-license spec file to CECILL-2.1
+- spec cleanup
+
* Thu Jul 6 2023 Remi Collet <remi@remirepo.net> - 1.1.0-2
- build out of sources tree
- add option to skip tests