Summary: squashfs utilities
Summary(ja): squashfs ユーティリティ
Name: squashfs-tools
Version: 4.5
Release: 2%{?_dist_release}
Group: system
Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke

License: GPLv2+
URL: https://github.com/plougher/squashfs-tools
Source0: https://github.com/plougher/squashfs-tools/archive/%{version}.tar.gz#/squashfs-tools-%{version}.tar.gz
Patch0: squashfs-tools-4.5_20210926.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: zlib-devel
BuildRequires: xz-devel
BuildRequires: lzo-devel
BuildRequires: libattr-devel
BuildRequires: lz4-devel
BuildRequires: libzstd-devel

%description
Squashfs is a highly compressed read-only filesystem for Linux.  This package
contains the utilities for manipulating squashfs filesystems.

%description -l ja
Squashfs は Linux 用の高圧縮読み込み専用ファイルシステムです。このパッケージ
には squashfs ファイルシステムを操作するためのユーティリティが含まれています。


%debug_package


%prep
%setup -q -n squashfs-tools-%{version}
%patch0 -p1


%build
pushd squashfs-tools
CFLAGS="%{optflags}" \
XZ_SUPPORT=1 \
LZO_SUPPORT=1 \
LZMA_XZ_SUPPORT=1 \
LZ4_SUPPORT=1 \
ZSTD_SUPPORT=1 \
%__make %{?_smp_mflags}
popd


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/sbin
%__install -m 755 squashfs-tools/mksquashfs $RPM_BUILD_ROOT/sbin/mksquashfs
%__install -m 755 squashfs-tools/unsquashfs $RPM_BUILD_ROOT/sbin/unsquashfs


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%license COPYING
%doc README-%{version} README ACKNOWLEDGEMENTS CHANGES
%doc RELEASE-READMEs/DONATIONS RELEASE-READMEs/PERFORMANCE.README
%doc RELEASE-READMEs/pseudo-file.example
/sbin/*


%changelog
* Sun Sep 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.5-2
- dropped Patch0.
- imported Patch0 from upstream.

* Fri Sep 03 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.5-1
- new upstream release.
- dropped Patch0.
- imported Patch0 from rawhide.

* Wed Sep 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.4-1
- new upstream release.

* Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.2-2
- rebuild with VineSeed environment

* Tue Apr 19 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2-1
- update to 4.2
- XZ, LZMA and LZO support
  - XZ compression support requires 2.6.38 or newer kernels.
  - LZO compression suppoer requires 2.6.36 ow newer kernels.
- add BR: zlib-devel, xz-devel, lzo-devel, libattr-devel

* Fri Sep 10 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 4.1-1
- new upstream release

* Wed Oct 14 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0-1
- new upstream release

* Mon Jan 26 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.4-1
- new upstream release

* Sat Aug 16 2008 Shu KONNO <owa@bg.wakwak.com> 3.3-1vl5
- applied new versioning policy, spec in utf-8

* Sat Dec 15 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-0vl1
- new upstream release

* Sun May 28 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 3.0-0vl1
- initial build for Vine Linux
