File sasquatch.spec of Package sasquatch

#
# spec file for package sasquatch
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           sasquatch
Version:        4.3
Release:        0
Summary:        Set of patches to the standard unsquashfs
License:        GPL-2.0-or-later
Group:          System/Filesystems
Url:            https://github.com/devttys0/sasquatch
Source0:        sasquatch-%{version}.tar.xz
Source1:        https://downloads.sourceforge.net/project/squashfs/squashfs/squashfs%{version}/squashfs%{version}.tar.gz
BuildRequires:  zlib-devel
BuildRequires:  xz
BuildRequires:  xz-devel
BuildRequires:  gcc-c++
BuildRequires:  lzo-devel
BuildRequires:  help2man

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The sasquatch project is a set of patches to the standard unsquashfs utility
(part of squashfs-tools) that attempts to add support for as many hacked-up
vendor-specific SquashFS implementations as possible. If the vendor has done
something simple like just muck a bit with the header fields, sasquatch should sort it out.
If the vendor has made changes to the underlying LZMA compression options,
or to how these options are stored in the compressed data blocks, sasquatch will
attempt to automatically resolve such customizations via a brute-force method.
Additional advanced command line options have been added for testing/debugging.

Very beta.

%prep
%setup
%setup -T -D -a 1

%build

cd squashfs%{version}
patch -p0 < ../patches/patch0.txt
cd squashfs-tools
make
PATH=.:$PATH help2man --no-discard-stderr sasquatch -o sasquatch.1
sed -i 's/SYNTAX:/sasquatch/g' sasquatch.1

%install
cd squashfs%{version}/squashfs-tools
make install INSTALL_DIR=%{buildroot}%{_bindir}
install -d -m 0755 %{buildroot}%{_mandir}/man1/
install -D -m 0644 sasquatch.1 %{buildroot}%{_mandir}/man1/

%files
%defattr(-,root,root)
%{_bindir}/sasquatch
%{_mandir}/man1/sasquatch.1*

%changelog

openSUSE Build Service is sponsored by