From 47d862c748012b8aec9edc1a9e2071139271225f Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sat, 31 Aug 2024 07:18:10 +0800 Subject: [PATCH] use correct build flags (cherry picked from commit 4d58cdae2fa13879059ef98402d28ae4046569de) --- p7zip.spec | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/p7zip.spec b/p7zip.spec index f32e70d..f4700e6 100644 --- a/p7zip.spec +++ b/p7zip.spec @@ -1,10 +1,8 @@ -#%global debug_package %{nil} - Name: p7zip Version: 16.02 -Release: 5 +Release: 6 Summary: 7z for Linux system -License: GPLv2 +License: LGPLv2 and (LGPLv2+ or CPL) URL: https://sourceforge.net/projects/p7zip/ Source0: https://sourceforge.net/projects/p7zip/files/p7zip/%{version}/%{name}_%{version}_src_all.tar.bz2 Patch0: CVE-2017-17969.patch @@ -14,7 +12,7 @@ Patch3: CVE-2018-10115.patch Patch4: fix-build-failed-with-gcc-10.patch Patch5: 0001-add-PIE-compiler-options.patch -BuildRequires: gcc gcc-c++ +BuildRequires: gcc-c++ %description 7za for Linux system to archive file as 7z file format @@ -23,7 +21,10 @@ BuildRequires: gcc gcc-c++ %autosetup -n %{name}_%{version} -p1 %build -%make_build +%make_build OPTFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" + +%check +%make_build test OPTFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" %install # @@ -34,13 +35,6 @@ install -d %{buildroot}/%{_mandir}/man1 install -m 0755 bin/7za %{buildroot}/%{_bindir}/ install -m 0644 man1/7za.1 %{buildroot}/%{_mandir}/man1 -%pre -%preun -%post -%postun - -%check - %files %license DOC/License.txt %doc README @@ -48,6 +42,9 @@ install -m 0644 man1/7za.1 %{buildroot}/%{_mandir}/man1 %{_mandir}/* %changelog +* Sat Aug 31 2024 Funda Wang - 16.02-6 +- use correct build flags + * Tue Jun 06 2023 chenchen - 16.02-5 - add PIE compiler options -- Gitee