]> git.pld-linux.org Git - packages/shfs.git/blobdiff - shfs.spec
- patch for kmem_cache_t -> struct kmem_cache (prefered since 2.6.20, required by...
[packages/shfs.git] / shfs.spec
index 61037a34b563ebd6971fb463745895405d3de989..6f5c46c3efed26781231ca8e5792d6d48b6a20f0 100644 (file)
--- a/shfs.spec
+++ b/shfs.spec
-Summary:       (Secure) SHell FileSystem Linux kernel module
-Summary(pl):   Modu³ j±dra wspieraj±cy system plików przez ssh
+#
+# Conditional build:
+%bcond_without dist_kernel     # without distribution kernel
+%bcond_without kernel          # don't build kernel modules
+%bcond_with    verbose         # verbose build (V=1)
+%bcond_without userspace       # don't build userspace tools
+%bcond_with    grsec_kernel    # build for kernel-grsecurity
+#
+%if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
+%define        alt_kernel      grsecurity
+%endif
+#
+%ifarch sparc
+%undefine      with_smp
+%endif
+#
+%define                _rel    20
+Summary:       (Secure) SHell FileSystem utilities
+Summary(pl.UTF-8):     Narzędzia obsługujące system plików przez ssh
 Name:          shfs
-Version:       0.32pre1
-Release:       3
-License:       GPL
-Group:         Applications/Mail
-# Source0-md5: eb4840e893da72f6169796b020a77769
-Source0:       http://atrey.karlin.mff.cuni.cz/~qiq/src/shfs/%{name}-%{version}.tar.gz
-Requires:      kernel-headers
-Requires(post,postun): /sbin/depmod
-BuildRequires: %{kgcc_package}
-BuildRequires: rpmbuild(macros) >= 1.118
+Version:       0.35
+Release:       %{_rel}
+License:       GPL v2
+Group:         Applications/System
+Source0:       http://dl.sourceforge.net/shfs/%{name}-%{version}.tar.gz
+# Source0-md5: 016f49d71bc32eee2b5d11fc1600cfbe
+Patch0:                %{name}-opt.patch
+Patch1:                %{name}-df.patch
+Patch2:                %{name}-space_chars.patch
+Patch3:                %{name}-uidgid32.patch
+Patch4:                %{name}-gcc4.patch
+Patch5:                %{name}-inode_oops.patch
+Patch6:                %{name}-d_entry.patch
+Patch7:                %{name}-shfs_get_sb.patch
+Patch8:                %{name}-2.6.19.patch
+Patch9:                %{name}-kmem_cache.patch
 URL:           http://shfs.sourceforge.net/
+%if %{with kernel}
+%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
+BuildRequires: rpmbuild(macros) >= 1.379
+%endif
+%{?with_dist_kernel:Requires:  kernel(shfs)}
+Obsoletes:     shfsmount
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-SHFS is a simple and easy to use Linux kernel (2.4) module which
-allows you to mount remote filesystems using plain shell (ssh/rsh)
-connection. It supports some nice features like number of different
-caches for access speedup, target system optimisations, etc.
-
-%description -l pl
-SHFS to prosty i bezpieczny pomys³, aby zaimplementowaæ modu³ systemu
-plików bazuj±cy na po³±czaniu przez ssh (secure shell).
-
-%package -n shfs-kernel
-Summary:       SHFS Linux kernel module
-Summary(pl):   Modu³ j±dra wspieraj±cy system plików przez ssh 
-#Release:      %{version}_%{release}@%{_kernel_ver_str}
-Release:       %{release}@%{_kernel_ver_str}
+SHFS is a simple and easy to use Linux kernel 2.4.10+ and 2.6 module
+which allows you to mount remote filesystems using plain shell
+(ssh/rsh) connection. It supports some nice features like number of
+different caches for access speedup, target system optimisations, etc.
+
+This package contains utilities for SHFS.
+
+%description -l pl.UTF-8
+SHFS to prosty i łatwy w użyciu moduł jądra Linuksa 2.4.10+ i 2.6
+pozwalający montować zdalne systemy plików przy użyciu zwykłego
+połączenia ze zdalną powłoką (ssh lub rsh). Obsługuje pewne miłe
+cechy, takie jak różne sposoby buforowania dla przyspieszenia dostępu,
+optymalizacje pod kątem zdalnego systemu itp.
+
+Ten pakiet zawiera programy narzędziowe dla SHFS.
+
+%package -n kernel%{_alt_kernel}-fs-shfs
+Summary:       SHell File System Linux kernel module
+Summary(pl.UTF-8):     Moduł jądra Linuksa obsługujący powłokowy system plików
+Release:       %{_rel}@%{_kernel_ver_str}
 Group:         Base/Kernel
 Requires(post,postun): /sbin/depmod
+%if %{with dist_kernel}
+%requires_releq_kernel
+Requires(postun):      %releq_kernel
+%endif
+Provides:      kernel(shfs)
+%if "%{_alt_kernel}" == "%{nil}"
+Obsoletes:     kernel-misc-shfs
+%endif
 
-%description -n shfs-kernel
-Linux kernel module for SHFS
+%description -n kernel%{_alt_kernel}-fs-shfs
+SHell File System Linux kernel module.
 
-%description -n shfs-kernel -l pl
-Modu³ j±dra obs³uguj±cy SHFS
+%description -n kernel%{_alt_kernel}-fs-shfs -l pl.UTF-8
+Moduł jądra Linuksa obsługujący powłokowy system plików.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p0
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+
+cat > shfs/Linux-2.6/Makefile <<'EOF'
+obj-m := shfs.o
+shfs-objs := dcache.o dir.o fcache.o file.o inode.o \
+               ioctl.o proc.o shell.o symlink.o
+EOF
 
 %build
-%{__make} CC="%{kgcc}"
+%if %{with kernel}
+%build_kernel_modules -C shfs/Linux-2.6 -m shfs
+%endif
+
+%if %{with userspace}
+%{__make} -C shfsmount \
+       SHFS_VERSION="\"%{version}\"" \
+       CC="%{__cc} %{rpmcflags}" \
+       LINKER="%{__cc}"        \
+       LDFLAGS="%{rpmldflags}"
+%{__make} docs
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install ROOT="$RPM_BUILD_ROOT"
-install -d $RPM_BUILD_ROOT/%{_mandir}/man8
-install docs/manpages/*.8 $RPM_BUILD_ROOT/%{_mandir}/man8
+
+%if %{with kernel}
+%install_kernel_modules -m shfs/Linux-2.6/shfs -d kernel/fs/shfs
+%endif
+
+%if %{with userspace}
+%{__make} utils-install docs-install \
+       ROOT=$RPM_BUILD_ROOT \
+       MAN_PAGE_DIR=%{_mandir}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -n shfs-kernel
+%post  -n kernel%{_alt_kernel}-fs-shfs
 %depmod %{_kernel_ver}
 
-%postun -n shfs-kernel
+%postun        -n kernel%{_alt_kernel}-fs-shfs
 %depmod %{_kernel_ver}
 
+%if %{with userspace}
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/*
-/sbin/*
+%doc COPYRIGHT Changelog TODO docs/html
+%attr(4754,root,wheel) %{_bindir}/shfsmount
+%attr(4754,root,wheel) %{_bindir}/shfsumount
+%attr(755,root,root) /sbin/*
 %{_mandir}/man8/*
+%endif
 
-%files -n shfs-kernel
+%if %{with kernel}
+%files -n kernel%{_alt_kernel}-fs-shfs
 %defattr(644,root,root,755)
-%attr(755,root,root) /lib/modules/*/kernel/fs/shfs/*.o.gz
+%dir /lib/modules/%{_kernel_ver}/kernel/fs/shfs
+/lib/modules/%{_kernel_ver}/kernel/fs/shfs/shfs.ko*
+%endif
This page took 0.081328 seconds and 4 git commands to generate.