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