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