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