File mergerfs.spec of Package mergerfs

#
# spec file for package mergerfs
#
# 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/
#


Name:           mergerfs
Version:        2.40.2
Release:        0
Summary:        A FUSE-based union filesystem with configurable action policies
License:        ISC
Group:          System/Filesystems
URL:            https://github.com/trapexit/mergerfs
Source:         https://github.com/trapexit/mergerfs/releases/download/%{version}/mergerfs-%{version}.tar.gz
BuildRequires:  gcc-c++
Requires:       fuse
Requires(post): permissions
Requires(verify): permissions

%prep
%setup -q
sed -i -e "s/chown root/#chown root/" libfuse/Makefile

%description
mergerfs is a union filesystem with configurable file placement,
online modification of tree composition, support for ACLs, xattrs,
file attributes and hardlink-based copy-on-write. The behavior for
file and directory actions can be defined with policies.

%build
%make_build

%install
%make_install
mkdir -p %{buildroot}%{_sbindir}
mv %{buildroot}/sbin/mount.mergerfs %{buildroot}%{_sbindir}/
mv %{buildroot}%{_prefix}/local/* %{buildroot}%{_prefix}/
rmdir %{buildroot}%{_prefix}/local
# remove experimental feature
rm %{buildroot}%{_prefix}/lib/mergerfs/preload.so

%post
%set_permissions %{_bindir}/mergerfs-fusermount
%set_permissions %{_sbindir}/mount.mergerfs

%verifyscript
%verify_permissions -e %{_bindir}/mergerfs-fusermount
%verify_permissions -e %{_sbindir}/mount.mergerfs

%files
%{_bindir}/mergerfs
%verify(not mode) %attr(755,root,root) %{_bindir}/mergerfs-fusermount
%verify(not mode) %attr(755,root,root) %{_sbindir}/mount.mergerfs
%{_mandir}/man1/mergerfs*

%changelog
openSUSE Build Service is sponsored by