LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File davfs2.spec of Package davfs2 (Project home:enovakobs:branches:filesystems)

Summary:        FUSE-Filesystem to access WebDAV servers
Name:           davfs2
Version:        1.4.7
Release:        0
License:        GPL-3.0
Group:          System/Filesystems
URL:            http://savannah.nongnu.org/projects/davfs2
#Source:         http://download.savannah.gnu.org/releases/davfs2/davfs2-%%{version}.tar.gz
Source:         davfs2-%{version}.tar.bz2
Source1:        davfs.easy
Source2:        davfs.secure
Source99:       %{name}-rpmlintrc
Patch1:         davfs2-fix_missing_exit_failure.patch
# PATCH-FIX-UPSTREAM conrad@quisquis.de
Patch2:         davfs2-fix-formats.patch
# See http://cvs.savannah.gnu.org/viewvc/davfs2/src/Makefile.am?root=davfs2&r1=1.7&r2=1.8&view=patch
Patch3:		    davfs2-DESTDIR.patch
# See http://cvs.savannah.gnu.org/viewvc/davfs2/configure.ac?root=davfs2&r1=
Patch4:		    davfs2-ne_v30.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  fuse-devel >= 2.2, neon-devel
BuildRequires:  pwdutils
Requires:       fuse >= 2.2
Obsoletes:      fuse-davfs2 < %{version}
Provides:       fuse-davfs2 = %{version}
PreReq:         /usr/sbin/groupadd
PreReq:         /usr/sbin/useradd
%if 0%{?fedora} == 0
Requires(pre): pwdutils
Requires(pre): permissions
Requires(pre): shadow-utils

davfs2 is a FUSE file system driver that allows you to mount a WebDAV server
as a local file system, like a disk drive. This way applications can access
resources on a Web server without knowing anything about HTTP or WebDAV.

davfs2 runs as a daemon in userspace. It uses the kernel file system coda or
fuse. Most propably your Linux kernel includes at least one of this file
systems. To connect to the WebDAV server it makes use of the neon library.
Neon supports TLS/SSL (using OpenSSL or GnuTLS) and access via proxy server.

%setup -q -n "davfs2-%{version}"
%patch2 -p 1
%patch4 -p 0
cd src
%patch3 -p 0
%__patch Makefile.in <%{P:3}

ssbindir="%{_sbindir}" \
dav_user="davfs2" \
dav_group="davfs2" \
%configure \
%if 0%{?suse_version} >= 1000
make AM_CFLAGS="-Wall $PIE" AM_LDFLAGS="$pie" %{?_smp_mflags}

%{!?make_install:%__make DESTDIR=%{?buildroot} install}

%__rm -rf "%{buildroot}%{_datadir}/doc"

%__install -d "%{buildroot}/%{_sysconfdir}/permissions.d"
%__install -m0644 "%{SOURCE1}" "%{SOURCE2}" "%{buildroot}/%{_sysconfdir}/permissions.d/"

%__install -d "%{buildroot}/var/cache/davfs2"

%find_lang davfs2

%__rm -rf "%{buildroot}%{_docdir}"


/usr/bin/getent group davfs2 >/dev/null 2>&1 || /usr/sbin/groupadd -r davfs2 || :
/usr/bin/getent passwd davfs2 >/dev/null 2>&1 || /usr/sbin/useradd -r -g davfs2 -d /var/cache/davfs2 davfs2 || :

%if 0%{?set_permissions:1} > 0
    %set_permissions "%{_sbindir}/mount.davfs"
%if 0%{?run_permissions:1} > 0

%if 0%{?suse_version} >= 1120
%verify_permissions -e %{_sbindir}/mount.davfs

%files -f davfs2.lang
%defattr(-, root, root, 0755)
%doc AUTHORS BUGS COPYING FAQ NEWS README* THANKS TODO etc/davfs2.conf etc/secrets
%dir %{_sysconfdir}/davfs2
%doc %{_mandir}/man5/davfs2.conf.5%{ext_man}
%doc %{_mandir}/man8/mount.davfs.8%{ext_man}
%doc %{_mandir}/man8/umount.davfs.8%{ext_man}
%doc %{_mandir}/*/man5/davfs2.conf.5%{ext_man}
%doc %{_mandir}/*/man8/mount.davfs.8%{ext_man}
%doc %{_mandir}/*/man8/umount.davfs.8%{ext_man}
%config(noreplace) %{_sysconfdir}/permissions.d/davfs.easy
%config(noreplace) %{_sysconfdir}/permissions.d/davfs.secure
%config(noreplace) %{_sysconfdir}/davfs2/davfs2.conf
%config %{_sysconfdir}/davfs2/secrets
%config %{_sysconfdir}/davfs2/certs/
%verify(not user group mode) %attr(4755,root,root) %{_sbindir}/mount.davfs
%attr(0750, davfs2, davfs2) /var/cache/davfs2