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
16 %undefine with_dist_kernel
18 %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
19 %define alt_kernel grsecurity
21 %if "%{_alt_kernel}" != "%{nil}"
22 %undefine with_userspace
27 Summary: Filesystem in Userspace
28 Summary(pl): System plików w przestrzeni u¿ytkownika
29 Name: %{pname}%{_alt_kernel}
34 Group: Applications/System
35 Source0: http://dl.sourceforge.net/fuse/fuse-%{version}.tar.gz
36 # Source0-md5: 13e1873086a1d7a95f470bbc7428c528
38 Patch0: kernel-misc-fuse-Makefile.am.patch
39 Patch1: %{pname}-link.patch
40 URL: http://fuse.sourceforge.net/
41 BuildRequires: autoconf
42 BuildRequires: automake
43 BuildRequires: libtool
44 BuildRequires: sed >= 4.0
46 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.9}
47 BuildRequires: rpmbuild(macros) >= 1.330
51 BuildRequires: libselinux-devel
53 Requires(postun): /sbin/ldconfig
54 Requires(postun): /usr/sbin/groupdel
55 Requires(pre): /usr/bin/getgid
56 Requires(pre): /usr/sbin/groupadd
58 Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 FUSE (Filesystem in Userspace) is a simple interface for userspace
62 programs to export a virtual filesystem to the Linux kernel. FUSE also
63 aims to provide a secure method for non privileged users to create and
64 mount their own filesystem implementations.
66 This package contains a shared library.
69 FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
70 u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
71 FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
72 montowania w³asnych implementacji systemów plików przez zwyk³ych
73 (nieuprzywilejowanych) u¿ytkowników.
75 Ten pakiet zawiera bibliotekê wspó³dzielon±.
78 Summary: Filesytem in Userspace - Development header files
79 Summary(pl): System plików w przestrzeni u¿ytkownika - pliki nag³ówkowe
80 Group: Development/Libraries
81 Requires: %{pname} = %{epoch}:%{version}-%{_rel}
84 Libfuse library header files.
86 %description devel -l pl
87 Pliki nag³ówkowe biblioteki libfuse.
90 Summary: Filesytem in Userspace - static library
91 Summary(pl): System plików w przestrzeni u¿ytkownika - biblioteka statyczna
92 Group: Development/Libraries
93 Requires: libfuse-devel = %{epoch}:%{version}-%{_rel}
96 Static libfuse libraries.
98 %description static -l pl
99 Statyczna biblioteka libfuse.
101 %package -n kernel%{_alt_kernel}-misc-fuse
102 Summary: Filesystem in Userspace
103 Summary(pl): System plików w przestrzeni u¿ytkownika
104 Release: %{_rel}@%{_kernel_ver_str}
107 Requires(post,postun): /sbin/depmod
108 %if %{with dist_kernel}
109 %requires_releq_kernel_up
110 Requires(postun): %releq_kernel_up
112 %if "%{_alt_kernel}" != "%{nil}"
113 Provides: kernel-misc-fuse
116 %description -n kernel%{_alt_kernel}-misc-fuse
117 FUSE (Filesystem in Userspace) is a simple interface for userspace
118 programs to export a virtual filesystem to the Linux kernel. FUSE also
119 aims to provide a secure method for non privileged users to create and
120 mount their own filesystem implementations.
122 %description -n kernel%{_alt_kernel}-misc-fuse -l pl
123 FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
124 u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
125 FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
126 montowania w³asnych implementacji systemów plików przez zwyk³ych
127 (nieuprzywilejowanych) u¿ytkowników.
129 %package -n kernel%{_alt_kernel}-smp-misc-fuse
130 Summary: Filesystem in Userspace
131 Summary(pl): System plików w przestrzeni u¿ytkownika
132 Release: %{_rel}@%{_kernel_ver_str}
135 Requires(post,postun): /sbin/depmod
136 %if %{with dist_kernel}
137 %requires_releq_kernel_smp
138 Requires(postun): %releq_kernel_smp
140 Provides: kernel-misc-fuse
142 %description -n kernel%{_alt_kernel}-smp-misc-fuse
143 FUSE (Filesystem in Userspace) is a simple interface for userspace
144 programs to export a virtual filesystem to the Linux kernel. FUSE also
145 aims to provide a secure method for non privileged users to create and
146 mount their own filesystem implementations.
148 %description -n kernel%{_alt_kernel}-smp-misc-fuse -l pl
149 FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
150 u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
151 FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
152 montowania w³asnych implementacji systemów plików przez zwyk³ych
153 (nieuprzywilejowanych) u¿ytkowników.
156 %setup -q -n fuse-%{version}
160 sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_bindir}/fusermount,' lib/mount.c
169 --%{?with_kernel:en}%{!?with_kernel:dis}able-kernel-module \
172 %{?with_kernel:--with-kernel=%{_kernelsrcdir}}
174 %if %{with userspace}
175 cp kernel/fuse_kernel.h include/
176 for DIR in include lib util; do
182 %build_kernel_modules -m fuse -C kernel
186 rm -rf $RPM_BUILD_ROOT
187 install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_sysconfdir}}
189 %if %{with userspace}
190 for DIR in include lib util; do
191 %{__make} -C $DIR install \
192 DESTDIR=$RPM_BUILD_ROOT
195 install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
196 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
200 %install_kernel_modules -m kernel/fuse -d kernel/fs
204 rm -rf $RPM_BUILD_ROOT
209 %post -p /sbin/ldconfig
212 if [ "$1" = "0" ] ; then
216 %post -n kernel%{_alt_kernel}-misc-fuse
217 %depmod %{_kernel_ver}
219 %postun -n kernel%{_alt_kernel}-misc-fuse
220 %depmod %{_kernel_ver}
222 %post -n kernel%{_alt_kernel}-smp-misc-fuse
223 %depmod %{_kernel_ver}smp
225 %postun -n kernel%{_alt_kernel}-smp-misc-fuse
226 %depmod %{_kernel_ver}smp
228 %if %{with userspace}
230 %defattr(644,root,root,755)
231 %doc README NEWS ChangeLog AUTHORS doc/*
232 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fuse.conf
233 %attr(4754,root,fuse) %{_bindir}/fusermount
234 %attr(755,root,root) %{_bindir}/ulockmgr_server
235 %attr(755,root,root) /sbin/mount.fuse
236 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/lib*.so
243 %{_includedir}/ulockmgr.h
244 %{_pkgconfigdir}/fuse.pc
247 %defattr(644,root,root,755)
252 %if %{with up} || %{without dist_kernel}
253 %files -n kernel%{_alt_kernel}-misc-fuse
254 %defattr(644,root,root,755)
255 /lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*
258 %if %{with smp} && %{with dist_kernel}
259 %files -n kernel%{_alt_kernel}-smp-misc-fuse
260 %defattr(644,root,root,755)
261 /lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko*