File squashfs-tools-ng.spec of Package squashfs-tools-ng

#
# spec file for package squashfs-tools-ng
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define         soversion 1
Name:           squashfs-tools-ng
Version:        1.3.2
Release:        0
Summary:        A new set of tools and libraries for working with SquashFS images
License:        BSD-2-Clause AND GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT
URL:            https://github.com/AgentD/squashfs-tools-ng
Source0:        %{name}-%{version}.tar.gz
Patch0:         docs-with-svg.patch
Patch1:         remove_timestamp.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc
BuildRequires:  glibc-devel
BuildRequires:  graphviz
BuildRequires:  libtool
%if 0%{?suse_version} >= 1600
BuildRequires:  pkgconfig(libattr)
%else
BuildRequires:  libattr-devel
%endif
BuildRequires:  pkgconfig(bzip2)
BuildRequires:  pkgconfig(liblz4)
BuildRequires:  pkgconfig(liblzma)
BuildRequires:  pkgconfig(libselinux)
BuildRequires:  pkgconfig(libzstd)
BuildRequires:  pkgconfig(lzo2)
BuildRequires:  pkgconfig(zlib)

%package -n libsquashfs%{soversion}
Summary:        Library files for %{name}

%description -n libsquashfs%{soversion}
Shared library files for %{name}

%package devel
Summary:        Devel package for %{name}
Group:          Development/Libraries/Other
Requires:       libsquashfs%{soversion} = %{version}-%{release}
Requires:       pkgconfig(bzip2)
Requires:       pkgconfig(liblz4)
Requires:       pkgconfig(liblzma)
Requires:       pkgconfig(libzstd)
Requires:       pkgconfig(lzo2)
Requires:       pkgconfig(zlib)

%description devel
This package contains the C development headers and library files
needed to compile programs using the squashfs-tools-ng library.

%package doc
Summary:        HTML docs for %{name}
BuildArch:      noarch

%description doc
HTML Documentation for %{name}.

%description
SquashFS is a highly compressed read-only filesystem for Linux,
optimized for small size and high packing density. It is widely used
in embedded systems and bootable live media.

SquashFS supports many different compression formats, such as zstd,
xz, zlib or lzo for both data and metadata compression. It has many
features expected from popular filesystems, such as extended
attributes and support for NFS export.

As the name suggests, this is not the original user space tooling for
SquashFS. Here are some of the features that primarily distinguish
this package from the original:

 - reproducible SquashFS images, i.e. deterministic packing without
   any local time stamps,
 - Linux `gen_init_cpio` like file listing for micro managing the
   file system contents, permissions, and ownership without having to
   replicate the file system (and especially permissions) locally,
 - support for SELinux contexts file (see selabel_file(5)) to generate
   SELinux labels.

%prep
%autosetup -p1

%build
./autogen.sh
%configure --disable-static
%make_build
%make_build doxygen-doc

%install
%make_install
install -d %{buildroot}%{_docdir}/%{name}
cp -r %{_builddir}/%{name}-%{version}/doxygen-doc/html %{buildroot}%{_docdir}/%{name}
%fdupes %{buildroot}

%post -n libsquashfs%{soversion}
%ldconfig

%postun -n libsquashfs%{soversion}
%ldconfig

%check
%make_build check

%files
%license COPYING.md
%doc CHANGELOG.md README.md
%{_bindir}/gensquashfs
%{_bindir}/rdsquashfs
%{_bindir}/sqfs2tar
%{_bindir}/sqfsdiff
%{_bindir}/tar2sqfs
%{_mandir}/man?/gensquashfs.?%{?ext_man}
%{_mandir}/man?/rdsquashfs.?%{?ext_man}
%{_mandir}/man?/sqfs2tar.?%{?ext_man}
%{_mandir}/man?/sqfsdiff.?%{?ext_man}
%{_mandir}/man?/tar2sqfs.?%{?ext_man}

%files -n libsquashfs%{soversion}
%license COPYING.md
%doc CHANGELOG.md README.md
%{_libdir}/libsquashfs.so.*

%files devel
%{_includedir}/sqfs
%{_libdir}/libsquashfs.la
%{_libdir}/libsquashfs.so
%{_libdir}/pkgconfig/libsquashfs%{soversion}.pc

%files doc
%doc %{_docdir}/%{name}/html

%changelog
openSUSE Build Service is sponsored by