File fuse.spec of Package fuse

#
# spec file for package fuse (Version 2.7.2)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           fuse
Summary:        User space File System
Version:        2.7.2
Release:        61.<RELEASE18>
License:        GPL v2 or later; LGPL v2.1 or later
Group:          System/Filesystems
Source:         %{name}-%{version}.tar.bz2
Source1:        boot.fuse
Source2:        fuse.rpmlintrc
Patch:          fuse-install-fix.diff
Patch2:         fuse-pc-remove-libdir-from-Libs.diff
Patch3:         fusermount-fix.diff
Url:            http://fuse.sourceforge.net
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       licenses
BuildRequires:  licenses
Supplements:    filesystem(fuse)
PreReq:         %insserv_prereq permissions
%define _exec_prefix /
%define _libdir      /%_lib
%define usrbindir    %{_prefix}/bin
%define devlibdir    %{_prefix}/%{_lib}
%define pkgconfigdir %{_prefix}/%{_lib}/pkgconfig

%description
With FUSE, a user space program can export a file system through the
kernel-default (Linux kernel).

User space file systems which are implemented using FUSE are provided
by the following packages:

- curlftpfs (mount FTP servers),

- encfs (layered file encryption),

- fuseiso (mount iso, img, bin, mdf and nrg CD-ROM images),

- fusepod (mount iPods),

- fusesmb (mount a fully browseable network neighborhood),

- gphotofs (mount gphoto-supported cameras),

- ntfs-3g (mount NTFS volumes read-write),

- obexfs (mount of bluetooth devices),

- sshfs (mount over ssh),

- wdfs (mount of WebDAV shares)

This package contains the mount binaries for fuse (might not be needed
by some FUSE filesystems like ntfs-3g) and the documentation for FUSE.

After installing fuse-devel, administrators can compile and install
other user space file systems which can be found at
http://fuse.sourceforge.net/wiki



Authors:
--------
    Miklos Szeredi <miklos@szeredi.hu>

%package -n libfuse2
License:        GPL v2 or later; LGPL v2.1 or later
Summary:        Library of FUSE, the User space File System for GNU/Linux and BSD
Group:          System/Filesystems

%description -n libfuse2
With FUSE, a user space program can export a file system through the
kernel-default (Linux kernel).

A FUSE file system which only needs libfuse2 is ntfs-3g, other FUSE
file systems might need the fuse package in addition to have fusermount
and /sbin/mount.fuse.

User space file systems which are implemented using FUSE are provided
by the following packages:

- curlftpfs (mount FTP servers),

- encfs (layered file encryption),

- fuseiso (mount iso, img, bin, mdf and nrg CD-ROM images),

- fusepod (mount iPods),

- fusesmb (mount a fully browseable network neighborhood),

- gphotofs (mount gphoto-supported cameras),

- ntfs-3g (mount NTFS volumes read-write),

- obexfs (mount of bluetooth devices),

- sshfs (mount over ssh),

- wdfs (mount of WebDAV shares)

After installing fuse-devel, administrators can compile and install
other user space file systems which can be found at
http://fuse.sourceforge.net/wiki



Authors:
--------
    Miklos Szeredi <miklos@szeredi.hu>

%package devel
License:        GPL v2 or later; LGPL v2.1 or later
Summary:        Development package for FUSE (userspace filesystem) modules
Group:          Development/Languages/C and C++
Requires:       fuse = %{version} libfuse2 = %{version} glibc-devel

%description devel
This package contains all include files, libraries and configuration
files needed to develop programs that use the fuse (FUSE) library to
implement kernel-default (Linux) file systems in user space.

Many user space file systems are already provided as packages for
installation:

- curlftpfs (mount FTP servers),

- encfs (layered file encryption),

- fuseiso (mount iso, img, bin, mdf and nrg CD-ROM images),

- fusepod (mount iPods),

- fusesmb (mount a fully browseable network neighborhood),

- gphotofs (mount gphoto-supported cameras),

- ntfs-3g (mount NTFS volumes read-write),

- obexfs (mount of bluetooth devices),

- sshfs (mount over ssh),

- wdfs (mount of WebDAV shares)

With fuse-devel, administrators can compile and install other user
space file systems which can be found at
http://fuse.sourceforge.net/wiki



Authors:
--------
    Miklos Szeredi <mszeredi@inf.bme.hu>

%prep
%setup -q
%patch
%if "%{_exec_prefix}" == "/" || "%{_exec_prefix}" == "/usr"
%patch2
%patch3
%endif

%build
autoreconf -fi
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure \
    --with-pkgconfigdir=%pkgconfigdir \
    --disable-kernel-module \
    --enable-lib \
    --enable-util \
    --enable-example
make

%install
make DESTDIR="$RPM_BUILD_ROOT" install
rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
install -m755 -D %{S:1} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/boot.fuse
ln -sf /usr/share/doc/licenses/md5/$(md5sum COPYING | sed 's/ .*//') COPYING
ln -sf /usr/share/doc/licenses/md5/$(md5sum COPYING.LIB | sed 's/ .*//') COPYING.LIB
# Needed for OpenSUSE buildservice
%if %suse_version <= 1020
install -m644 -D util/udev.rules $RPM_BUILD_ROOT/%{_sysconfdir}/udev/rules.d/99-fuse.rules
%endif
cd %buildroot
mv     .%{_libdir}/lib*.*a		.%{devlibdir}
rm     .%{_libdir}/lib*.so # recreate these pointing upwards:
cd .%{devlibdir}
ln -s  ../../lib*/libfuse.so.*.*.*	libfuse.so
#not needed for fuse, might reappar in separate package:
#ln -s  ../../lib*/libulockmgr.so.*.*.*	libulockmgr.so
cd -
mkdir 				.%{usrbindir}
mv     .%{_bindir}/fusermount	.%{usrbindir}/fusermount

%post
%{insserv_force_if_yast boot.fuse}
%run_permissions
%verifyscript
%verify_permissions -e %{usrbindir}/fusermount

%preun
if ! test -f /.buildenv ; then
%stop_on_removal boot.fuse
fi

%postun
%run_ldconfig
%insserv_cleanup

%post -n libfuse2
%run_ldconfig

%postun -n libfuse2
%run_ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%config %{_sysconfdir}/init.d/boot.fuse
%doc AUTHORS ChangeLog FAQ NEWS README* COPYING*
%if %suse_version <= 1020
%dir %{_sysconfdir}/udev
%dir %{_sysconfdir}/udev/rules.d
%{_sysconfdir}/udev/rules.d/99-fuse.rules
%endif
%verify(not mode) %attr(4750,root,trusted) %{usrbindir}/fusermount
/sbin/mount.fuse
# not needed for fuse, might reappar in separate package:
%exclude %{_bindir}/ulockmgr_server
%exclude %{_libdir}/libulockmgr.so.*

%files -n libfuse2
%defattr(-,root,root)
%{_libdir}/libfuse.so.*

%files devel
%defattr(-,root,root)
%{devlibdir}/libfuse.*
%{_includedir}/fuse.h
%{_includedir}/fuse
%{pkgconfigdir}/*.pc
# not needed for fuse, might reappar in separate package:
%exclude %{_includedir}/ulockmgr.h
%exclude %{devlibdir}/libulockmgr.*

%changelog
openSUSE Build Service is sponsored by