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
84 %description -n libfuse
85 Shared library for Filesytem in Userspace
87 %description -n libfuse -l pl
88 Biblioteki dzielone Systemu plików w przestrzeni u¿ytkownika
90 %package -n libfuse-devel
91 Summary: Filesytem in Userspace - Development header fiels and libraries
92 Summary(pl): Systemu plików w przestrzeni u¿ytkownika - Biblioteki dzielone
93 Group: Development/Libraries
95 Requires: libfuse = %{epoch}:%{version}-%{_rel}
97 %description -n libfuse-devel
98 Libfuse library header files.
100 %description -n libfuse-devel -l pl
101 Libfuse biblioteki nag³ówkowe dla programistów.
103 %package -n libfuse-static
104 Summary: Filesytem in Userspace - static libraries
105 Summary(pl): Systemu plików w przestrzeni u¿ytkownika - Biblioteki statyczne
106 Group: Development/Libraries
108 Requires: libfuse-devel = %{epoch}:%{version}-%{_rel}
110 %description -n libfuse-static
111 Static libfuse libraries.
113 %description -n libfuse-static -l pl
114 Statyczne biblioteki libfuse
117 %setup -q -n fuse-%{version}
120 sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_libdir}/fusermount,' lib/mount.c
131 --with-kernel=%{_kernelsrcdir}
136 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
137 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
141 install -d include/{linux,config}
142 ln -sf %{_kernelsrcdir}/config-$cfg .config
143 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
144 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
145 %if %{without dist_kernel}
146 ln -sf %{_kernelsrcdir}/scripts
148 touch include/config/MARKER
149 %{__make} -C %{_kernelsrcdir} clean \
150 RCS_FIND_IGNORE="-name '*.ko' -o" \
153 %{__make} -C %{_kernelsrcdir} modules \
154 EXTRA_CFLAGS='-I../include -DFUSE_VERSION=\"2.2\"' \
155 RCS_FIND_IGNORE="-name '*.ko' -o" \
156 CC="%{__cc}" CPP="%{__cpp}" \
160 mv fuse.ko fuse-$cfg.ko
165 %if %{with userspace}
166 cp kernel/fuse_kernel.h include/
167 for DIR in include lib util; do
173 rm -rf $RPM_BUILD_ROOT
174 install -d $RPM_BUILD_ROOT{%{_libdir},%{_pkgconfigdir},/etc}
176 %if %{with userspace}
177 for DIR in include lib util; do
178 %{__make} -C $DIR install \
179 DESTDIR=$RPM_BUILD_ROOT
182 mv $RPM_BUILD_ROOT%{_bindir}/fusermount $RPM_BUILD_ROOT%{_libdir}
183 install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
184 install %{SOURCE1} $RPM_BUILD_ROOT/etc
189 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/fs
190 install fuse-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
191 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko
192 %if %{with smp} && %{with dist_kernel}
193 install fuse-smp.ko \
194 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko
199 rm -rf $RPM_BUILD_ROOT
202 %depmod %{_kernel_ver}
205 %depmod %{_kernel_ver}
207 %post -n kernel-smp-misc-fuse
208 %depmod %{_kernel_ver}smp
210 %postun -n kernel-smp-misc-fuse
211 %depmod %{_kernel_ver}smp
213 %post -n libfuse -p /sbin/ldconfig
214 %postun -n libfuse -p /sbin/ldconfig
218 %defattr(644,root,root,755)
219 %doc README NEWS ChangeLog AUTHORS doc/*
220 /lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*
222 %if %{with smp} && %{with dist_kernel}
223 %files -n kernel-smp-misc-fuse
224 %defattr(644,root,root,755)
225 %doc README NEWS ChangeLog AUTHORS doc/*
226 /lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko*
230 %if %{with userspace}
232 %defattr(644,root,root,755)
233 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/fuse.conf
234 %attr(755,root,root) %{_libdir}/libfuse.so.*.*.*
235 %attr(755,root,root) %{_libdir}/fusermount
237 %files -n libfuse-devel
238 %defattr(644,root,root,755)
240 %{_libdir}/libfuse.la
241 %attr(755,root,root) %{_libdir}/libfuse.so
242 %{_pkgconfigdir}/fuse.pc
244 %files -n libfuse-static
245 %defattr(644,root,root,755)