]> git.pld-linux.org Git - packages/libfuse.git/blob - libfuse.spec
- fusermount back to _bindir: it does have some use invoked directly
[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    2
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
83 %description -n libfuse
84 Shared library for Filesytem in Userspace
85
86 %description -n libfuse -l pl
87 Biblioteki dzielone Systemu plików w przestrzeni u¿ytkownika
88
89 %package -n libfuse-devel
90 Summary:        Filesytem in Userspace - Development header fiels and libraries
91 Summary(pl):    Systemu plików w przestrzeni u¿ytkownika - Biblioteki dzielone
92 Group:          Development/Libraries
93 Release:        %{_rel}
94 Requires:       libfuse = %{epoch}:%{version}-%{_rel}
95
96 %description -n libfuse-devel
97 Libfuse library header files.
98
99 %description -n libfuse-devel -l pl
100 Libfuse biblioteki nag³ówkowe dla programistów.
101
102 %package -n libfuse-static
103 Summary:        Filesytem in Userspace - static libraries
104 Summary(pl):    Systemu plików w przestrzeni u¿ytkownika - Biblioteki statyczne
105 Group:          Development/Libraries
106 Release:        %{_rel}
107 Requires:       libfuse-devel = %{epoch}:%{version}-%{_rel}
108
109 %description -n libfuse-static
110 Static libfuse libraries.
111
112 %description -n libfuse-static -l pl
113 Statyczne biblioteki libfuse
114
115 %prep
116 %setup -q -n fuse-%{version}
117 %patch0 -p1
118 #patch1 -p1
119 sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_bindir}/fusermount,' lib/mount.c
120
121 %build
122 %{__libtoolize}
123 %{__aclocal}
124 %{__autoheader}
125 %{__autoconf}
126 %{__automake}
127 %configure \
128     --enable-lib \
129     --enable-util \
130     --with-kernel=%{_kernelsrcdir}
131
132 %if %{with kernel}
133 cd kernel
134
135 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
136     if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
137         exit 1
138     fi
139     rm -rf include
140     install -d include/{linux,config}
141     ln -sf %{_kernelsrcdir}/config-$cfg .config
142     ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
143     ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
144     %if %{without dist_kernel}
145         ln -sf %{_kernelsrcdir}/scripts
146     %endif
147     touch include/config/MARKER
148     %{__make} -C %{_kernelsrcdir} clean \
149         RCS_FIND_IGNORE="-name '*.ko' -o" \
150         M=$PWD O=$PWD \
151         %{?with_verbose:V=1}
152     %{__make} -C %{_kernelsrcdir} modules \
153         EXTRA_CFLAGS='-I../include -DFUSE_VERSION=\"2.2\"' \
154         RCS_FIND_IGNORE="-name '*.ko' -o" \
155         CC="%{__cc}" CPP="%{__cpp}" \
156         M=$PWD O=$PWD \
157         %{?with_verbose:V=1}
158
159     mv fuse.ko fuse-$cfg.ko
160 done
161 cd -
162 %endif
163
164 %if %{with userspace}
165 cp kernel/fuse_kernel.h include/
166 for DIR in include lib util; do
167 %{__make} -C $DIR
168 done
169 %endif
170
171 %install
172 rm -rf $RPM_BUILD_ROOT
173 install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},/etc}
174
175 %if %{with userspace}
176 for DIR in include lib util; do
177 %{__make} -C $DIR install \
178         DESTDIR=$RPM_BUILD_ROOT
179 done
180
181 install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
182 install %{SOURCE1} $RPM_BUILD_ROOT/etc
183 %endif
184
185 %if %{with kernel}
186 cd kernel
187 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/fs
188 install fuse-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
189         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko
190 %if %{with smp} && %{with dist_kernel}
191 install fuse-smp.ko \
192         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko
193 %endif
194 %endif
195
196 %clean
197 rm -rf $RPM_BUILD_ROOT
198
199 %post
200 %depmod %{_kernel_ver}
201
202 %postun
203 %depmod %{_kernel_ver}
204
205 %post -n kernel-smp-misc-fuse
206 %depmod %{_kernel_ver}smp
207
208 %postun -n kernel-smp-misc-fuse
209 %depmod %{_kernel_ver}smp
210
211 %post -n libfuse -p /sbin/ldconfig
212 %postun -n libfuse -p /sbin/ldconfig
213
214 %if %{with kernel}
215 %files
216 %defattr(644,root,root,755)
217 %doc README NEWS ChangeLog AUTHORS doc/*
218 /lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*
219
220 %if %{with smp} && %{with dist_kernel}
221 %files -n kernel-smp-misc-fuse
222 %defattr(644,root,root,755)
223 %doc README NEWS ChangeLog AUTHORS doc/*
224 /lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko*
225 %endif
226 %endif
227
228 %if %{with userspace}
229 %files -n libfuse
230 %defattr(644,root,root,755)
231 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/fuse.conf
232 %attr(755,root,root) %{_libdir}/libfuse.so.*.*.*
233 %attr(755,root,root) %{_bindir}/fusermount
234
235 %files -n libfuse-devel
236 %defattr(644,root,root,755)
237 %{_includedir}/fuse*
238 %{_libdir}/libfuse.la
239 %attr(755,root,root) %{_libdir}/libfuse.so
240 %{_pkgconfigdir}/fuse.pc
241
242 %files -n libfuse-static
243 %defattr(644,root,root,755)
244 %{_libdir}/libfuse.a
245 %endif
This page took 0.063473 seconds and 4 git commands to generate.