]>
Commit | Line | Data |
---|---|---|
c28e4405 PS |
1 | # |
2 | # Condtional build: | |
3 | %bcond_without dist_kernel # without distribution kernel | |
a35003d8 | 4 | %bcond_without kernel # don't build kernel modules |
c28e4405 | 5 | %bcond_without smp # without smp packages |
efd7a38f | 6 | %bcond_without up # without up packages |
4965dc0c | 7 | %bcond_without userspace # don't build userspace tools |
a35003d8 | 8 | %bcond_with verbose # verbose build (V=1) |
441a6a89 | 9 | %bcond_with grsec_kernel # build for kernel-grsecurity |
127ee08d | 10 | %bcond_without selinux # build without SELinux support |
441a6a89 | 11 | # |
12 | %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel} | |
13 | %define alt_kernel grsecurity | |
14 | %endif | |
c28e4405 | 15 | # |
de7386ee | 16 | %ifarch sparc |
8bfc0885 | 17 | %undefine with_smp |
de7386ee AM |
18 | %endif |
19 | # | |
1ad71c20 | 20 | %define _rel 1 |
9c73f04f | 21 | Summary: Filesystem in Userspace |
fa7f9ca7 | 22 | Summary(pl.UTF-8): System plików w przestrzeni użytkownika |
d6263038 | 23 | Name: libfuse |
1ad71c20 | 24 | Version: 2.6.2 |
d6263038 | 25 | Release: %{_rel} |
c02bbc70 | 26 | Epoch: 0 |
e1541708 | 27 | License: GPL v2 |
fb76d4f3 | 28 | Group: Applications/System |
c02bbc70 | 29 | Source0: http://dl.sourceforge.net/fuse/fuse-%{version}.tar.gz |
1ad71c20 | 30 | # Source0-md5: fa3837fa6bc920303b02fb3820606964 |
f10c5dbc | 31 | Source1: fuse.conf |
d6263038 | 32 | Patch0: kernel-misc-fuse-Makefile.am.patch |
4d1cfd58 | 33 | Patch1: %{name}-link.patch |
498c72b7 | 34 | URL: http://fuse.sourceforge.net/ |
5bf8c553 | 35 | BuildRequires: autoconf |
36 | BuildRequires: automake | |
4d1cfd58 | 37 | BuildRequires: libtool |
1ad71c20 | 38 | BuildRequires: cpp |
4d1cfd58 | 39 | BuildRequires: sed >= 4.0 |
498c72b7 | 40 | %if %{with kernel} |
0612e680 | 41 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.9} |
8d23ca66 | 42 | BuildRequires: rpmbuild(macros) >= 1.330 |
002758f1 | 43 | %endif |
4d1cfd58 | 44 | %if %{with userspace} |
efd7a38f | 45 | %{?with_selinux:BuildRequires: libselinux-devel} |
4d1cfd58 | 46 | %endif |
244ef643 ER |
47 | Requires(postun): /sbin/ldconfig |
48 | Requires(postun): /usr/sbin/groupdel | |
b066fee7 | 49 | Requires(pre): /usr/bin/getgid |
50 | Requires(pre): /usr/sbin/groupadd | |
9c73f04f | 51 | Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
c28e4405 | 52 | |
5268c989 | 53 | %if !%{with kernel} |
2e74d96c | 54 | %undefine with_dist_kernel |
55 | %endif | |
56 | ||
9c73f04f | 57 | %description |
58 | FUSE (Filesystem in Userspace) is a simple interface for userspace | |
544fbe9d | 59 | programs to export a virtual filesystem to the Linux kernel. FUSE also |
9c73f04f | 60 | aims to provide a secure method for non privileged users to create and |
61 | mount their own filesystem implementations. | |
62 | ||
d6263038 JB |
63 | This package contains a shared library. |
64 | ||
fa7f9ca7 JR |
65 | %description -l pl.UTF-8 |
66 | FUSE stanowi prosty interfejs dla programów działających w przestrzeni | |
67 | użytkownika eksportujący wirtualny system plików do jądra Linuksa. | |
68 | FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i | |
69 | montowania własnych implementacji systemów plików przez zwykłych | |
70 | (nieuprzywilejowanych) użytkowników. | |
9c73f04f | 71 | |
fa7f9ca7 | 72 | Ten pakiet zawiera bibliotekę współdzieloną. |
d6263038 JB |
73 | |
74 | %package devel | |
75 | Summary: Filesytem in Userspace - Development header files | |
fa7f9ca7 | 76 | Summary(pl.UTF-8): System plików w przestrzeni użytkownika - pliki nagłówkowe |
d6263038 JB |
77 | Group: Development/Libraries |
78 | Requires: %{name} = %{epoch}:%{version}-%{_rel} | |
79 | ||
80 | %description devel | |
81 | Libfuse library header files. | |
82 | ||
fa7f9ca7 JR |
83 | %description devel -l pl.UTF-8 |
84 | Pliki nagłówkowe biblioteki libfuse. | |
d6263038 JB |
85 | |
86 | %package static | |
87 | Summary: Filesytem in Userspace - static library | |
fa7f9ca7 | 88 | Summary(pl.UTF-8): System plików w przestrzeni użytkownika - biblioteka statyczna |
2d1d7461 | 89 | Group: Development/Libraries |
d6263038 JB |
90 | Requires: libfuse-devel = %{epoch}:%{version}-%{_rel} |
91 | ||
92 | %description static | |
93 | Static libfuse libraries. | |
94 | ||
fa7f9ca7 | 95 | %description static -l pl.UTF-8 |
d6263038 JB |
96 | Statyczna biblioteka libfuse. |
97 | ||
0612e680 | 98 | %package -n kernel%{_alt_kernel}-misc-fuse |
d6263038 | 99 | Summary: Filesystem in Userspace |
fa7f9ca7 | 100 | Summary(pl.UTF-8): System plików w przestrzeni użytkownika |
d6263038 JB |
101 | Release: %{_rel}@%{_kernel_ver_str} |
102 | License: GPL v2 | |
103 | Group: Base/Kernel | |
d6263038 | 104 | Requires(post,postun): /sbin/depmod |
8bfc0885 PS |
105 | %if %{with dist_kernel} |
106 | %requires_releq_kernel_up | |
107 | Requires(postun): %releq_kernel_up | |
108 | %endif | |
0612e680 | 109 | %if "%{_alt_kernel}" != "%{nil}" |
110 | Provides: kernel-misc-fuse | |
111 | %endif | |
d6263038 | 112 | |
0612e680 | 113 | %description -n kernel%{_alt_kernel}-misc-fuse |
d6263038 JB |
114 | FUSE (Filesystem in Userspace) is a simple interface for userspace |
115 | programs to export a virtual filesystem to the Linux kernel. FUSE also | |
116 | aims to provide a secure method for non privileged users to create and | |
117 | mount their own filesystem implementations. | |
118 | ||
fa7f9ca7 JR |
119 | %description -n kernel%{_alt_kernel}-misc-fuse -l pl.UTF-8 |
120 | FUSE stanowi prosty interfejs dla programów działających w przestrzeni | |
121 | użytkownika eksportujący wirtualny system plików do jądra Linuksa. | |
122 | FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i | |
123 | montowania własnych implementacji systemów plików przez zwykłych | |
124 | (nieuprzywilejowanych) użytkowników. | |
d6263038 | 125 | |
0612e680 | 126 | %package -n kernel%{_alt_kernel}-smp-misc-fuse |
8413d3ec | 127 | Summary: Filesystem in Userspace |
fa7f9ca7 | 128 | Summary(pl.UTF-8): System plików w przestrzeni użytkownika |
8413d3ec | 129 | Release: %{_rel}@%{_kernel_ver_str} |
e1541708 | 130 | License: GPL v2 |
498c72b7 | 131 | Group: Base/Kernel |
8413d3ec | 132 | Requires(post,postun): /sbin/depmod |
8bfc0885 PS |
133 | %if %{with dist_kernel} |
134 | %requires_releq_kernel_smp | |
135 | Requires(postun): %releq_kernel_smp | |
136 | %endif | |
0612e680 | 137 | Provides: kernel-misc-fuse |
8413d3ec | 138 | |
0612e680 | 139 | %description -n kernel%{_alt_kernel}-smp-misc-fuse |
8413d3ec PS |
140 | FUSE (Filesystem in Userspace) is a simple interface for userspace |
141 | programs to export a virtual filesystem to the Linux kernel. FUSE also | |
142 | aims to provide a secure method for non privileged users to create and | |
143 | mount their own filesystem implementations. | |
144 | ||
fa7f9ca7 JR |
145 | %description -n kernel%{_alt_kernel}-smp-misc-fuse -l pl.UTF-8 |
146 | FUSE stanowi prosty interfejs dla programów działających w przestrzeni | |
147 | użytkownika eksportujący wirtualny system plików do jądra Linuksa. | |
148 | FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i | |
149 | montowania własnych implementacji systemów plików przez zwykłych | |
150 | (nieuprzywilejowanych) użytkowników. | |
8413d3ec | 151 | |
9c73f04f | 152 | %prep |
4965dc0c | 153 | %setup -q -n fuse-%{version} |
3d2362f9 | 154 | %patch0 -p1 |
4d1cfd58 | 155 | %patch1 -p1 |
d6263038 | 156 | |
202ebc3b | 157 | sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_bindir}/fusermount,' lib/mount.c |
9c73f04f | 158 | |
159 | %build | |
496fbb04 | 160 | %{__libtoolize} |
a35003d8 | 161 | %{__aclocal} |
496fbb04 | 162 | %{__autoheader} |
a35003d8 PS |
163 | %{__autoconf} |
164 | %{__automake} | |
c660eb4c | 165 | %configure \ |
127ee08d | 166 | %{!?with_selinux:ac_cv_header_selinux_selinux_h=no} \ |
2e74d96c | 167 | --%{?with_kernel:en}%{!?with_kernel:dis}able-kernel-module \ |
d6263038 JB |
168 | --enable-lib \ |
169 | --enable-util \ | |
2e74d96c | 170 | %{?with_kernel:--with-kernel=%{_kernelsrcdir}} |
7fb6785c | 171 | |
8bfc0885 PS |
172 | %if %{with userspace} |
173 | cp kernel/fuse_kernel.h include/ | |
174 | for DIR in include lib util; do | |
175 | %{__make} -C $DIR | |
176 | done | |
177 | %endif | |
178 | ||
a35003d8 | 179 | %if %{with kernel} |
9e146969 | 180 | %build_kernel_modules -m fuse -C kernel |
a35003d8 | 181 | %endif |
9c73f04f | 182 | |
9c73f04f | 183 | %install |
184 | rm -rf $RPM_BUILD_ROOT | |
3af001c7 | 185 | install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_sysconfdir}} |
9c73f04f | 186 | |
8413d3ec | 187 | %if %{with userspace} |
496fbb04 | 188 | for DIR in include lib util; do |
189 | %{__make} -C $DIR install \ | |
190 | DESTDIR=$RPM_BUILD_ROOT | |
191 | done | |
192 | ||
193 | install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
3af001c7 | 194 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} |
8413d3ec | 195 | %endif |
9c73f04f | 196 | |
8413d3ec | 197 | %if %{with kernel} |
0612e680 | 198 | %install_kernel_modules -m kernel/fuse -d kernel/fs |
8413d3ec PS |
199 | %endif |
200 | ||
c02bbc70 JB |
201 | %clean |
202 | rm -rf $RPM_BUILD_ROOT | |
203 | ||
b066fee7 | 204 | %pre |
205 | %groupadd -g 84 fuse | |
206 | ||
d6263038 | 207 | %post -p /sbin/ldconfig |
244ef643 | 208 | %postun |
b066fee7 | 209 | /sbin/ldconfig |
93034210 JB |
210 | if [ "$1" = "0" ] ; then |
211 | %groupremove fuse | |
b066fee7 | 212 | fi |
d6263038 | 213 | |
0612e680 | 214 | %post -n kernel%{_alt_kernel}-misc-fuse |
e1541708 | 215 | %depmod %{_kernel_ver} |
9c73f04f | 216 | |
0612e680 | 217 | %postun -n kernel%{_alt_kernel}-misc-fuse |
e1541708 PS |
218 | %depmod %{_kernel_ver} |
219 | ||
0612e680 | 220 | %post -n kernel%{_alt_kernel}-smp-misc-fuse |
6f2a0a3d | 221 | %depmod %{_kernel_ver}smp |
9c73f04f | 222 | |
0612e680 | 223 | %postun -n kernel%{_alt_kernel}-smp-misc-fuse |
6f2a0a3d | 224 | %depmod %{_kernel_ver}smp |
9c73f04f | 225 | |
d6263038 | 226 | %if %{with userspace} |
9c73f04f | 227 | %files |
228 | %defattr(644,root,root,755) | |
496fbb04 | 229 | %doc README NEWS ChangeLog AUTHORS doc/* |
f5e4370a | 230 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fuse.conf |
93034210 | 231 | %attr(4754,root,fuse) %{_bindir}/fusermount |
80df11a9 | 232 | %attr(755,root,root) %{_bindir}/ulockmgr_server |
f5e4370a | 233 | %attr(755,root,root) /sbin/mount.fuse |
80df11a9 | 234 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* |
4965dc0c | 235 | |
d6263038 | 236 | %files devel |
4965dc0c | 237 | %defattr(644,root,root,755) |
80df11a9 | 238 | %attr(755,root,root) %{_libdir}/lib*.so |
239 | %{_libdir}/lib*.la | |
d6263038 | 240 | %{_includedir}/fuse* |
80df11a9 | 241 | %{_includedir}/ulockmgr.h |
496fbb04 | 242 | %{_pkgconfigdir}/fuse.pc |
9c73f04f | 243 | |
d6263038 | 244 | %files static |
4965dc0c | 245 | %defattr(644,root,root,755) |
80df11a9 | 246 | %{_libdir}/lib*.a |
f981350a | 247 | %endif |
d6263038 JB |
248 | |
249 | %if %{with kernel} | |
0612e680 | 250 | %files -n kernel%{_alt_kernel}-misc-fuse |
d6263038 JB |
251 | %defattr(644,root,root,755) |
252 | /lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko* | |
253 | ||
254 | %if %{with smp} && %{with dist_kernel} | |
0612e680 | 255 | %files -n kernel%{_alt_kernel}-smp-misc-fuse |
d6263038 JB |
256 | %defattr(644,root,root,755) |
257 | /lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko* | |
258 | %endif | |
259 | %endif |