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