| |
@@ -6,7 +6,11 @@
|
| |
URL: http://fuse.sf.net
|
| |
Source0: https://github.com/libfuse/libfuse/archive/fuse-%{version}.tar.gz
|
| |
Source1: fuse.conf
|
| |
- Patch0: fuse3-gcc11.patch
|
| |
+ Patch0: fuse3-gcc11.patch
|
| |
+
|
| |
+ %if 0%{?flatpak}
|
| |
+ %global _udevrulesdir %{_prefix}/lib/udev/rules.d
|
| |
+ %endif
|
| |
|
| |
BuildRequires: which
|
| |
%if ! 0%{?el6}
|
| |
@@ -80,8 +84,13 @@
|
| |
%if ! 0%{?__global_ldflags:1}
|
| |
%global __global_ldflags ""
|
| |
%endif
|
| |
- %meson -D udevrulesdir=/etc/udev/rules.d
|
| |
+ %meson -D udevrulesdir=%{_sysconfdir}/udev/rules.d
|
| |
%else
|
| |
+ # Need to be specific for flatpak builds, otherwise it'll create rules
|
| |
+ # in other directory than /app/etc which will make builds fail.
|
| |
+ %if 0%{?flatpak}
|
| |
+ %meson -D udevrulesdir=%{_udevrulesdir}
|
| |
+ %endif
|
| |
%meson
|
| |
%endif
|
| |
|
| |
@@ -94,12 +103,14 @@
|
| |
%endif
|
| |
# don't have root for installation
|
| |
meson configure -D useroot=false
|
| |
+
|
| |
ninja-build reconfigure
|
| |
)
|
| |
%meson_build
|
| |
|
| |
%install
|
| |
- export MESON_INSTALL_DESTDIR_PREFIX=%{buildroot}/usr %meson_install
|
| |
+ # prefix cannot be hardcoded, flatpaks are using /app instead of /usr
|
| |
+ export MESON_INSTALL_DESTDIR_PREFIX=%{buildroot}/%{_prefix} %meson_install
|
| |
find %{buildroot} .
|
| |
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
|
| |
# change from 4755 to 0755 to allow stripping -- fixed later in files
|
| |
@@ -109,6 +120,10 @@
|
| |
rm -f %{buildroot}/%{_libdir}/*.a
|
| |
# No need to create init-script
|
| |
rm -f %{buildroot}%{_sysconfdir}/init.d/fuse3
|
| |
+ # This path is hardcoded:
|
| |
+ # https://github.com/libfuse/libfuse/blob/master/util/install_helper.sh#L43
|
| |
+ # so flatpaks will fail unless we delete it below.
|
| |
+ rm -f %{buildroot}/etc/init.d/fuse3
|
| |
|
| |
%if 0%{?el6} || 0%{?el7}
|
| |
# This is in the fuse package on el7 and there's no default on el6
|
| |
@@ -118,9 +133,6 @@
|
| |
install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}
|
| |
%endif
|
| |
|
| |
- # Delete pointless udev rules, which do not belong in /usr/lib (brc#748204)
|
| |
- rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
|
| |
-
|
| |
%if 0%{?el6} || 0%{?el7}
|
| |
%post -p /sbin/ldconfig libs
|
| |
%postun -p /sbin/ldconfig libs
|
| |
@@ -139,6 +151,8 @@
|
| |
%{_mandir}/man8/*
|
| |
%if 0%{?el6}
|
| |
%{_sysconfdir}/udev/rules.d/*
|
| |
+ %else
|
| |
+ %{_udevrulesdir}/*
|
| |
%endif
|
| |
|
| |
%files libs
|
| |
This will allow fedora flatpaks to be built with fuse3 as dependency.