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