File zfs-fuse.spec of Package zfs-fuse

#
# spec file for package zfs-fuse
#
# Copyright (c) 2012 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/
#


Name:           zfs-fuse
Version:        0.7.0
Release:        0
Summary:        A port of ZFS to the FUSE framework for the Linux operating system
License:        CDDL-1.0
Group:          System/Filesystems
Url:            http://zfs-fuse.net/
Source:         http://zfs-fuse.net/releases/%{version}/zfs-fuse-%{version}.tar.bz2
Source1:        zfs-fuse.init
Source2:        sysconfig.zfs-fuse
Source3:        zfsrc
Source4:        zfs-fuse.8.xml
Source5:        README.SuSE
Patch1:         zfs-fuse-0.7.0-fix-buildsystem.patch
Patch2:         zfs-fuse-0.6.9-fix-strncat-usage.patch
Patch3:         zfs-fuse-0.6.9-fix-executable-stack.patch
Patch4:         zfs-fuse-0.7.0-fix-gcc-false-warnings.patch
%if 0%{?suse_version} > 1140
Patch5:         zfs-fuse-0.7.0-fix-malloc-hook-def.patch
%endif
BuildRequires:  docbook-xsl-stylesheets
BuildRequires:  fuse-devel
BuildRequires:  libacl-devel
BuildRequires:  libaio-devel
BuildRequires:  libattr-devel
BuildRequires:  libxslt
BuildRequires:  openssl-devel
BuildRequires:  scons
BuildRequires:  udev
BuildRequires:  zlib-devel
Requires:       fuse
Requires(pre): %insserv_prereq
Requires(pre): %fillup_prereq
Provides:       fuse-zfs = %{version}
ExclusiveArch:  %ix86 x86_64 %sparc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
zfs-fuse is a port of ZFS to the FUSE framework and makes it possible to create,
mount, use and manage ZFS file systems under Linux, bringing the uncontested
reliability and large feature set of ZFS to the Linux world.


%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if 0%{?suse_version} > 1140
%patch5 -p1
%endif
%__mkdir examples
%__mv contrib/zfsstress.py contrib/arcstat.pl examples

%build
export CCFLAGS="%{optflags}"
export CPPFLAGS="%{optflags}"
scons %{?jobs:-j%jobs} --no-cache -C src
xsltproc --nonet \
    http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
    %SOURCE4

%install
%__install -d -m 755 %{buildroot}%{_sysconfdir}/zfs
scons -C src \
    install_dir=%{buildroot}%{_sbindir} \
    cfg_dir=%{buildroot}%{_libexecdir}/%{name} \
    libexec_dir=%{buildroot}%{_libexecdir}/%{name} \
    man_dir=%{buildroot}%{_mandir}/man8/ \
    install
%__install -D -p -m 755 %{SOURCE1} %{buildroot}%{_initddir}/%{name}
%__ln_s %{_sysconfdir}/init.d/zfs-fuse %{buildroot}%{_sbindir}/rczfs-fuse
%__install -D -p -m 644 %{SOURCE2} \
    %{buildroot}%{_var}/adm/fillup-templates/sysconfig.%{name}
%__install -D -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/zfsrc
%__install -D -p -m 644 zfs-fuse.8 %{buildroot}%{_mandir}/man8/zfs-fuse.8
%__install -D -p -m 644 contrib/zfs_completion.bash \
    %{buildroot}%{_sysconfdir}/bash_completion.d/zfs-fuse.sh

%post
%fillup_and_insserv %name
%restart_on_update %name

%preun
%stop_on_removal %name

%postun
%insserv_cleanup

%files
%defattr(-,root,root,-)
%doc BUGS CHANGES HACKING INSTALL LICENSE README README.NFS STATUS TESTING TODO
%doc examples
%doc %{_mandir}/man8/*
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/zfsrc
%{_sysconfdir}/bash_completion.d/zfs-fuse.sh
%{_initddir}/%{name}
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/zfs_pool_alert
%{_sbindir}/rczfs-fuse
%{_sbindir}/zdb
%{_sbindir}/zfs
%{_sbindir}/zpool
%{_sbindir}/ztest
%{_sbindir}/zfs-fuse
%{_sbindir}/zstreamdump
%{_var}/adm/fillup-templates/sysconfig.%{name}

%changelog
openSUSE Build Service is sponsored by