6 %bcond_without dist_kernel # without distribution kernel
7 %bcond_without kernel # don't build kernel modules
8 %bcond_without smp # without smp packages
9 %bcond_without userspace # don't build userspace tools
10 %bcond_with verbose # verbose build (V=1)
12 Name: kernel-misc-fuse
13 Summary: Filesystem in Userspace
14 Summary(pl): System plików w przestrzeni u¿ytkownika
17 Release: %{_rel}@%{_kernel_ver_str}
21 Source0: http://dl.sourceforge.net/fuse/fuse-%{version}.tar.gz
22 # Source0-md5: 250d89b9c7b6ecf531df60c67f75737d
24 Patch0: %{name}-configure.in.patch
25 Patch1: %{name}-perm.patch
26 URL: http://fuse.sourceforge.net/
27 BuildRequires: autoconf
28 BuildRequires: automake
30 %{?with_dist_kernel:BuildRequires: kernel-module-build >= 2.6.7}
32 BuildRequires: libtool
33 BuildRequires: sed >= 4.0
34 %{?with_dist_kernel:%requires_releq_kernel_up}
35 Requires(post,postun): /sbin/depmod
36 %{?with_dist_kernel:Requires(postun): kernel}
37 Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 FUSE (Filesystem in Userspace) is a simple interface for userspace
41 programs to export a virtual filesystem to the Linux kernel. FUSE also
42 aims to provide a secure method for non privileged users to create and
43 mount their own filesystem implementations.
46 FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
47 u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
48 FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
49 montowania w³asnych implementacji systemów plików przez zwyk³ych
50 (nieuprzywilejowanych) u¿ytkowników.
52 %package -n kernel-smp-misc-fuse
53 Summary: Filesystem in Userspace
54 Summary(pl): System plików w przestrzeni u¿ytkownika
55 Release: %{_rel}@%{_kernel_ver_str}
58 Provides: kernel-misc-fuse
59 %{?with_dist_kernel:%requires_releq_kernel_smp}
60 Requires(post,postun): /sbin/depmod
61 %{?with_dist_kernel:Requires(postun): kernel-smp}
63 %description -n kernel-smp-misc-fuse
64 FUSE (Filesystem in Userspace) is a simple interface for userspace
65 programs to export a virtual filesystem to the Linux kernel. FUSE also
66 aims to provide a secure method for non privileged users to create and
67 mount their own filesystem implementations.
69 %description -n kernel-smp-misc-fuse -l pl
70 FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
71 u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
72 FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
73 montowania w³asnych implementacji systemów plików przez zwyk³ych
74 (nieuprzywilejowanych) u¿ytkowników.
77 Summary: Shared library for Filesytem in Userspace
78 Summary(pl): Biblioteki dzielone Systemu plików w przestrzeni u¿ytkownika
79 Group: Applications/System
83 %description -n libfuse
84 Shared library for Filesytem in Userspace
86 %description -n libfuse -l pl
87 Biblioteki dzielone Systemu plików w przestrzeni u¿ytkownika
89 %package -n libfuse-devel
90 Summary: Filesytem in Userspace - Development header fiels and libraries
91 Summary(pl): Systemu plików w przestrzeni u¿ytkownika - Biblioteki dzielone
92 Group: Development/Libraries
94 Requires: libfuse = %{epoch}:%{version}-%{_rel}
96 %description -n libfuse-devel
97 Libfuse library header files.
99 %description -n libfuse-devel -l pl
100 Libfuse biblioteki nag³ówkowe dla programistów.
102 %package -n libfuse-static
103 Summary: Filesytem in Userspace - static libraries
104 Summary(pl): Systemu plików w przestrzeni u¿ytkownika - Biblioteki statyczne
105 Group: Development/Libraries
107 Requires: libfuse-devel = %{epoch}:%{version}-%{_rel}
109 %description -n libfuse-static
110 Static libfuse libraries.
112 %description -n libfuse-static -l pl
113 Statyczne biblioteki libfuse
116 %setup -q -n fuse-%{version}
119 sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_libdir}/fusermount,' lib/mount.c
130 --with-kernel=%{_kernelsrcdir}
135 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
136 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
140 install -d include/{linux,config}
141 ln -sf %{_kernelsrcdir}/config-$cfg .config
142 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
143 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
144 %if %{without dist_kernel}
145 ln -sf %{_kernelsrcdir}/scripts
147 touch include/config/MARKER
148 %{__make} -C %{_kernelsrcdir} clean \
149 RCS_FIND_IGNORE="-name '*.ko' -o" \
152 %{__make} -C %{_kernelsrcdir} modules \
153 EXTRA_CFLAGS='-I../include -DFUSE_VERSION=\"2.2\"' \
154 RCS_FIND_IGNORE="-name '*.ko' -o" \
155 CC="%{__cc}" CPP="%{__cpp}" \
159 mv fuse.ko fuse-$cfg.ko
164 %if %{with userspace}
165 cp kernel/fuse_kernel.h include/
166 for DIR in include lib util; do
172 rm -rf $RPM_BUILD_ROOT
173 install -d $RPM_BUILD_ROOT{%{_libdir},%{_pkgconfigdir},/etc}
175 %if %{with userspace}
176 for DIR in include lib util; do
177 %{__make} -C $DIR install \
178 DESTDIR=$RPM_BUILD_ROOT
181 mv $RPM_BUILD_ROOT%{_bindir}/fusermount $RPM_BUILD_ROOT%{_libdir}
182 install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
183 install %{SOURCE1} $RPM_BUILD_ROOT/etc
188 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/fs
189 install fuse-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
190 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko
191 %if %{with smp} && %{with dist_kernel}
192 install fuse-smp.ko \
193 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko
198 rm -rf $RPM_BUILD_ROOT
201 %depmod %{_kernel_ver}
204 %depmod %{_kernel_ver}
206 %post -n kernel-smp-misc-fuse
207 %depmod %{_kernel_ver}smp
209 %postun -n kernel-smp-misc-fuse
210 %depmod %{_kernel_ver}smp
212 %post -n libfuse -p /sbin/ldconfig
213 %postun -n libfuse -p /sbin/ldconfig
217 %defattr(644,root,root,755)
218 %doc README NEWS ChangeLog AUTHORS doc/*
219 /lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*
221 %if %{with smp} && %{with dist_kernel}
222 %files -n kernel-smp-misc-fuse
223 %defattr(644,root,root,755)
224 %doc README NEWS ChangeLog AUTHORS doc/*
225 /lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko*
229 %if %{with userspace}
231 %defattr(644,root,root,755)
232 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/fuse.conf
233 %attr(755,root,root) %{_libdir}/libfuse.so.*.*.*
234 %attr(755,root,root) %{_libdir}/fusermount
236 %files -n libfuse-devel
237 %defattr(644,root,root,755)
239 %{_libdir}/libfuse.la
240 %attr(755,root,root) %{_libdir}/libfuse.so
241 %{_pkgconfigdir}/fuse.pc
243 %files -n libfuse-static
244 %defattr(644,root,root,755)