%global _debugsource_template %{nil} %define stripped_version 2409 Name: 7zip Version: 24.09 Release: 1%{?dist} Summary: Command-line file archiver with high compression ratio # CPP/7zip/Compress/LzfseDecoder.cpp is under the BSD-3-Clause # C/Sha1.c and C/Sha256.c are in the public domain License: BSD-3-Clause AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain URL: https://www.7-zip.org/ Source: https://www.7-zip.org/a/7z%{stripped_version}-src.tar.xz 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 Patch0: fix-compatib-with-p7zip.patch BuildRequires: dos2unix BuildRequires: gcc-c++ Provides: p7zip = %{version} Provides: p7zip-full = %{version} Obsoletes: p7zip < %{version} Obsoletes: p7zip-full < %{version} %description This package contains the 7z command line utility for archiving and extracting various formats. %package plugins Summary: Additional plugins for 7zip Provides: p7zip-plugins = %{version} Obsoletes: p7zip-plugins < %{version} %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} Obsoletes: p7zip-doc < %{version} BuildArch: noarch %description doc This package contains the 7zip manual documentation and some code contributions. %prep %autosetup -p1 -c dos2unix DOC/*.txt # Remove executable perms from docs chmod -x DOC/*.txt %build #undefine _strict_symbol_defs_build #set_build_flags # Inject CFLAGS sed -i 's#^ -fPIC# -fPIC %{optflags}#' CPP/7zip/7zip_gcc.mak sed -i 's/LFLAGS_ALL = -s/LFLAGS_ALL =/' CPP/7zip/7zip_gcc.mak %ifarch x86_64 %ix86 %x86_64 #sed -i 's/$(CXX) -o $(PROGPATH)/$(CXX) -Wl,-z,noexecstack -o $(PROGPATH)/' CPP/7zip/7zip_gcc.mak %endif %make_build -C CPP/7zip/Bundles/Alone2 -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 %make_build -C CPP/7zip/Bundles/Format7zF -f ../../cmpl_gcc.mak \ DISABLE_RAR_COMPRESS=1 %make_build -C CPP/7zip/UI/Console -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 %make_build -C CPP/7zip/Bundles/SFXCon -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 %make_build -C CPP/7zip/Bundles/Alone -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 %make_build -C CPP/7zip/Bundles/Alone7z -f ../../cmpl_gcc.mak \ DISABLE_RAR=1 %install install -d %{buildroot}%{_libexecdir}/7zip install -d %{buildroot}%{_bindir} #! /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 * Sun Dec 10 2023 Sérgio Basto - 23.01-1 - 23.01