Name: 7zip Version: 24.09 %global stripped_version %(foo=%{version}; echo ${foo//./}) Release: 1%{?dist} Summary: A command-line file archiver with high compression ratio # from DOC/License.txt # CPP/7zip/Compress/Rar* files: the "GNU LGPL" with "unRAR license restriction" # => we are shipping a source tarball with this stripped # CPP/7zip/Compress/LzfseDecoder.cpp: the "BSD 3-clause License" # C/ZstdDec.c: the "BSD 3-clause License" # C/Xxh64.c: the "BSD 2-clause License" # C/Sha1.c and C/Sha256.c are in the public domain # Some files are "public domain" files, if "public domain" status is stated in source file. # the "GNU LGPL" for all other files. If there is no license information in # => this is LGPL-2.1-or-later from the text in that file License: LGPL-2.1-or-later AND BSD-3-Clause AND BSD-2-Clause AND LicenseRef-Fedora-Public-Domain URL: https://www.7-zip.org/ Source: 7z%{stripped_version}-src-norar.tar.xz Source11: clean_7zip.sh # from Debian https://salsa.debian.org/debian/7zip/-/tree/master/debian/scripts # and https://salsa.debian.org/debian/7zip/-/tree/master/debian/man Source1: p7zip.sh Source2: p7zip.1 Source3: 7z.sh Source4: 7z.1 Source5: 7za.sh Source6: 7za.1 Source7: 7zr.sh Source8: 7zr.1 Source9: 7zz.sh Source10: 7zz.1 # From OpenSuse Patch0: fix-compatib-with-p7zip.patch BuildRequires: dos2unix BuildRequires: gcc-c++ BuildRequires: make Provides: p7zip%{?_isa} = %{version}-%{release} Obsoletes: p7zip < %{version}-%{release} %description 7-Zip is a command-line file archiver for archiving and extracting various formats with a high compression ratio. The main features of 7-Zip are: * High compression ratio in 7z format with LZMA and LZMA2 compression * Supported formats: * Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM * Unpacking only: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT, GPT, HFS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RPM, SquashFS, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR and Z. * For ZIP and GZIP formats, 7-Zip provides a compression ratio that is 2-10 % better than the ratio provided by PKZip and WinZip * Strong AES-256 encryption in 7z and ZIP formats * Powerful command line version %package plugins Summary: Additional plugins for 7zip Provides: p7zip-plugins%{?_isa} = %{version}-%{release} Obsoletes: p7zip-plugins < %{version}-%{release} %description plugins Additional plugins that can be used with 7z to extend its abilities. This package contains also a virtual file system for Midnight Commander. %package doc Summary: Manual documentation and contrib directory Provides: p7zip-doc = %{version}-%{release} Obsoletes: p7zip-doc < %{version}-%{release} BuildArch: noarch %description doc This package contains the 7zip manual documentation and some code contributions. %prep %autosetup -p1 -c # Remove executable perms from files find . -type f -exec chmod 644 {} ';' dos2unix DOC/*.txt %build #set_build_flags # Inject CFLAGS sed -i 's#^CFLAGS_BASE = -O2#CFLAGS_BASE = %{optflags}#' CPP/7zip/7zip_gcc.mak %make_build -C CPP/7zip/Bundles/Alone2 -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 DEBUG_BUILD=1 %make_build -C CPP/7zip/Bundles/Format7zF -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 DEBUG_BUILD=1 %make_build -C CPP/7zip/UI/Console -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 DEBUG_BUILD=1 %make_build -C CPP/7zip/Bundles/SFXCon -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 DEBUG_BUILD=1 %make_build -C CPP/7zip/Bundles/Alone -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 DEBUG_BUILD=1 %make_build -C CPP/7zip/Bundles/Alone7z -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 DEBUG_BUILD=1 %install install -d %{buildroot}%{_libexecdir}/7zip install -d %{buildroot}%{_bindir} # From Debian package #! /usr/bin/dh-exec # CPP/7zip/Bundles/Alone/b/g/7za usr/lib/7zip # CPP/7zip/Bundles/Alone7z/b/g/7zr usr/lib/7zip # CPP/7zip/Bundles/Format7zF/b/g/7z.so usr/lib/7zip # CPP/7zip/UI/Console/b/g/7z usr/lib/7zip # # CPP/7zip/Bundles/SFXCon/b/g/7zCon => usr/lib/7zip/7zCon.sfx # # debian/scripts/7z.sh => usr/bin/7z # debian/scripts/7za.sh => usr/bin/7za # debian/scripts/7zr.sh => usr/bin/7zr # debian/scripts/p7zip.sh => usr/bin/p7zip # #! /usr/bin/dh-exec (standalone) # CPP/7zip/Bundles/Alone2/b/g/7zz usr/lib/7zip # # debian/scripts/7zz.sh => usr/bin/7zz install -m755 %{S:1} %{buildroot}%{_bindir}/7zip # Install p7zip wrapper and its manpage install -m644 -Dt %{buildroot}%{_mandir}/man1 %{S:2} # Remove a mention of the p7zip-rar package that we don't have sed -i 's/RAR (if the non-free p7zip-rar package is installed)//g' %{buildroot}%{_mandir}/man1/p7zip.1 install -Dm 755 CPP/7zip/Bundles/Alone/b/g/7za %{buildroot}%{_libexecdir}/7zip/ install -m755 %{S:5} %{buildroot}%{_bindir}/7za install -m644 -Dt %{buildroot}%{_mandir}/man1 %{S:6} install -Dm 755 CPP/7zip/Bundles/Alone7z/b/g/7zr %{buildroot}%{_libexecdir}/7zip/ install -m755 %{S:7} %{buildroot}%{_bindir}/7zr install -m644 -Dt %{buildroot}%{_mandir}/man1 %{S:8} install -Dm 755 CPP/7zip/UI/Console/b/g/7z %{buildroot}%{_libexecdir}/7zip/ install -Dm 755 CPP/7zip/Bundles/Format7zF/b/g/7z.so %{buildroot}%{_libexecdir}/7zip/ install -Dm 755 CPP/7zip/Bundles/SFXCon/b/g/7zCon %{buildroot}%{_libexecdir}/7zip/7zCon.sfx install -m755 %{S:3} %{buildroot}%{_bindir}/7z install -m644 -Dt %{buildroot}%{_mandir}/man1 %{S:4} install -Dm 755 CPP/7zip/Bundles/Alone2/b/g/7zz %{buildroot}%{_libexecdir}/7zip/ install -m755 %{S:9} %{buildroot}%{_bindir}/7zz install -m644 -Dt %{buildroot}%{_mandir}/man1 %{S:10} %files %license DOC/copying.txt DOC/License.txt %{_bindir}/7za %dir %{_libexecdir}/7zip/ %{_libexecdir}/7zip/7za %{_libexecdir}/7zip/7zCon.sfx %{_mandir}/man1/7za.1* %exclude %{_mandir}/man1/7zr.1* %{_bindir}//7zip %{_bindir}/7zr %{_bindir}/7zz %{_libexecdir}/7zip/7zr %{_libexecdir}/7zip/7zz %{_mandir}/man1/7zr.1.gz %{_mandir}/man1/7zz.1.gz %{_mandir}/man1/p7zip.1.gz %files plugins %license DOC/copying.txt DOC/License.txt %{_bindir}/7z %dir %{_libexecdir}/7zip/ %{_libexecdir}/7zip/7z %{_libexecdir}/7zip/7z.so #{_libexecdir}/7zip/Codecs/ #{_libexecdir}/7zip/Formats/ %{_mandir}/man1/7z.1* %files doc %doc DOC/readme.txt DOC/7zC.txt DOC/Methods.txt DOC/src-history.txt %doc DOC/7zFormat.txt DOC/7zip.hhp DOC/7zip.wxs DOC/lzma.txt %changelog * Mon Feb 17 2025 Sérgio Basto - 24.09-1 - 24.09 - Update License, description from Salimma work - Improve injection of CFLAGS * Sun Dec 10 2023 Sérgio Basto - 23.01-1 - 23.01