]> git.pld-linux.org Git - packages/libfuse.git/blobdiff - libfuse.spec
- up to 2.8.5
[packages/libfuse.git] / libfuse.spec
index 97c5c3f8e40293d3836a6eff27413340af793dfe..7eb37abfe4b07d573f89839a8f36041c68e6350b 100644 (file)
+# TODO:
+# - unpackaged:
+#   /etc/init.d/fuse
+#   /etc/udev/rules.d/99-fuse.rules
 #
 # Condtional build:
 %bcond_without dist_kernel     # without distribution kernel
-%bcond_without kernel          # don't build kernel modules
-%bcond_without smp             # without smp packages
+%bcond_with    kernel          # build kernel modules
 %bcond_without userspace       # don't build userspace tools
 %bcond_with    verbose         # verbose build (V=1)
-#
-Name:          kernel-misc-fuse
-Summary:       Filesystem in Userspace
-Summary(pl):   System plików w przestrzeni u¿ytkownika
-Version:       1.1
-%define                _rel    3
-Release:       %{_rel}@%{_kernel_ver_str}
-License:       GPL v2
-Group:         Applications/System
-Source0:       http://dl.sourceforge.net/avf/fuse-%{version}.tar.gz
-# Source0-md5: adfbf15cf196ca597e1ff7fb7839938e
-Patch0:                %{name}-configure.in.patch
-URL:           http://sourceforge.net/projects/avf
-%if %{with kernel} && %{with dist_kernel}
-BuildRequires: kernel-module-build
-%endif
-%{?with_dist_kernel:%requires_releq_kernel_up}
-BuildRequires: rpmbuild(macros) >= 1.153
-Requires(post,postun): /sbin/depmod
-Buildroot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%bcond_without selinux         # build without SELinux support
 
-%description
-FUSE (Filesystem in Userspace) is a simple interface for userspace
-programs to export a virtual filesystem to the Linux kernel. FUSE also
-aims to provide a secure method for non privileged users to create and
-mount their own filesystem implementations.
+%ifarch sparc
+%undefine      with_smp
+%endif
 
-%description -l pl
-FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
-u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
-FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
-montowania w³asnych implementacji systemów plików przez zwyk³ych
-(nieuprzywilejowanych) u¿ytkowników.
+%if %{without kernel}
+%undefine with_dist_kernel
+%endif
+%if "%{_alt_kernel}" != "%{nil}"
+%undefine      with_userspace
+%endif
 
-%package -n kernel-smp-misc-fuse
+%define                pname   libfuse
+%define                rel     1
 Summary:       Filesystem in Userspace
-Summary(pl):   System plików w przestrzeni u¿ytkownika
-Release:       %{_rel}@%{_kernel_ver_str}
+Summary(pl.UTF-8):     System plików w przestrzeni użytkownika
+Name:          %{pname}%{_alt_kernel}
+Version:       2.8.5
+Release:       %{rel}
+Epoch:         0
 License:       GPL v2
 Group:         Applications/System
-%{?with_dist_kernel:%requires_releq_kernel_up}
-Requires(post,postun): /sbin/depmod
+Source0:       http://dl.sourceforge.net/fuse/fuse-%{version}.tar.gz
+# Source0-md5: 8aa2fd689de00b73963620483084ae3b
+Source1:       fuse.conf
+Patch0:                kernel-misc-fuse-Makefile.am.patch
+Patch1:                %{pname}-link.patch
+URL:           http://fuse.sourceforge.net/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: cpp
+BuildRequires: gettext-devel
+BuildRequires: libtool
+BuildRequires: sed >= 4.0
+%if %{with kernel}
+%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
+BuildRequires: rpmbuild(macros) >= 1.379
+%endif
+%if %{with userspace}
+%{?with_selinux:BuildRequires: libselinux-devel}
+%endif
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Provides:      group(fuse)
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%description -n kernel-smp-misc-fuse
+%description
 FUSE (Filesystem in Userspace) is a simple interface for userspace
 programs to export a virtual filesystem to the Linux kernel. FUSE also
 aims to provide a secure method for non privileged users to create and
 mount their own filesystem implementations.
 
-%description -n kernel-smp-misc-fuse -l pl
-FUSE stanowi prosty interfejs dla programów dzia³aj±cych w przestrzeni
-u¿ytkownika eksportuj±cy wirtualny system plików do j±dra Linuksa.
-FUSE ma równie¿ na celu udostêpnienie bezpiecznej metody tworzenia i
-montowania w³asnych implementacji systemów plików przez zwyk³ych
-(nieuprzywilejowanych) u¿ytkowników.
-
-%package -n libfuse
-Summary:       Shared library for Filesytem in Userspace
-Summary(pl):   Biblioteki dzielone Systemu plików w przestrzeni u¿ytkownika
-Group:         Applications/System
-Release:       %{_rel}
+This package contains a shared library.
 
-%description -n libfuse
-Shared library for Filesytem in Userspace
+%description -l pl.UTF-8
+FUSE stanowi prosty interfejs dla programów działających w przestrzeni
+użytkownika eksportujący wirtualny system plików do jądra Linuksa.
+FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i
+montowania własnych implementacji systemów plików przez zwykłych
+(nieuprzywilejowanych) użytkowników.
 
-%description -n libfuse -l pl
-Biblioteki dzielone Systemu plików w przestrzeni u¿ytkownika
+Ten pakiet zawiera bibliotekę współdzieloną.
 
-%package -n libfuse-devel
-Summary:       Filesytem in Userspace - Development header fiels and libraries
-Summary(pl):   Systemu plików w przestrzeni u¿ytkownika - Biblioteki dzielone
+%package devel
+Summary:       Filesytem in Userspace - Development header files
+Summary(pl.UTF-8):     System plików w przestrzeni użytkownika - pliki nagłówkowe
 Group:         Development/Libraries
-Release:       %{_rel}
-Requires:      libfuse = %{epoch}:%{version}-%{_rel}
+Requires:      %{pname} = %{epoch}:%{version}-%{rel}
 
-%description -n libfuse-devel
+%description devel
 Libfuse library header files.
 
-%description -n libfuse-devel -l pl
-Libfuse biblioteki nag³ówkowe dla programistów.
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libfuse.
 
-%package -n libfuse-static
-Summary:       Filesytem in Userspace - static libraries
-Summary(pl):   Systemu plików w przestrzeni u¿ytkownika - Biblioteki statyczne
+%package static
+Summary:       Filesytem in Userspace - static library
+Summary(pl.UTF-8):     System plików w przestrzeni użytkownika - biblioteka statyczna
 Group:         Development/Libraries
-Release:       %{_rel}
-Requires:      libfuse-devel = %{epoch}:%{version}-%{_rel}
+Requires:      libfuse-devel = %{epoch}:%{version}-%{rel}
 
-%description -n libfuse-static
+%description static
 Static libfuse libraries.
 
-%description -n libfuse-static -l pl
-Statyczne biblioteki libfuse
-
-%package -n fusermount
-Summary:       Filesytem in Userspace utilities
-Summary(pl):   Narzêdzia obs³uguj±ce systemu plików w przestrzeni u¿ytkownika
-Group:         Applications/System
-Release:       %{_rel}
+%description static -l pl.UTF-8
+Statyczna biblioteka libfuse.
 
-%description -n fusermount
-Filesytem in Userspace utilities. It provide a secure method for non
-privileged users to create and mount their own filesystem implementations. 
+%package -n kernel%{_alt_kernel}-misc-fuse
+Summary:       Filesystem in Userspace
+Summary(pl.UTF-8):     System plików w przestrzeni użytkownika
+Release:       %{rel}@%{_kernel_ver_str}
+License:       GPL v2
+Group:         Base/Kernel
+Requires(post,postun): /sbin/depmod
+%if %{with dist_kernel}
+%requires_releq_kernel
+Requires(postun):      %releq_kernel
+%endif
+%if "%{_alt_kernel}" != "%{nil}"
+Provides:      kernel-misc-fuse
+%endif
 
-%description -n fusermount -l pl
-Narzêdzia obs³uguj±ce systemu plików w przestrzeni u¿ytkownika. Dostarcza bezpieczn±
-metodê tworzenia i montowania w³asnych systemów plików dla nie uprzywilejowanych userów.
+%description -n kernel%{_alt_kernel}-misc-fuse
+FUSE (Filesystem in Userspace) is a simple interface for userspace
+programs to export a virtual filesystem to the Linux kernel. FUSE also
+aims to provide a secure method for non privileged users to create and
+mount their own filesystem implementations.
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+%description -n kernel%{_alt_kernel}-misc-fuse -l pl.UTF-8
+FUSE stanowi prosty interfejs dla programów działających w przestrzeni
+użytkownika eksportujący wirtualny system plików do jądra Linuksa.
+FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i
+montowania własnych implementacji systemów plików przez zwykłych
+(nieuprzywilejowanych) użytkowników.
 
 %prep
 %setup -q -n fuse-%{version}
 %patch0 -p1
+%patch1 -p1
+
+sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_bindir}/fusermount,' lib/mount.c
 
 %build
+%{__libtoolize}
 %{__aclocal}
+%{__autoheader}
 %{__autoconf}
 %{__automake}
 %configure \
-    --enable-lib \
-    --enable-util \
-    --with-kernel=%{_kernelsrcdir}
+       %{!?with_selinux:ac_cv_header_selinux_selinux_h=no} \
+       --%{?with_kernel:en}%{!?with_kernel:dis}able-kernel-module \
+       --enable-lib \
+       --enable-util \
+       %{?with_kernel:--with-kernel=%{_kernelsrcdir}}
 
-%if %{with kernel}
-cd kernel
-for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
-    if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
-       exit 1
-    fi
-    rm -rf include
-    install -d include/{linux,config}
-    ln -sf %{_kernelsrcdir}/config-$cfg .config
-    ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
-    ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
-    touch include/config/MARKER
-    %{__make} -C %{_kernelsrcdir} clean modules \
-       EXTRA_CFLAGS="-I../include -DFUSE_VERSION='1.1'" \
-       RCS_FIND_IGNORE="-name '*.ko' -o" \
-       M=$PWD O=$PWD \
-       %{?with_verbose:V=1}
-    mv fuse.ko fuse-$cfg.ko
+%if %{with userspace}
+for DIR in include lib util; do
+%{__make} -C $DIR
 done
-cd -
 %endif
 
-cd lib
-for f in fuse.c fuse_mt.c helper.c mount.c; do
-libtool --mode=compile --tag=CC %{__cc} -c -I. -I../include -DHAVE_CONFIG_H $f
-done
-libtool --mode=link %{__cc} -o libfuse.la fuse.lo fuse_mt.lo helper.lo mount.lo -rpath %{_libdir}
-cd -
-
-%{?with_userspace:%{__make} -C util}
+%if %{with kernel}
+%build_kernel_modules -m fuse -C kernel
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}}
+install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_sysconfdir}}
 
 %if %{with userspace}
-cd util
-install fusermount $RPM_BUILD_ROOT%{_bindir}/
-cd -
+for DIR in include lib util; do
+%{__make} -C $DIR install \
+       DESTDIR=$RPM_BUILD_ROOT
+done
+
+install fuse.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
 %endif
 
 %if %{with kernel}
-cd kernel
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/fs
-install fuse-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
-       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko
-%if %{with smp} && %{with dist_kernel}
-install fuse-smp.ko \
-       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko
-%endif
-cd -
+%install_kernel_modules -m kernel/fuse -d kernel/fs
 %endif
 
-install include/fuse.h $RPM_BUILD_ROOT%{_includedir}
-cd lib
-libtool --mode=install install libfuse.la $RPM_BUILD_ROOT%{_libdir}/libfuse.la
-cd -
+%clean
+rm -rf $RPM_BUILD_ROOT
 
-%post
-%depmod %{_kernel_ver}
+%pre
+%groupadd -g 84 fuse
 
-%postun
-%depmod %{_kernel_ver}
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
 
-%post -n kernel-smp-misc-fuse
+%post -n kernel%{_alt_kernel}-misc-fuse
 %depmod %{_kernel_ver}
 
-%postun -n kernel-smp-misc-fuse
+%postun -n kernel%{_alt_kernel}-misc-fuse
 %depmod %{_kernel_ver}
 
-%if %{with kernel}
-%files
-%defattr(644,root,root,755)
-%doc README NEWS ChangeLog AUTHORS
-%doc patch/
-/lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*
-
-%if %{with smp} && %{with dist_kernel}
-%files -n kernel-smp-misc-fuse
-%defattr(644,root,root,755)
-%doc README NEWS ChangeLog AUTHORS
-%doc patch/
-/lib/modules/%{_kernel_ver}smp/kernel/fs/fuse.ko*
-%endif
-%endif
-
 %if %{with userspace}
-%files -n fusermount
-%defattr(644,root,root,755)
-# suid needed? NO!
-%attr(755,root,root) %{_bindir}/fusermount
-# do it ! failed
-# %%attr(755,root,root) %{_sbindir}/mount.fuse
-%endif
-
-%files -n libfuse
+%files
 %defattr(644,root,root,755)
+%doc README NEWS ChangeLog AUTHORS doc/*
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fuse.conf
+%attr(4754,root,fuse) %{_bindir}/fusermount
+%attr(755,root,root) %{_bindir}/ulockmgr_server
+%attr(755,root,root) /sbin/mount.fuse
 %attr(755,root,root) %{_libdir}/libfuse.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfuse.so.2
+%attr(755,root,root) %{_libdir}/libulockmgr.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libulockmgr.so.1
 
-%files -n libfuse-devel
+%files devel
 %defattr(644,root,root,755)
-%{_includedir}/fuse.h
-%{_libdir}/libfuse.la
 %attr(755,root,root) %{_libdir}/libfuse.so
+%attr(755,root,root) %{_libdir}/libulockmgr.so
+%{_libdir}/libfuse.la
+%{_libdir}/libulockmgr.la
+%{_includedir}/fuse
+%{_includedir}/fuse.h
+%{_includedir}/ulockmgr.h
+%{_pkgconfigdir}/fuse.pc
 
-%files -n libfuse-static
+%files static
 %defattr(644,root,root,755)
 %{_libdir}/libfuse.a
+%{_libdir}/libulockmgr.a
+%endif
+
+%if %{with kernel}
+%files -n kernel%{_alt_kernel}-misc-fuse
+%defattr(644,root,root,755)
+/lib/modules/%{_kernel_ver}/kernel/fs/fuse.ko*
+%endif
This page took 0.047135 seconds and 4 git commands to generate.