|
Adrian Schröter |
60546d |
#
|
|
Adrian Schröter |
60546d |
# spec file for package 7zip
|
|
Adrian Schröter |
60546d |
#
|
|
Adrian Schröter |
60546d |
# Copyright (c) 2022 SUSE LLC
|
|
Adrian Schröter |
60546d |
#
|
|
Adrian Schröter |
60546d |
# All modifications and additions to the file contributed by third parties
|
|
Adrian Schröter |
60546d |
# remain the property of their copyright owners, unless otherwise agreed
|
|
Adrian Schröter |
60546d |
# upon. The license for this file, and modifications and additions to the
|
|
Adrian Schröter |
60546d |
# file, is the same license as for the pristine package itself (unless the
|
|
Adrian Schröter |
60546d |
# license for the pristine package is not an Open Source License, in which
|
|
Adrian Schröter |
60546d |
# case the license is the MIT License). An "Open Source License" is a
|
|
Adrian Schröter |
60546d |
# license that conforms to the Open Source Definition (Version 1.9)
|
|
Adrian Schröter |
60546d |
# published by the Open Source Initiative.
|
|
Adrian Schröter |
60546d |
|
|
Adrian Schröter |
60546d |
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
Adrian Schröter |
60546d |
#
|
|
Adrian Schröter |
60546d |
|
|
Adrian Schröter |
60546d |
|
|
Adrian Schröter |
68783a |
%define stripped_version 2201
|
|
Adrian Schröter |
60546d |
Name: 7zip
|
|
Adrian Schröter |
68783a |
Version: 22.01
|
|
Adrian Schröter |
60546d |
Release: 0
|
|
Adrian Schröter |
60546d |
Summary: File Archivier
|
|
Adrian Schröter |
60546d |
# CPP/7zip/Compress/LzfseDecoder.cpp is under the BSD-3-Clause
|
|
Adrian Schröter |
60546d |
# C/Sha1.c and C/Sha256.c are in the public domain
|
|
Adrian Schröter |
60546d |
License: BSD-3-Clause AND LGPL-2.1-or-later AND SUSE-Public-Domain
|
|
Adrian Schröter |
60546d |
Group: Productivity/Archiving/Compression
|
|
Adrian Schröter |
60546d |
URL: https://www.7-zip.org/
|
|
Adrian Schröter |
68783a |
#!RemoteAsset: sha256:393098730c70042392af808917e765945dc2437dee7aae3cfcc4966eb920fbc5
|
|
Adrian Schröter |
60546d |
Source: https://www.7-zip.org/a/7z%{stripped_version}-src.tar.xz
|
|
Adrian Schröter |
60546d |
Source1: p7zip
|
|
Adrian Schröter |
60546d |
Source2: p7zip.1
|
|
Adrian Schröter |
60546d |
Patch0: fix-compatib-with-p7zip.patch
|
|
Adrian Schröter |
60546d |
BuildRequires: dos2unix
|
|
Adrian Schröter |
60546d |
BuildRequires: gcc
|
|
Adrian Schröter |
60546d |
BuildRequires: gcc-c++
|
|
Adrian Schröter |
60546d |
Conflicts: p7zip
|
|
Adrian Schröter |
60546d |
Conflicts: p7zip-full
|
|
Adrian Schröter |
60546d |
Provides: p7zip = %{version}
|
|
Adrian Schröter |
60546d |
Provides: p7zip-full = %{version}
|
|
Adrian Schröter |
60546d |
Obsoletes: p7zip < %{version}
|
|
Adrian Schröter |
60546d |
Obsoletes: p7zip-full < %{version}
|
|
Adrian Schröter |
60546d |
|
|
Adrian Schröter |
60546d |
%description
|
|
Adrian Schröter |
60546d |
This package contains the 7z command line utility for archiving and
|
|
Adrian Schröter |
60546d |
extracting various formats.
|
|
Adrian Schröter |
60546d |
|
|
Adrian Schröter |
60546d |
%prep
|
|
Adrian Schröter |
60546d |
tar xaf %{SOURCE0}
|
|
Adrian Schröter |
60546d |
%patch0 -p1
|
|
Adrian Schröter |
60546d |
dos2unix DOC/*.txt
|
|
Adrian Schröter |
60546d |
# Remove executable perms from docs
|
|
Adrian Schröter |
60546d |
chmod -x DOC/*.txt
|
|
Adrian Schröter |
60546d |
|
|
Adrian Schröter |
60546d |
# Remove -Werror to make build succeed
|
|
Adrian Schröter |
60546d |
sed -i 's/-Werror//' CPP/7zip/7zip_gcc.mak
|
|
Adrian Schröter |
60546d |
%if 0%{?suse_version} < 1550
|
|
Adrian Schröter |
60546d |
# (gcc 7.x) Remove -Waddress-of-packed-member to make build succeed
|
|
Adrian Schröter |
60546d |
sed -i -e 's/-Waddress-of-packed-member//' -e 's/-Wcast-align=strict//' C/warn_gcc.mak CPP/7zip/warn_gcc.mak
|
|
Adrian Schröter |
60546d |
%endif
|
|
Adrian Schröter |
60546d |
# Inject CFLAGS
|
|
Adrian Schröter |
60546d |
sed -i 's/^ -fPIC/ -fPIC %{optflags}/' CPP/7zip/7zip_gcc.mak
|
|
Adrian Schröter |
60546d |
|
|
Adrian Schröter |
60546d |
%build
|
|
Adrian Schröter |
60546d |
cd CPP/7zip//Bundles/Alone2
|
|
Adrian Schröter |
60546d |
%make_build -f ../../cmpl_gcc.mak DISABLE_RAR_COMPRESS=1
|
|
Adrian Schröter |
60546d |
|
|
Adrian Schröter |
60546d |
%install
|
|
Adrian Schröter |
60546d |
install -d -m 755 %{buildroot}%{_bindir}
|
|
Adrian Schröter |
60546d |
install -Dt %{buildroot}%{_bindir} CPP/7zip/Bundles/Alone2/b/g/7zz
|
|
Adrian Schröter |
60546d |
# Create links the executables provided by p7zip
|
|
Adrian Schröter |
60546d |
ln -s %{_bindir}/7zz %{buildroot}%{_bindir}/7z
|
|
Adrian Schröter |
60546d |
ln -s %{_bindir}/7z %{buildroot}%{_bindir}/7za
|
|
Adrian Schröter |
60546d |
ln -s %{_bindir}/7z %{buildroot}%{_bindir}/7zr
|
|
Adrian Schröter |
60546d |
# Install p7zip wrapper and its manpage
|
|
Adrian Schröter |
60546d |
install -m755 %{SOURCE1} %{buildroot}%{_bindir}/p7zip
|
|
Adrian Schröter |
60546d |
install -m644 -Dt %{buildroot}%{_mandir}/man1 %{SOURCE2}
|
|
Adrian Schröter |
60546d |
# Remove a mention of the p7zip-rar package that we don't have
|
|
Adrian Schröter |
60546d |
sed -i 's/RAR (if the non-free p7zip-rar package is installed)//g' %{buildroot}%{_mandir}/man1/p7zip.1
|
|
Adrian Schröter |
60546d |
|
|
Adrian Schröter |
60546d |
%files
|
|
Adrian Schröter |
60546d |
%license DOC/copying.txt DOC/License.txt
|
|
Adrian Schröter |
60546d |
%doc DOC/readme.txt DOC/7zC.txt DOC/Methods.txt DOC/src-history.txt
|
|
Adrian Schröter |
60546d |
%{_bindir}/7z
|
|
Adrian Schröter |
60546d |
%{_bindir}/7za
|
|
Adrian Schröter |
60546d |
%{_bindir}/7zr
|
|
Adrian Schröter |
60546d |
%{_bindir}/7zz
|
|
Adrian Schröter |
60546d |
%{_bindir}/p7zip
|
|
Adrian Schröter |
60546d |
%{_mandir}/man1/p7zip.1%{?ext_man}
|
|
Adrian Schröter |
60546d |
|
|
Adrian Schröter |
60546d |
%changelog
|