]> git.pld-linux.org Git - packages/libfuse.git/blob - libfuse.spec
- Fixed bcond's comment.
[packages/libfuse.git] / libfuse.spec
1 #
2 # Condtional build:
3 %bcond_without  dist_kernel     # without distribution kernel
4 %bcond_with     kernel          # build kernel modules
5 %bcond_without  userspace       # don't build userspace tools
6 %bcond_with     verbose         # verbose build (V=1)
7 %bcond_with     grsec_kernel    # build for kernel-grsecurity
8 %bcond_without  selinux         # build without SELinux support
9 #
10 %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
11 %define alt_kernel      grsecurity
12 %endif
13 #
14 %define         _rel    3
15 Summary:        Filesystem in Userspace
16 Summary(pl.UTF-8):      System plików w przestrzeni użytkownika
17 Name:           libfuse
18 Version:        2.6.5
19 Release:        %{_rel}
20 Epoch:          0
21 License:        GPL v2
22 Group:          Applications/System
23 Source0:        http://dl.sourceforge.net/fuse/fuse-%{version}.tar.gz
24 # Source0-md5:  66bd30503df55a87b9868835ca5a45bc
25 Source1:        fuse.conf
26 Patch0:         kernel-misc-fuse-Makefile.am.patch
27 Patch1:         %{name}-link.patch
28 URL:            http://fuse.sourceforge.net/
29 BuildRequires:  autoconf
30 BuildRequires:  automake
31 BuildRequires:  libtool
32 BuildRequires:  cpp
33 BuildRequires:  sed >= 4.0
34 %if %{with kernel}
35 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
36 BuildRequires:  rpmbuild(macros) >= 1.379
37 %endif
38 %if %{with userspace}
39 %{?with_selinux:BuildRequires:  libselinux-devel}
40 %endif
41 Requires(postun):       /sbin/ldconfig
42 Requires(postun):       /usr/sbin/groupdel
43 Requires(pre):  /usr/bin/getgid
44 Requires(pre):  /usr/sbin/groupadd
45 Buildroot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %if !%{with kernel}
48 %undefine with_dist_kernel
49 %endif
50
51 %description
52 FUSE (Filesystem in Userspace) is a simple interface for userspace
53 programs to export a virtual filesystem to the Linux kernel. FUSE also
54 aims to provide a secure method for non privileged users to create and
55 mount their own filesystem implementations.
56
57 This package contains a shared library.
58
59 %description -l pl.UTF-8
60 FUSE stanowi prosty interfejs dla programów działających w przestrzeni
61 użytkownika eksportujący wirtualny system plików do jądra Linuksa.
62 FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i
63 montowania własnych implementacji systemów plików przez zwykłych
64 (nieuprzywilejowanych) użytkowników.
65
66 Ten pakiet zawiera bibliotekę współdzieloną.
67
68 %package devel
69 Summary:        Filesytem in Userspace - Development header files
70 Summary(pl.UTF-8):      System plików w przestrzeni użytkownika - pliki nagłówkowe
71 Group:          Development/Libraries
72 Requires:       %{name} = %{epoch}:%{version}-%{_rel}
73
74 %description devel
75 Libfuse library header files.
76
77 %description devel -l pl.UTF-8
78 Pliki nagłówkowe biblioteki libfuse.
79
80 %package static
81 Summary:        Filesytem in Userspace - static library
82 Summary(pl.UTF-8):      System plików w przestrzeni użytkownika - biblioteka statyczna
83 Group:          Development/Libraries
84 Requires:       libfuse-devel = %{epoch}:%{version}-%{_rel}
85
86 %description static
87 Static libfuse libraries.
88
89 %description static -l pl.UTF-8
90 Statyczna biblioteka libfuse.
91
92 %package -n kernel%{_alt_kernel}-misc-fuse
93 Summary:        Filesystem in Userspace
94 Summary(pl.UTF-8):      System plików w przestrzeni użytkownika
95 Release:        %{_rel}@%{_kernel_ver_str}
96 License:        GPL v2
97 Group:          Base/Kernel
98 Requires(post,postun):  /sbin/depmod
99 %if %{with dist_kernel}
100 %requires_releq_kernel
101 Requires(postun):       %releq_kernel
102 %endif
103 %if "%{_alt_kernel}" != "%{nil}"
104 Provides:       kernel-misc-fuse
105 %endif
106
107 %description -n kernel%{_alt_kernel}-misc-fuse
108 FUSE (Filesystem in Userspace) is a simple interface for userspace
109 programs to export a virtual filesystem to the Linux kernel. FUSE also
110 aims to provide a secure method for non privileged users to create and
111 mount their own filesystem implementations.
112
113 %description -n kernel%{_alt_kernel}-misc-fuse -l pl.UTF-8
114 FUSE stanowi prosty interfejs dla programów działających w przestrzeni
115 użytkownika eksportujący wirtualny system plików do jądra Linuksa.
116 FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i
117 montowania własnych implementacji systemów plików przez zwykłych
118 (nieuprzywilejowanych) użytkowników.
119
120 %prep
121 %setup -q -n fuse-%{version}
122 %patch0 -p1
123 %patch1 -p1
124
125 sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_bindir}/fusermount,' lib/mount.c
126
127 %build
128 %{__libtoolize}
129 %{__aclocal}
130 %{__autoheader}
131 %{__autoconf}
132 %{__automake}
133 %configure \
134         %{!?with_selinux:ac_cv_header_selinux_selinux_h=no} \
135         --%{?with_kernel:en}%{!?with_kernel:dis}able-kernel-module \
136         --enable-lib \
137         --enable-util \
138         %{?with_kernel:--with-kernel=%{_kernelsrcdir}}
139
140 %if %{with userspace}
141 cp kernel/fuse_kernel.h include/
142 for DIR in include lib util; do
143 %{__make} -C $DIR
144 done
145 %endif
146
147 %if %{with kernel}
148 %build_kernel_modules -m fuse -C kernel
149 %endif
150
151 %install
152 rm -rf $RPM_BUILD_ROOT
153 install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_sysconfdir}}
154
155 %if %{with userspace}
156 for DIR in include lib util; do
157 %{__make} -C $DIR install \
158         DESTDIR=$RPM_BUILD_ROOT
159 done
160
161 install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
162 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
163 %endif
164
165 %if %{with kernel}
166 %install_kernel_modules -m kernel/fuse -d kernel/fs
167 %endif
168
169 %clean
170 rm -rf $RPM_BUILD_ROOT
171
172 %pre
173 %groupadd -g 84 fuse
174
175 %post   -p /sbin/ldconfig
176 %postun
177 /sbin/ldconfig
178 if [ "$1" = "0" ] ; then
179         %groupremove fuse
180 fi
181
182 %post -n kernel%{_alt_kernel}-misc-fuse
183 %depmod %{_kernel_ver}
184
185 %postun -n kernel%{_alt_kernel}-misc-fuse
186 %depmod %{_kernel_ver}
187
188 %if %{with userspace}
189 %files
190 %defattr(644,root,root,755)
191 %doc README NEWS ChangeLog AUTHORS doc/*
192 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fuse.conf
193 %attr(4754,root,fuse) %{_bindir}/fusermount
194 %attr(755,root,root) %{_bindir}/ulockmgr_server
195 %attr(755,root,root) /sbin/mount.fuse
196 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
197
198 %files devel
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_libdir}/lib*.so
201 %{_libdir}/lib*.la
202 %{_includedir}/fuse*
203 %{_includedir}/ulockmgr.h
204 %{_pkgconfigdir}/fuse.pc
205
206 %files static
207 %defattr(644,root,root,755)
208 %{_libdir}/lib*.a
209 %endif
210
211 %if %{with kernel}
212 %files -n kernel%{_alt_kernel}-misc-fuse
213 %defattr(644,root,root,755)
214 /lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*
215 %endif
This page took 0.097396 seconds and 4 git commands to generate.