3 %bcond_without dist_kernel # without distribution kernel
4 %bcond_without kernel # don't build kernel modules
5 %bcond_without smp # without smp packages
6 %bcond_without up # without up packages
7 %bcond_without userspace # don't build userspace tools
8 %bcond_with verbose # verbose build (V=1)
9 %bcond_with grsec_kernel # build for kernel-grsecurity
10 %bcond_without selinux # build without SELinux support
12 %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
13 %define alt_kernel grsecurity
21 Summary: Filesystem in Userspace
22 Summary(pl.UTF-8): System plików w przestrzeni użytkownika
28 Group: Applications/System
29 Source0: http://dl.sourceforge.net/fuse/fuse-%{version}.tar.gz
30 # Source0-md5: 3f4f5d07d12dedc0a3fd23472171fe94
32 Patch0: kernel-misc-fuse-Makefile.am.patch
33 Patch1: %{name}-link.patch
34 URL: http://fuse.sourceforge.net/
35 BuildRequires: autoconf
36 BuildRequires: automake
37 BuildRequires: libtool
39 BuildRequires: sed >= 4.0
41 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.9}
42 BuildRequires: rpmbuild(macros) >= 1.330
45 %{?with_selinux:BuildRequires: libselinux-devel}
47 Requires(postun): /sbin/ldconfig
48 Requires(postun): /usr/sbin/groupdel
49 Requires(pre): /usr/bin/getgid
50 Requires(pre): /usr/sbin/groupadd
51 Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %undefine with_dist_kernel
58 FUSE (Filesystem in Userspace) is a simple interface for userspace
59 programs to export a virtual filesystem to the Linux kernel. FUSE also
60 aims to provide a secure method for non privileged users to create and
61 mount their own filesystem implementations.
63 This package contains a shared library.
65 %description -l pl.UTF-8
66 FUSE stanowi prosty interfejs dla programów działających w przestrzeni
67 użytkownika eksportujący wirtualny system plików do jądra Linuksa.
68 FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i
69 montowania własnych implementacji systemów plików przez zwykłych
70 (nieuprzywilejowanych) użytkowników.
72 Ten pakiet zawiera bibliotekę współdzieloną.
75 Summary: Filesytem in Userspace - Development header files
76 Summary(pl.UTF-8): System plików w przestrzeni użytkownika - pliki nagłówkowe
77 Group: Development/Libraries
78 Requires: %{name} = %{epoch}:%{version}-%{_rel}
81 Libfuse library header files.
83 %description devel -l pl.UTF-8
84 Pliki nagłówkowe biblioteki libfuse.
87 Summary: Filesytem in Userspace - static library
88 Summary(pl.UTF-8): System plików w przestrzeni użytkownika - biblioteka statyczna
89 Group: Development/Libraries
90 Requires: libfuse-devel = %{epoch}:%{version}-%{_rel}
93 Static libfuse libraries.
95 %description static -l pl.UTF-8
96 Statyczna biblioteka libfuse.
98 %package -n kernel%{_alt_kernel}-misc-fuse
99 Summary: Filesystem in Userspace
100 Summary(pl.UTF-8): System plików w przestrzeni użytkownika
101 Release: %{_rel}@%{_kernel_ver_str}
104 Requires(post,postun): /sbin/depmod
105 %if %{with dist_kernel}
106 %requires_releq_kernel_up
107 Requires(postun): %releq_kernel_up
109 %if "%{_alt_kernel}" != "%{nil}"
110 Provides: kernel-misc-fuse
113 %description -n kernel%{_alt_kernel}-misc-fuse
114 FUSE (Filesystem in Userspace) is a simple interface for userspace
115 programs to export a virtual filesystem to the Linux kernel. FUSE also
116 aims to provide a secure method for non privileged users to create and
117 mount their own filesystem implementations.
119 %description -n kernel%{_alt_kernel}-misc-fuse -l pl.UTF-8
120 FUSE stanowi prosty interfejs dla programów działających w przestrzeni
121 użytkownika eksportujący wirtualny system plików do jądra Linuksa.
122 FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i
123 montowania własnych implementacji systemów plików przez zwykłych
124 (nieuprzywilejowanych) użytkowników.
126 %package -n kernel%{_alt_kernel}-smp-misc-fuse
127 Summary: Filesystem in Userspace
128 Summary(pl.UTF-8): System plików w przestrzeni użytkownika
129 Release: %{_rel}@%{_kernel_ver_str}
132 Requires(post,postun): /sbin/depmod
133 %if %{with dist_kernel}
134 %requires_releq_kernel_smp
135 Requires(postun): %releq_kernel_smp
137 Provides: kernel-misc-fuse
139 %description -n kernel%{_alt_kernel}-smp-misc-fuse
140 FUSE (Filesystem in Userspace) is a simple interface for userspace
141 programs to export a virtual filesystem to the Linux kernel. FUSE also
142 aims to provide a secure method for non privileged users to create and
143 mount their own filesystem implementations.
145 %description -n kernel%{_alt_kernel}-smp-misc-fuse -l pl.UTF-8
146 FUSE stanowi prosty interfejs dla programów działających w przestrzeni
147 użytkownika eksportujący wirtualny system plików do jądra Linuksa.
148 FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i
149 montowania własnych implementacji systemów plików przez zwykłych
150 (nieuprzywilejowanych) użytkowników.
153 %setup -q -n fuse-%{version}
157 sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_bindir}/fusermount,' lib/mount.c
166 %{!?with_selinux:ac_cv_header_selinux_selinux_h=no} \
167 --%{?with_kernel:en}%{!?with_kernel:dis}able-kernel-module \
170 %{?with_kernel:--with-kernel=%{_kernelsrcdir}}
172 %if %{with userspace}
173 cp kernel/fuse_kernel.h include/
174 for DIR in include lib util; do
180 %build_kernel_modules -m fuse -C kernel
184 rm -rf $RPM_BUILD_ROOT
185 install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_sysconfdir}}
187 %if %{with userspace}
188 for DIR in include lib util; do
189 %{__make} -C $DIR install \
190 DESTDIR=$RPM_BUILD_ROOT
193 install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
194 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
198 %install_kernel_modules -m kernel/fuse -d kernel/fs
202 rm -rf $RPM_BUILD_ROOT
207 %post -p /sbin/ldconfig
210 if [ "$1" = "0" ] ; then
214 %post -n kernel%{_alt_kernel}-misc-fuse
215 %depmod %{_kernel_ver}
217 %postun -n kernel%{_alt_kernel}-misc-fuse
218 %depmod %{_kernel_ver}
220 %post -n kernel%{_alt_kernel}-smp-misc-fuse
221 %depmod %{_kernel_ver}smp
223 %postun -n kernel%{_alt_kernel}-smp-misc-fuse
224 %depmod %{_kernel_ver}smp
226 %if %{with userspace}
228 %defattr(644,root,root,755)
229 %doc README NEWS ChangeLog AUTHORS doc/*
230 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fuse.conf
231 %attr(4754,root,fuse) %{_bindir}/fusermount
232 %attr(755,root,root) %{_bindir}/ulockmgr_server
233 %attr(755,root,root) /sbin/mount.fuse
234 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_libdir}/lib*.so
241 %{_includedir}/ulockmgr.h
242 %{_pkgconfigdir}/fuse.pc
245 %defattr(644,root,root,755)
250 %files -n kernel%{_alt_kernel}-misc-fuse
251 %defattr(644,root,root,755)
252 /lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*
254 %if %{with smp} && %{with dist_kernel}
255 %files -n kernel%{_alt_kernel}-smp-misc-fuse
256 %defattr(644,root,root,755)
257 /lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko*