]> git.pld-linux.org Git - packages/libfuse.git/blob - libfuse.spec
- provides fusermount for libfuse
[packages/libfuse.git] / libfuse.spec
1 #
2 # TODO:
3 # - review patches
4 #
5 # Condtional build:
6 %bcond_without  dist_kernel     # without distribution kernel
7 %bcond_without  kernel          # don't build kernel modules
8 %bcond_without  smp             # without smp packages
9 %bcond_without  userspace       # don't build userspace tools
10 %bcond_with     verbose         # verbose build (V=1)
11 #
12 Name:           kernel-misc-fuse
13 Summary:        Filesystem in Userspace
14 Summary(pl):    System plików w przestrzeni u¿ytkownika
15 Version:        2.2.1
16 %define         _rel    1
17 Release:        %{_rel}@%{_kernel_ver_str}
18 Epoch:          0
19 License:        GPL v2
20 Group:          Base/Kernel
21 Source0:        http://dl.sourceforge.net/fuse/fuse-%{version}.tar.gz
22 # Source0-md5:  250d89b9c7b6ecf531df60c67f75737d
23 Source1:        fuse.conf
24 Patch0:         %{name}-configure.in.patch
25 Patch1:         %{name}-perm.patch
26 URL:            http://fuse.sourceforge.net/
27 BuildRequires:  autoconf
28 BuildRequires:  automake
29 %if %{with kernel}
30 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 2.6.7}
31 %endif
32 BuildRequires:  libtool
33 BuildRequires:  sed >= 4.0
34 %{?with_dist_kernel:%requires_releq_kernel_up}
35 Requires(post,postun):  /sbin/depmod
36 %{?with_dist_kernel:Requires(postun):   kernel}
37 Buildroot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 FUSE (Filesystem in Userspace) is a simple interface for userspace
41 programs to export a virtual filesystem to the Linux kernel. FUSE also
42 aims to provide a secure method for non privileged users to create and
43 mount their own filesystem implementations.
44
45 %description -l pl
46 FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
47 u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
48 FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
49 montowania w³asnych implementacji systemów plików przez zwyk³ych
50 (nieuprzywilejowanych) u¿ytkowników.
51
52 %package -n kernel-smp-misc-fuse
53 Summary:        Filesystem in Userspace
54 Summary(pl):    System plików w przestrzeni u¿ytkownika
55 Release:        %{_rel}@%{_kernel_ver_str}
56 License:        GPL v2
57 Group:          Base/Kernel
58 Provides:       kernel-misc-fuse
59 %{?with_dist_kernel:%requires_releq_kernel_smp}
60 Requires(post,postun):  /sbin/depmod
61 %{?with_dist_kernel:Requires(postun):   kernel-smp}
62
63 %description -n kernel-smp-misc-fuse
64 FUSE (Filesystem in Userspace) is a simple interface for userspace
65 programs to export a virtual filesystem to the Linux kernel. FUSE also
66 aims to provide a secure method for non privileged users to create and
67 mount their own filesystem implementations.
68
69 %description -n kernel-smp-misc-fuse -l pl
70 FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
71 u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
72 FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
73 montowania w³asnych implementacji systemów plików przez zwyk³ych
74 (nieuprzywilejowanych) u¿ytkowników.
75
76 %package -n libfuse
77 Summary:        Shared library for Filesytem in Userspace
78 Summary(pl):    Biblioteki dzielone Systemu plików w przestrzeni u¿ytkownika
79 Group:          Applications/System
80 Release:        %{_rel}
81 Obsoletes:      fusermount
82 Provides:       fusermount
83
84 %description -n libfuse
85 Shared library for Filesytem in Userspace
86
87 %description -n libfuse -l pl
88 Biblioteki dzielone Systemu plików w przestrzeni u¿ytkownika
89
90 %package -n libfuse-devel
91 Summary:        Filesytem in Userspace - Development header fiels and libraries
92 Summary(pl):    Systemu plików w przestrzeni u¿ytkownika - Biblioteki dzielone
93 Group:          Development/Libraries
94 Release:        %{_rel}
95 Requires:       libfuse = %{epoch}:%{version}-%{_rel}
96
97 %description -n libfuse-devel
98 Libfuse library header files.
99
100 %description -n libfuse-devel -l pl
101 Libfuse biblioteki nag³ówkowe dla programistów.
102
103 %package -n libfuse-static
104 Summary:        Filesytem in Userspace - static libraries
105 Summary(pl):    Systemu plików w przestrzeni u¿ytkownika - Biblioteki statyczne
106 Group:          Development/Libraries
107 Release:        %{_rel}
108 Requires:       libfuse-devel = %{epoch}:%{version}-%{_rel}
109
110 %description -n libfuse-static
111 Static libfuse libraries.
112
113 %description -n libfuse-static -l pl
114 Statyczne biblioteki libfuse
115
116 %prep
117 %setup -q -n fuse-%{version}
118 %patch0 -p1
119 #patch1 -p1
120 sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_libdir}/fusermount,' lib/mount.c
121
122 %build
123 %{__libtoolize}
124 %{__aclocal}
125 %{__autoheader}
126 %{__autoconf}
127 %{__automake}
128 %configure \
129     --enable-lib \
130     --enable-util \
131     --with-kernel=%{_kernelsrcdir}
132
133 %if %{with kernel}
134 cd kernel
135
136 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
137     if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
138         exit 1
139     fi
140     rm -rf include
141     install -d include/{linux,config}
142     ln -sf %{_kernelsrcdir}/config-$cfg .config
143     ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
144     ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
145     %if %{without dist_kernel}
146         ln -sf %{_kernelsrcdir}/scripts
147     %endif
148     touch include/config/MARKER
149     %{__make} -C %{_kernelsrcdir} clean \
150         RCS_FIND_IGNORE="-name '*.ko' -o" \
151         M=$PWD O=$PWD \
152         %{?with_verbose:V=1}
153     %{__make} -C %{_kernelsrcdir} modules \
154         EXTRA_CFLAGS='-I../include -DFUSE_VERSION=\"2.2\"' \
155         RCS_FIND_IGNORE="-name '*.ko' -o" \
156         CC="%{__cc}" CPP="%{__cpp}" \
157         M=$PWD O=$PWD \
158         %{?with_verbose:V=1}
159
160     mv fuse.ko fuse-$cfg.ko
161 done
162 cd -
163 %endif
164
165 %if %{with userspace}
166 cp kernel/fuse_kernel.h include/
167 for DIR in include lib util; do
168 %{__make} -C $DIR
169 done
170 %endif
171
172 %install
173 rm -rf $RPM_BUILD_ROOT
174 install -d $RPM_BUILD_ROOT{%{_libdir},%{_pkgconfigdir},/etc}
175
176 %if %{with userspace}
177 for DIR in include lib util; do
178 %{__make} -C $DIR install \
179         DESTDIR=$RPM_BUILD_ROOT
180 done
181
182 mv $RPM_BUILD_ROOT%{_bindir}/fusermount $RPM_BUILD_ROOT%{_libdir}
183 install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
184 install %{SOURCE1} $RPM_BUILD_ROOT/etc
185 %endif
186
187 %if %{with kernel}
188 cd kernel
189 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/fs
190 install fuse-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
191         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko
192 %if %{with smp} && %{with dist_kernel}
193 install fuse-smp.ko \
194         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko
195 %endif
196 %endif
197
198 %clean
199 rm -rf $RPM_BUILD_ROOT
200
201 %post
202 %depmod %{_kernel_ver}
203
204 %postun
205 %depmod %{_kernel_ver}
206
207 %post -n kernel-smp-misc-fuse
208 %depmod %{_kernel_ver}smp
209
210 %postun -n kernel-smp-misc-fuse
211 %depmod %{_kernel_ver}smp
212
213 %post -n libfuse -p /sbin/ldconfig
214 %postun -n libfuse -p /sbin/ldconfig
215
216 %if %{with kernel}
217 %files
218 %defattr(644,root,root,755)
219 %doc README NEWS ChangeLog AUTHORS doc/*
220 /lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*
221
222 %if %{with smp} && %{with dist_kernel}
223 %files -n kernel-smp-misc-fuse
224 %defattr(644,root,root,755)
225 %doc README NEWS ChangeLog AUTHORS doc/*
226 /lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko*
227 %endif
228 %endif
229
230 %if %{with userspace}
231 %files -n libfuse
232 %defattr(644,root,root,755)
233 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/fuse.conf
234 %attr(755,root,root) %{_libdir}/libfuse.so.*.*.*
235 %attr(755,root,root) %{_libdir}/fusermount
236
237 %files -n libfuse-devel
238 %defattr(644,root,root,755)
239 %{_includedir}/fuse*
240 %{_libdir}/libfuse.la
241 %attr(755,root,root) %{_libdir}/libfuse.so
242 %{_pkgconfigdir}/fuse.pc
243
244 %files -n libfuse-static
245 %defattr(644,root,root,755)
246 %{_libdir}/libfuse.a
247 %endif
This page took 0.052902 seconds and 4 git commands to generate.