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
9 Summary: (Secure) SHell FileSystem utilities
10 Summary(pl): Narzêdzia obs³uguj±ce system plików przez ssh
16 Group: Applications/System
17 Source0: http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
18 # Source0-md5: 016f49d71bc32eee2b5d11fc1600cfbe
19 Patch0: %{name}-opt.patch
20 Patch1: %{name}-df.patch
21 URL: http://shfs.sourceforge.net/
23 %{?with_dist_kernel:BuildRequires: kernel-module-build >= 2.6.7}
24 BuildRequires: %{kgcc_package}
26 BuildRequires: rpmbuild(macros) >= 1.153
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 SHFS is a simple and easy to use Linux kernel (2.4) module which
32 allows you to mount remote filesystems using plain shell (ssh/rsh)
33 connection. It supports some nice features like number of different
34 caches for access speedup, target system optimisations, etc.
36 This package contains utilities for SHFS.
39 SHFS to prosty i ³atwy w u¿yciu modu³ j±dra Linuksa (2.4) pozwalaj±cy
40 montowaæ zdalne systemy plików przy u¿yciu zwyk³ego po³±czenia ze
41 zdaln± pow³ok± (ssh lub rsh). Obs³uguje pewne mi³e cechy, takie jak
42 ró¿ne sposoby buforowania dla przyspieszenia dostêpu, optymalizacje
43 pod k±tem zdalnego systemu itp.
45 Ten pakiet zawiera programy narzêdziowe dla SHFS.
47 %package -n kernel-fs-shfs
48 Summary: SHell File System Linux kernel module
49 Summary(pl): Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików
50 Release: %{_rel}@%{_kernel_ver_str}
52 %{?with_dist_kernel:%requires_releq_kernel_up}
53 Requires(post,postun): /sbin/depmod
54 Obsoletes: kernel-misc-shfs
56 %description -n kernel-fs-shfs
57 SHell File System Linux kernel module.
59 %description -n kernel-fs-shfs -l pl
60 Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików.
62 %package -n kernel-smp-fs-shfs
63 Summary: SHell File System Linux SMP kernel module
64 Summary(pl): Modu³ j±dra Linuksa SMP obs³uguj±cy pow³okowy system plików
65 Release: %{_rel}@%{_kernel_ver_str}
67 %{?with_dist_kernel:%requires_releq_kernel_smp}
68 Requires(post,postun): /sbin/depmod
69 Provides: kernel-fs-shfs
70 Obsoletes: kernel-fs-shfs
71 Obsoletes: kernel-smp-misc-shfs
73 %description -n kernel-fs-shfs
74 SHell File System Linux kernel module.
76 %description -n kernel-smp-fs-shfs -l pl
77 Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików.
87 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
88 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
92 install -d include/{linux,config}
93 ln -sf %{_kernelsrcdir}/config-$cfg .config
94 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
95 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
96 touch include/config/MARKER
97 echo "obj-m := shfs.o" > Makefile
98 echo "shfs-objs := dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o" >> Makefile
99 %{__make} -C %{_kernelsrcdir} clean \
100 %{?with_verbose:V=1} \
101 RCS_FIND_IGNORE="-name '*.ko' -o" \
103 %{__make} -C %{_kernelsrcdir} modules \
104 %{?with_verbose:V=1} \
106 mv shfs.ko shfs-$cfg.ko
111 %if %{with userspace}
112 %{__make} -C shfsmount \
113 SHFS_VERSION=\"%{version}\" \
116 LDFLAGS="%{rpmldflags}"
121 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/fs/shfs
126 install shfs-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
127 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/fs/shfs/shfs.ko
128 %if %{with smp} && %{with dist_kernel}
129 install shfs-smp.ko \
130 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/fs/shfs/shfs.ko
135 %if %{with userspace}
136 %{__make} utils-install docs-install \
137 ROOT=$RPM_BUILD_ROOT \
138 MAN_PAGE_DIR=%{_mandir}
142 rm -rf $RPM_BUILD_ROOT
144 %post -n kernel-fs-shfs
145 %depmod %{_kernel_ver}
147 %postun -n kernel-fs-shfs
148 %depmod %{_kernel_ver}
150 %post -n kernel-smp-fs-shfs
151 %depmod %{_kernel_ver}smp
153 %postun -n kernel-smp-fs-shfs
154 %depmod %{_kernel_ver}smp
156 %if %{with userspace}
158 %defattr(644,root,root,755)
159 %doc COPYRIGHT Changelog TODO docs/html
160 %attr(755,root,root) %{_bindir}/*
161 %attr(755,root,root) /sbin/*
166 %files -n kernel-fs-shfs
167 %defattr(644,root,root,755)
168 /lib/modules/%{_kernel_ver}/kernel/fs/shfs
170 %if %{with smp} && %{with dist_kernel}
171 %files -n kernel-smp-fs-shfs
172 %defattr(644,root,root,755)
173 /lib/modules/%{_kernel_ver}smp/kernel/fs/shfs