]> git.pld-linux.org Git - packages/shfs.git/blob - shfs.spec
- `df` fixed.
[packages/shfs.git] / shfs.spec
1 #
2 # Conditional build:
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
8 #
9 Summary:        (Secure) SHell FileSystem utilities
10 Summary(pl):    Narzêdzia obs³uguj±ce system plików przez ssh
11 Name:           shfs
12 Version:        0.35
13 %define         _rel    2
14 Release:        %{_rel}
15 License:        GPL v2
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/
22 %if %{with kernel}
23 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 2.6.7}
24 BuildRequires:  %{kgcc_package}
25 %endif
26 BuildRequires:  rpmbuild(macros) >= 1.153
27 Obsoletes:      shfsmount
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
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.
35
36 This package contains utilities for SHFS.
37
38 %description -l pl
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.
44
45 Ten pakiet zawiera programy narzêdziowe dla SHFS.
46
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}
51 Group:          Base/Kernel
52 %{?with_dist_kernel:%requires_releq_kernel_up}
53 Requires(post,postun):  /sbin/depmod
54 Obsoletes:      kernel-misc-shfs
55
56 %description -n kernel-fs-shfs
57 SHell File System Linux kernel module.
58
59 %description -n kernel-fs-shfs -l pl
60 Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików.
61
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}
66 Group:          Base/Kernel
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
72
73 %description -n kernel-fs-shfs
74 SHell File System Linux kernel module.
75
76 %description -n kernel-smp-fs-shfs -l pl
77 Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików.
78
79 %prep
80 %setup -q
81 %patch0 -p1
82 %patch1 -p0
83
84 %build
85 %if %{with kernel}
86 cd shfs/Linux-2.6
87 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
88     if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
89         exit 1
90     fi
91     rm -rf include
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" \
102         M=$PWD O=$PWD
103     %{__make} -C %{_kernelsrcdir} modules \
104         %{?with_verbose:V=1} \
105         M=$PWD O=$PWD
106     mv shfs.ko shfs-$cfg.ko
107 done
108 cd -
109 %endif
110
111 %if %{with userspace}
112 %{__make} -C shfsmount \
113         SHFS_VERSION=\"%{version}\" \
114         CC="%{__cc}" \
115         OPT="%{rpmcflags}" \
116         LDFLAGS="%{rpmldflags}"
117 %{__make} docs
118 %endif
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122
123 %if %{with kernel}
124 cd shfs/Linux-2.6
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
131 %endif
132 cd -
133 %endif
134
135 %if %{with userspace}
136 %{__make} utils-install docs-install \
137         ROOT=$RPM_BUILD_ROOT \
138         MAN_PAGE_DIR=%{_mandir}
139 %endif
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %post   -n kernel-fs-shfs
145 %depmod %{_kernel_ver}
146
147 %postun -n kernel-fs-shfs
148 %depmod %{_kernel_ver}
149
150 %post   -n kernel-smp-fs-shfs
151 %depmod %{_kernel_ver}smp
152
153 %postun -n kernel-smp-fs-shfs
154 %depmod %{_kernel_ver}smp
155
156 %if %{with userspace}
157 %files
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/*
162 %{_mandir}/man8/*
163 %endif
164
165 %if %{with kernel}
166 %files -n kernel-fs-shfs
167 %defattr(644,root,root,755)
168 /lib/modules/%{_kernel_ver}/kernel/fs/shfs
169
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
174 %endif
175 %endif
This page took 0.073906 seconds and 4 git commands to generate.