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