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
7 %bcond_with grsec_kernel # build for kernel-grsecurity
9 %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
10 %define alt_kernel grsecurity
18 Summary: (Secure) SHell FileSystem utilities
19 Summary(pl.UTF-8): Narzędzia obsługujące system plików przez ssh
24 Group: Applications/System
25 Source0: http://dl.sourceforge.net/shfs/%{name}-%{version}.tar.gz
26 # Source0-md5: 016f49d71bc32eee2b5d11fc1600cfbe
27 Patch0: %{name}-opt.patch
28 Patch1: %{name}-df.patch
29 Patch2: %{name}-space_chars.patch
30 Patch3: %{name}-uidgid32.patch
31 Patch4: %{name}-gcc4.patch
32 Patch5: %{name}-inode_oops.patch
33 Patch6: %{name}-d_entry.patch
34 Patch7: %{name}-shfs_get_sb.patch
35 Patch8: %{name}-2.6.19.patch
36 URL: http://shfs.sourceforge.net/
38 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7}
39 BuildRequires: rpmbuild(macros) >= 1.379
41 %{?with_dist_kernel:Requires: kernel(shfs)}
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 SHFS is a simple and easy to use Linux kernel 2.4.10+ and 2.6 module
47 which allows you to mount remote filesystems using plain shell
48 (ssh/rsh) connection. It supports some nice features like number of
49 different caches for access speedup, target system optimisations, etc.
51 This package contains utilities for SHFS.
53 %description -l pl.UTF-8
54 SHFS to prosty i łatwy w użyciu moduł jądra Linuksa 2.4.10+ i 2.6
55 pozwalający montować zdalne systemy plików przy użyciu zwykłego
56 połączenia ze zdalną powłoką (ssh lub rsh). Obsługuje pewne miłe
57 cechy, takie jak różne sposoby buforowania dla przyspieszenia dostępu,
58 optymalizacje pod kątem zdalnego systemu itp.
60 Ten pakiet zawiera programy narzędziowe dla SHFS.
62 %package -n kernel%{_alt_kernel}-fs-shfs
63 Summary: SHell File System Linux kernel module
64 Summary(pl.UTF-8): Moduł jądra Linuksa obsługujący powłokowy system plików
65 Release: %{_rel}@%{_kernel_ver_str}
67 Requires(post,postun): /sbin/depmod
68 %if %{with dist_kernel}
69 %requires_releq_kernel
70 Requires(postun): %releq_kernel
72 Provides: kernel(shfs)
73 %if "%{_alt_kernel}" == "%{nil}"
74 Obsoletes: kernel-misc-shfs
77 %description -n kernel%{_alt_kernel}-fs-shfs
78 SHell File System Linux kernel module.
80 %description -n kernel%{_alt_kernel}-fs-shfs -l pl.UTF-8
81 Moduł jądra Linuksa obsługujący powłokowy system plików.
95 cat > shfs/Linux-2.6/Makefile <<'EOF'
97 shfs-objs := dcache.o dir.o fcache.o file.o inode.o \
98 ioctl.o proc.o shell.o symlink.o
103 %build_kernel_modules -C shfs/Linux-2.6 -m shfs
106 %if %{with userspace}
107 %{__make} -C shfsmount \
108 SHFS_VERSION="\"%{version}\"" \
109 CC="%{__cc} %{rpmcflags}" \
111 LDFLAGS="%{rpmldflags}"
116 rm -rf $RPM_BUILD_ROOT
119 %install_kernel_modules -m shfs/Linux-2.6/shfs -d kernel/fs/shfs
122 %if %{with userspace}
123 %{__make} utils-install docs-install \
124 ROOT=$RPM_BUILD_ROOT \
125 MAN_PAGE_DIR=%{_mandir}
129 rm -rf $RPM_BUILD_ROOT
131 %post -n kernel%{_alt_kernel}-fs-shfs
132 %depmod %{_kernel_ver}
134 %postun -n kernel%{_alt_kernel}-fs-shfs
135 %depmod %{_kernel_ver}
137 %if %{with userspace}
139 %defattr(644,root,root,755)
140 %doc COPYRIGHT Changelog TODO docs/html
141 %attr(4754,root,wheel) %{_bindir}/shfsmount
142 %attr(4754,root,wheel) %{_bindir}/shfsumount
143 %attr(755,root,root) /sbin/*
148 %files -n kernel%{_alt_kernel}-fs-shfs
149 %defattr(644,root,root,755)
150 %dir /lib/modules/%{_kernel_ver}/kernel/fs/shfs
151 /lib/modules/%{_kernel_ver}/kernel/fs/shfs/shfs.ko*