From f0cc2d5d65b0d4595195a491111fa221d6d186ae Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sun, 5 Jan 2025 09:09:39 +0000 Subject: automatic import of p7zip --- p7zip.spec | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 p7zip.spec (limited to 'p7zip.spec') diff --git a/p7zip.spec b/p7zip.spec new file mode 100644 index 0000000..ed5c4b5 --- /dev/null +++ b/p7zip.spec @@ -0,0 +1,104 @@ +Name: p7zip +Version: 16.02 +Release: 7 +Summary: Very high compression ratio file archiver +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 +Patch1: CVE-2016-9296.patch +Patch2: CVE-2018-5996.patch +Patch3: CVE-2018-10115.patch +Patch4: fix-build-failed-with-gcc-10.patch +Patch5: 0001-add-PIE-compiler-options.patch + +BuildRequires: gcc-c++ +%ifarch %{ix86} +BuildRequires: nasm +%endif +%ifarch x86_64 +BuildRequires: yasm +%endif + +%description +p7zip is a port of 7za.exe for Unix. 7-Zip is a file archiver with a very high +compression ratio. The original version can be found at http://www.7-zip.org/. + +%prep +%autosetup -n %{name}_%{version} -p1 + +# move license files +mv DOC/License.txt DOC/copying.txt . + +%build +%ifarch %{ix86} +cp -f makefile.linux_x86_asm_gcc_4.X makefile.machine +%endif +%ifarch x86_64 +cp -f makefile.linux_amd64_asm makefile.machine +%endif +%ifarch ppc ppc64 +cp -f makefile.linux_any_cpu_gcc_4.X makefile.machine +%endif + +%make_build all2 \ + OPTFLAGS="%{build_cxxflags}" \ + LDFLAGS="%{build_ldflags}" \ + DEST_HOME=%{_prefix} \ + DEST_BIN=%{_bindir} \ + DEST_SHARE=%{_libexecdir}/p7zip \ + DEST_MAN=%{_mandir} + +%check +%make_build test OPTFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" + +%install +make install \ + DEST_DIR=%{buildroot} \ + DEST_HOME=%{_prefix} \ + DEST_BIN=%{_bindir} \ + DEST_SHARE=%{_libexecdir}/p7zip \ + DEST_MAN=%{_mandir} + +# remove redundant DOC dir +mv %{buildroot}%{_docdir}/p7zip/DOC/* %{buildroot}%{_docdir}/p7zip +rmdir %{buildroot}%{_docdir}/p7zip/DOC/ + +%files +%{_docdir}/p7zip +%doc contrib/ +%license copying.txt License.txt +%{_bindir}/7za +%{_bindir}/7z +%dir %{_libexecdir}/p7zip/ +%{_libexecdir}/p7zip/7za +%{_libexecdir}/p7zip/7z +%{_libexecdir}/p7zip/7z.so +%{_libexecdir}/p7zip/7zCon.sfx +%{_libexecdir}/p7zip/Codecs +#{_libexecdir}/p7zip/Formats/ +%{_mandir}/man1/7za.1* +%{_mandir}/man1/7z.1* +%exclude %{_mandir}/man1/7zr.1* + +%changelog +* Sun Jan 05 2025 Liu Fushou - 16.02-7 +- Add 7z binary for extracting rar files + +* 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 + +* Fri Jul 30 2021 sunguoshuai - 16.02-4 +- fix build failed with gcc 10 + +* Sat Jul 10 2021 wangyue - 16.02-3 +- Add gcc-c++ to build dependency + +* Tue Jun 08 2021 wangyue - 16.02-2 +- Fix CVE-2016-9296 CVE-2017-17969 CVE-2018-10115 CVE-2018-5996 + +* Tue Jan 26 2021 Wei Xiong +- Package init -- cgit v1.2.3