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