3 %bcond_without dist_kernel # without distribution kernel
4 %bcond_without kernel # don't build kernel modules
5 %bcond_without smp # don't build SMP module
6 %bcond_with verbose # verbose build (V=1)
7 %bcond_without userspace # don't build userspace tools
14 Summary: (Secure) SHell FileSystem utilities
15 Summary(pl): Narzêdzia obs³uguj±ce system plików przez ssh
20 Group: Applications/System
21 Source0: http://dl.sourceforge.net/shfs/%{name}-%{version}.tar.gz
22 # Source0-md5: 016f49d71bc32eee2b5d11fc1600cfbe
23 Patch0: %{name}-opt.patch
24 Patch1: %{name}-df.patch
25 Patch2: %{name}-space_chars.patch
26 Patch3: %{name}-uidgid32.patch
27 Patch4: %{name}-gcc4.patch
28 Patch5: %{name}-inode_oops.patch
29 URL: http://shfs.sourceforge.net/
31 %{?with_dist_kernel:BuildRequires: kernel-module-build >= 2.6.7}
32 BuildRequires: rpmbuild(macros) >= 1.153
34 %{?with_dist_kernel:Requires: kernel-fs-shfs}
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 SHFS is a simple and easy to use Linux kernel 2.4.10+ and 2.6 module
40 which allows you to mount remote filesystems using plain shell
41 (ssh/rsh) connection. It supports some nice features like number of
42 different caches for access speedup, target system optimisations, etc.
44 This package contains utilities for SHFS.
47 SHFS to prosty i ³atwy w u¿yciu modu³ j±dra Linuksa 2.4.10+ i 2.6
48 pozwalaj±cy montowaæ zdalne systemy plików przy u¿yciu zwyk³ego
49 po³±czenia ze zdaln± pow³ok± (ssh lub rsh). Obs³uguje pewne mi³e
50 cechy, takie jak ró¿ne sposoby buforowania dla przyspieszenia dostêpu,
51 optymalizacje pod k±tem zdalnego systemu itp.
53 Ten pakiet zawiera programy narzêdziowe dla SHFS.
55 %package -n kernel-fs-shfs
56 Summary: SHell File System Linux kernel module
57 Summary(pl): Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików
58 Release: %{_rel}@%{_kernel_ver_str}
60 Requires(post,postun): /sbin/depmod
61 %if %{with dist_kernel}
62 %requires_releq_kernel_up
63 Requires(postun): %releq_kernel_up
65 Obsoletes: kernel-misc-shfs
67 %description -n kernel-fs-shfs
68 SHell File System Linux kernel module.
70 %description -n kernel-fs-shfs -l pl
71 Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików.
73 %package -n kernel-smp-fs-shfs
74 Summary: SHell File System Linux SMP kernel module
75 Summary(pl): Modu³ j±dra Linuksa SMP obs³uguj±cy pow³okowy system plików
76 Release: %{_rel}@%{_kernel_ver_str}
78 Requires(post,postun): /sbin/depmod
79 %if %{with dist_kernel}
80 %requires_releq_kernel_smp
81 Requires(postun): %releq_kernel_smp
83 Provides: kernel-fs-shfs
84 Obsoletes: kernel-fs-shfs
85 Obsoletes: kernel-smp-misc-shfs
87 %description -n kernel-fs-shfs
88 SHell File System Linux kernel module.
90 %description -n kernel-smp-fs-shfs -l pl
91 Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików.
105 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
106 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
109 install -d o/include/linux
110 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
111 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
112 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
113 %{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
115 echo "obj-m := shfs.o" > Makefile
116 echo "shfs-objs := dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o" >> Makefile
117 %{__make} -C %{_kernelsrcdir} clean \
118 %{?with_verbose:V=1} \
119 RCS_FIND_IGNORE="-name '*.ko' -o" \
121 %{__make} -C %{_kernelsrcdir} modules \
122 %if "%{_target_base_arch}" != "%{_arch}"
123 ARCH=%{_target_base_arch} \
124 CROSS_COMPILE=%{_target_base_cpu}-pld-linux- \
127 %{?with_verbose:V=1} \
129 mv shfs.ko shfs-$cfg.ko
134 %if %{with userspace}
135 %{__make} -C shfsmount \
136 SHFS_VERSION=\"%{version}\" \
137 CC="%{__cc} %{rpmcflags}" \
139 LDFLAGS="%{rpmldflags}"
144 rm -rf $RPM_BUILD_ROOT
148 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/fs/shfs
149 install shfs-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
150 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/fs/shfs/shfs.ko
151 %if %{with smp} && %{with dist_kernel}
152 install shfs-smp.ko \
153 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/fs/shfs/shfs.ko
158 %if %{with userspace}
159 %{__make} utils-install docs-install \
160 ROOT=$RPM_BUILD_ROOT \
161 MAN_PAGE_DIR=%{_mandir}
165 rm -rf $RPM_BUILD_ROOT
167 %post -n kernel-fs-shfs
168 %depmod %{_kernel_ver}
170 %postun -n kernel-fs-shfs
171 %depmod %{_kernel_ver}
173 %post -n kernel-smp-fs-shfs
174 %depmod %{_kernel_ver}smp
176 %postun -n kernel-smp-fs-shfs
177 %depmod %{_kernel_ver}smp
179 %if %{with userspace}
181 %defattr(644,root,root,755)
182 %doc COPYRIGHT Changelog TODO docs/html
183 %attr(4754,root,wheel) %{_bindir}/shfsmount
184 %attr(4754,root,wheel) %{_bindir}/shfsumount
185 %attr(755,root,root) /sbin/*
190 %files -n kernel-fs-shfs
191 %defattr(644,root,root,755)
192 /lib/modules/%{_kernel_ver}/kernel/fs/shfs
194 %if %{with smp} && %{with dist_kernel}
195 %files -n kernel-smp-fs-shfs
196 %defattr(644,root,root,755)
197 /lib/modules/%{_kernel_ver}smp/kernel/fs/shfs