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 URL: http://shfs.sourceforge.net/
22 %{?with_dist_kernel:BuildRequires: kernel-module-build >= 2.6.7}
23 BuildRequires: %{kgcc_package}
25 BuildRequires: rpmbuild(macros) >= 1.153
26 Requires: kernel-fs-shfs = %{version}-%{_rel}@%{_kernel_ver_str}
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.
86 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
87 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
91 install -d include/{linux,config}
92 ln -sf %{_kernelsrcdir}/config-$cfg .config
93 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
94 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
95 touch include/config/MARKER
96 echo "obj-m := shfs.o" > Makefile
97 echo "shfs-objs := dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o" >> Makefile
98 %{__make} -C %{_kernelsrcdir} clean \
99 %{?with_verbose:V=1} \
100 RCS_FIND_IGNORE="-name '*.ko' -o" \
102 %{__make} -C %{_kernelsrcdir} modules \
103 %{?with_verbose:V=1} \
105 mv shfs.ko shfs-$cfg.ko
110 %if %{with userspace}
111 %{__make} -C shfsmount \
112 SHFS_VERSION=\"%{version}\" \
115 LDFLAGS="%{rpmldflags}"
120 rm -rf $RPM_BUILD_ROOT
124 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/fs/shfs
125 install shfs-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
126 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/fs/shfs/shfs.ko
127 %if %{with smp} && %{with dist_kernel}
128 install shfs-smp.ko \
129 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/fs/shfs/shfs.ko
134 %if %{with userspace}
135 %{__make} utils-install docs-install \
136 ROOT=$RPM_BUILD_ROOT \
137 MAN_PAGE_DIR=%{_mandir}
141 rm -rf $RPM_BUILD_ROOT
143 %post -n kernel-fs-shfs
144 %depmod %{_kernel_ver}
146 %postun -n kernel-fs-shfs
147 %depmod %{_kernel_ver}
149 %post -n kernel-smp-fs-shfs
150 %depmod %{_kernel_ver}smp
152 %postun -n kernel-smp-fs-shfs
153 %depmod %{_kernel_ver}smp
155 %if %{with userspace}
157 %defattr(644,root,root,755)
158 %doc COPYRIGHT Changelog TODO docs/html
159 %attr(755,root,root) %{_bindir}/*
160 %attr(755,root,root) /sbin/*
165 %files -n kernel-fs-shfs
166 %defattr(644,root,root,755)
167 /lib/modules/%{_kernel_ver}/kernel/fs/shfs
169 %if %{with smp} && %{with dist_kernel}
170 %files -n kernel-smp-fs-shfs
171 %defattr(644,root,root,755)
172 /lib/modules/%{_kernel_ver}smp/kernel/fs/shfs