3 %bcond_without dist_kernel # without distribution kernel
4 %bcond_without kernel # don't build kernel modules
5 %bcond_with verbose # verbose build (V=1)
6 %bcond_without userspace # don't build userspace tools
13 %undefine with_dist_kernel
15 %if "%{_alt_kernel}" != "%{nil}"
16 %undefine with_userspace
18 %if %{without userspace}
19 # nothing to be placed to debuginfo package
20 %define _enable_debug_packages 0
25 Summary: (Secure) SHell FileSystem utilities
26 Summary(pl.UTF-8): Narzędzia obsługujące system plików przez ssh
27 Name: %{pname}%{_alt_kernel}
31 Group: Applications/System
32 Source0: http://dl.sourceforge.net/shfs/%{pname}-%{version}.tar.gz
33 # Source0-md5: 016f49d71bc32eee2b5d11fc1600cfbe
34 Patch0: %{pname}-opt.patch
35 Patch1: %{pname}-df.patch
36 Patch2: %{pname}-space_chars.patch
37 Patch3: %{pname}-uidgid32.patch
38 Patch4: %{pname}-gcc4.patch
39 Patch5: %{pname}-inode_oops.patch
40 Patch6: %{pname}-d_entry.patch
41 Patch7: %{pname}-shfs_get_sb.patch
42 Patch8: %{pname}-2.6.19.patch
43 Patch9: %{pname}-kmem_cache.patch
44 URL: http://shfs.sourceforge.net/
46 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
47 BuildRequires: rpmbuild(macros) >= 1.379
49 %{?with_dist_kernel:Requires: kernel(shfs)}
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 SHFS is a simple and easy to use Linux kernel 2.4.10+ and 2.6 module
55 which allows you to mount remote filesystems using plain shell
56 (ssh/rsh) connection. It supports some nice features like number of
57 different caches for access speedup, target system optimisations, etc.
59 This package contains utilities for SHFS.
61 %description -l pl.UTF-8
62 SHFS to prosty i łatwy w użyciu moduł jądra Linuksa 2.4.10+ i 2.6
63 pozwalający montować zdalne systemy plików przy użyciu zwykłego
64 połączenia ze zdalną powłoką (ssh lub rsh). Obsługuje pewne miłe
65 cechy, takie jak różne sposoby buforowania dla przyspieszenia dostępu,
66 optymalizacje pod kątem zdalnego systemu itp.
68 Ten pakiet zawiera programy narzędziowe dla SHFS.
70 %package -n kernel%{_alt_kernel}-fs-shfs
71 Summary: SHell File System Linux kernel module
72 Summary(pl.UTF-8): Moduł jądra Linuksa obsługujący powłokowy system plików
73 Release: %{rel}@%{_kernel_ver_str}
75 Requires(post,postun): /sbin/depmod
76 %if %{with dist_kernel}
77 %requires_releq_kernel
78 Requires(postun): %releq_kernel
80 Provides: kernel(shfs)
81 %if "%{_alt_kernel}" == "%{nil}"
82 Obsoletes: kernel-misc-shfs
85 %description -n kernel%{_alt_kernel}-fs-shfs
86 SHell File System Linux kernel module.
88 %description -n kernel%{_alt_kernel}-fs-shfs -l pl.UTF-8
89 Moduł jądra Linuksa obsługujący powłokowy system plików.
92 %setup -q -n %{pname}-%{version}
104 cat > shfs/Linux-2.6/Makefile <<'EOF'
106 shfs-objs := dcache.o dir.o fcache.o file.o inode.o \
107 ioctl.o proc.o shell.o symlink.o
112 %build_kernel_modules -C shfs/Linux-2.6 -m shfs
115 %if %{with userspace}
116 %{__make} -C shfsmount \
117 SHFS_VERSION="\"%{version}\"" \
118 CC="%{__cc} %{rpmcflags}" \
120 LDFLAGS="%{rpmldflags}"
125 rm -rf $RPM_BUILD_ROOT
128 %install_kernel_modules -m shfs/Linux-2.6/shfs -d kernel/fs/shfs
131 %if %{with userspace}
132 %{__make} utils-install docs-install \
133 ROOT=$RPM_BUILD_ROOT \
134 MAN_PAGE_DIR=%{_mandir}
138 rm -rf $RPM_BUILD_ROOT
140 %post -n kernel%{_alt_kernel}-fs-shfs
141 %depmod %{_kernel_ver}
143 %postun -n kernel%{_alt_kernel}-fs-shfs
144 %depmod %{_kernel_ver}
146 %if %{with userspace}
148 %defattr(644,root,root,755)
149 %doc COPYRIGHT Changelog TODO docs/html
150 %attr(4754,root,wheel) %{_bindir}/shfsmount
151 %attr(4754,root,wheel) %{_bindir}/shfsumount
152 %attr(755,root,root) /sbin/*
157 %files -n kernel%{_alt_kernel}-fs-shfs
158 %defattr(644,root,root,755)
159 %dir /lib/modules/%{_kernel_ver}/kernel/fs/shfs
160 /lib/modules/%{_kernel_ver}/kernel/fs/shfs/shfs.ko*