]> git.pld-linux.org Git - packages/shfs.git/blob - shfs.spec
- rel 13
[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 %ifarch sparc
10 %undefine       with_smp
11 %endif
12 #
13 %define         _rel    13
14 Summary:        (Secure) SHell FileSystem utilities
15 Summary(pl):    Narzêdzia obs³uguj±ce system plików przez ssh
16 Name:           shfs
17 Version:        0.35
18 Release:        %{_rel}
19 License:        GPL v2
20 Group:          Applications/System
21 Source0:        http://dl.sourceforge.net/shfs/%{name}-%{version}.tar.gz
22 # Source0-md5:  016f49d71bc32eee2b5d11fc1600cfbe
23 Patch0:         %{name}-opt.patch
24 Patch1:         %{name}-df.patch
25 Patch2:         %{name}-space_chars.patch
26 Patch3:         %{name}-uidgid32.patch
27 Patch4:         %{name}-gcc4.patch
28 Patch5:         %{name}-inode_oops.patch
29 URL:            http://shfs.sourceforge.net/
30 %if %{with kernel}
31 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 2.6.7}
32 BuildRequires:  rpmbuild(macros) >= 1.153
33 %endif
34 %{?with_dist_kernel:Requires:   kernel-fs-shfs}
35 Obsoletes:      shfsmount
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 SHFS is a simple and easy to use Linux kernel 2.4.10+ and 2.6 module
40 which allows you to mount remote filesystems using plain shell
41 (ssh/rsh) connection. It supports some nice features like number of
42 different caches for access speedup, target system optimisations, etc.
43
44 This package contains utilities for SHFS.
45
46 %description -l pl
47 SHFS to prosty i ³atwy w u¿yciu modu³ j±dra Linuksa 2.4.10+ i 2.6
48 pozwalaj±cy montowaæ zdalne systemy plików przy u¿yciu zwyk³ego
49 po³±czenia ze zdaln± pow³ok± (ssh lub rsh). Obs³uguje pewne mi³e
50 cechy, takie jak ró¿ne sposoby buforowania dla przyspieszenia dostêpu,
51 optymalizacje pod k±tem zdalnego systemu itp.
52
53 Ten pakiet zawiera programy narzêdziowe dla SHFS.
54
55 %package -n kernel-fs-shfs
56 Summary:        SHell File System Linux kernel module
57 Summary(pl):    Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików
58 Release:        %{_rel}@%{_kernel_ver_str}
59 Group:          Base/Kernel
60 Requires(post,postun):  /sbin/depmod
61 %if %{with dist_kernel}
62 %requires_releq_kernel_up
63 Requires(postun):       %releq_kernel_up
64 %endif
65 Obsoletes:      kernel-misc-shfs
66
67 %description -n kernel-fs-shfs
68 SHell File System Linux kernel module.
69
70 %description -n kernel-fs-shfs -l pl
71 Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików.
72
73 %package -n kernel-smp-fs-shfs
74 Summary:        SHell File System Linux SMP kernel module
75 Summary(pl):    Modu³ j±dra Linuksa SMP obs³uguj±cy pow³okowy system plików
76 Release:        %{_rel}@%{_kernel_ver_str}
77 Group:          Base/Kernel
78 Requires(post,postun):  /sbin/depmod
79 %if %{with dist_kernel}
80 %requires_releq_kernel_smp
81 Requires(postun):       %releq_kernel_smp
82 %endif
83 Provides:       kernel-fs-shfs
84 Obsoletes:      kernel-fs-shfs
85 Obsoletes:      kernel-smp-misc-shfs
86
87 %description -n kernel-fs-shfs
88 SHell File System Linux kernel module.
89
90 %description -n kernel-smp-fs-shfs -l pl
91 Modu³ j±dra Linuksa obs³uguj±cy pow³okowy system plików.
92
93 %prep
94 %setup -q
95 %patch0 -p1
96 %patch1 -p0
97 %patch2 -p1
98 %patch3 -p1
99 %patch4 -p1
100 %patch5 -p1
101
102 %build
103 %if %{with kernel}
104 cd shfs/Linux-2.6
105 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
106         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
107                 exit 1
108         fi
109         install -d o/include/linux
110         ln -sf %{_kernelsrcdir}/config-$cfg o/.config
111         ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
112         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
113         %{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
114
115         echo "obj-m := shfs.o" > Makefile
116         echo "shfs-objs := dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o" >> Makefile
117         %{__make} -C %{_kernelsrcdir} clean \
118                 %{?with_verbose:V=1} \
119                 RCS_FIND_IGNORE="-name '*.ko' -o" \
120                 M=$PWD O=$PWD/o
121         %{__make} -C %{_kernelsrcdir} modules \
122 %if "%{_target_base_arch}" != "%{_arch}"
123                 ARCH=%{_target_base_arch} \
124                 CROSS_COMPILE=%{_target_base_cpu}-pld-linux- \
125 %endif
126                 HOSTCC="%{__cc}" \
127                 %{?with_verbose:V=1} \
128                 M=$PWD O=$PWD/o
129         mv shfs.ko shfs-$cfg.ko
130 done
131 cd -
132 %endif
133
134 %if %{with userspace}
135 %{__make} -C shfsmount \
136         SHFS_VERSION=\"%{version}\" \
137         CC="%{__cc} %{rpmcflags}" \
138         LINKER="%{__cc}"        \
139         LDFLAGS="%{rpmldflags}"
140 %{__make} docs
141 %endif
142
143 %install
144 rm -rf $RPM_BUILD_ROOT
145
146 %if %{with kernel}
147 cd shfs/Linux-2.6
148 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/fs/shfs
149 install shfs-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
150         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/fs/shfs/shfs.ko
151 %if %{with smp} && %{with dist_kernel}
152 install shfs-smp.ko \
153         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/fs/shfs/shfs.ko
154 %endif
155 cd -
156 %endif
157
158 %if %{with userspace}
159 %{__make} utils-install docs-install \
160         ROOT=$RPM_BUILD_ROOT \
161         MAN_PAGE_DIR=%{_mandir}
162 %endif
163
164 %clean
165 rm -rf $RPM_BUILD_ROOT
166
167 %post   -n kernel-fs-shfs
168 %depmod %{_kernel_ver}
169
170 %postun -n kernel-fs-shfs
171 %depmod %{_kernel_ver}
172
173 %post   -n kernel-smp-fs-shfs
174 %depmod %{_kernel_ver}smp
175
176 %postun -n kernel-smp-fs-shfs
177 %depmod %{_kernel_ver}smp
178
179 %if %{with userspace}
180 %files
181 %defattr(644,root,root,755)
182 %doc COPYRIGHT Changelog TODO docs/html
183 %attr(4754,root,wheel) %{_bindir}/shfsmount
184 %attr(4754,root,wheel) %{_bindir}/shfsumount
185 %attr(755,root,root) /sbin/*
186 %{_mandir}/man8/*
187 %endif
188
189 %if %{with kernel}
190 %files -n kernel-fs-shfs
191 %defattr(644,root,root,755)
192 /lib/modules/%{_kernel_ver}/kernel/fs/shfs
193
194 %if %{with smp} && %{with dist_kernel}
195 %files -n kernel-smp-fs-shfs
196 %defattr(644,root,root,755)
197 /lib/modules/%{_kernel_ver}smp/kernel/fs/shfs
198 %endif
199 %endif
This page took 0.076879 seconds and 3 git commands to generate.