3 %bcond_without dist_kernel # without distribution kernel
4 %bcond_with kernel # build kernel modules
5 %bcond_without userspace # don't build userspace tools
6 %bcond_with verbose # verbose build (V=1)
7 %bcond_with grsec_kernel # build for kernel-grsecurity
8 %bcond_without selinux # build without SELinux support
10 %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
11 %define alt_kernel grsecurity
15 Summary: Filesystem in Userspace
16 Summary(pl.UTF-8): System plików w przestrzeni użytkownika
22 Group: Applications/System
23 Source0: http://dl.sourceforge.net/fuse/fuse-%{version}.tar.gz
24 # Source0-md5: 66bd30503df55a87b9868835ca5a45bc
26 Patch0: kernel-misc-fuse-Makefile.am.patch
27 Patch1: %{name}-link.patch
28 URL: http://fuse.sourceforge.net/
29 BuildRequires: autoconf
30 BuildRequires: automake
31 BuildRequires: libtool
33 BuildRequires: sed >= 4.0
35 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
36 BuildRequires: rpmbuild(macros) >= 1.379
39 %{?with_selinux:BuildRequires: libselinux-devel}
41 Requires(postun): /sbin/ldconfig
42 Requires(postun): /usr/sbin/groupdel
43 Requires(pre): /usr/bin/getgid
44 Requires(pre): /usr/sbin/groupadd
45 Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 %undefine with_dist_kernel
52 FUSE (Filesystem in Userspace) is a simple interface for userspace
53 programs to export a virtual filesystem to the Linux kernel. FUSE also
54 aims to provide a secure method for non privileged users to create and
55 mount their own filesystem implementations.
57 This package contains a shared library.
59 %description -l pl.UTF-8
60 FUSE stanowi prosty interfejs dla programów działających w przestrzeni
61 użytkownika eksportujący wirtualny system plików do jądra Linuksa.
62 FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i
63 montowania własnych implementacji systemów plików przez zwykłych
64 (nieuprzywilejowanych) użytkowników.
66 Ten pakiet zawiera bibliotekę współdzieloną.
69 Summary: Filesytem in Userspace - Development header files
70 Summary(pl.UTF-8): System plików w przestrzeni użytkownika - pliki nagłówkowe
71 Group: Development/Libraries
72 Requires: %{name} = %{epoch}:%{version}-%{_rel}
75 Libfuse library header files.
77 %description devel -l pl.UTF-8
78 Pliki nagłówkowe biblioteki libfuse.
81 Summary: Filesytem in Userspace - static library
82 Summary(pl.UTF-8): System plików w przestrzeni użytkownika - biblioteka statyczna
83 Group: Development/Libraries
84 Requires: libfuse-devel = %{epoch}:%{version}-%{_rel}
87 Static libfuse libraries.
89 %description static -l pl.UTF-8
90 Statyczna biblioteka libfuse.
92 %package -n kernel%{_alt_kernel}-misc-fuse
93 Summary: Filesystem in Userspace
94 Summary(pl.UTF-8): System plików w przestrzeni użytkownika
95 Release: %{_rel}@%{_kernel_ver_str}
98 Requires(post,postun): /sbin/depmod
99 %if %{with dist_kernel}
100 %requires_releq_kernel
101 Requires(postun): %releq_kernel
103 %if "%{_alt_kernel}" != "%{nil}"
104 Provides: kernel-misc-fuse
107 %description -n kernel%{_alt_kernel}-misc-fuse
108 FUSE (Filesystem in Userspace) is a simple interface for userspace
109 programs to export a virtual filesystem to the Linux kernel. FUSE also
110 aims to provide a secure method for non privileged users to create and
111 mount their own filesystem implementations.
113 %description -n kernel%{_alt_kernel}-misc-fuse -l pl.UTF-8
114 FUSE stanowi prosty interfejs dla programów działających w przestrzeni
115 użytkownika eksportujący wirtualny system plików do jądra Linuksa.
116 FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i
117 montowania własnych implementacji systemów plików przez zwykłych
118 (nieuprzywilejowanych) użytkowników.
121 %setup -q -n fuse-%{version}
125 sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_bindir}/fusermount,' lib/mount.c
134 %{!?with_selinux:ac_cv_header_selinux_selinux_h=no} \
135 --%{?with_kernel:en}%{!?with_kernel:dis}able-kernel-module \
138 %{?with_kernel:--with-kernel=%{_kernelsrcdir}}
140 %if %{with userspace}
141 cp kernel/fuse_kernel.h include/
142 for DIR in include lib util; do
148 %build_kernel_modules -m fuse -C kernel
152 rm -rf $RPM_BUILD_ROOT
153 install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_sysconfdir}}
155 %if %{with userspace}
156 for DIR in include lib util; do
157 %{__make} -C $DIR install \
158 DESTDIR=$RPM_BUILD_ROOT
161 install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
162 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
166 %install_kernel_modules -m kernel/fuse -d kernel/fs
170 rm -rf $RPM_BUILD_ROOT
175 %post -p /sbin/ldconfig
178 if [ "$1" = "0" ] ; then
182 %post -n kernel%{_alt_kernel}-misc-fuse
183 %depmod %{_kernel_ver}
185 %postun -n kernel%{_alt_kernel}-misc-fuse
186 %depmod %{_kernel_ver}
188 %if %{with userspace}
190 %defattr(644,root,root,755)
191 %doc README NEWS ChangeLog AUTHORS doc/*
192 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fuse.conf
193 %attr(4754,root,fuse) %{_bindir}/fusermount
194 %attr(755,root,root) %{_bindir}/ulockmgr_server
195 %attr(755,root,root) /sbin/mount.fuse
196 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_libdir}/lib*.so
203 %{_includedir}/ulockmgr.h
204 %{_pkgconfigdir}/fuse.pc
207 %defattr(644,root,root,755)
212 %files -n kernel%{_alt_kernel}-misc-fuse
213 %defattr(644,root,root,755)
214 /lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*