1 |
%define dav_user %{name} |
%define dav_user %{name} |
2 |
%define dav_group %{name} |
%define dav_group %{name} |
3 |
%define dav_localstatedir /var/run |
%define dav_localstatedir /run |
4 |
%define dav_syscachedir /var/cache |
%define dav_syscachedir /var/cache |
5 |
|
|
6 |
Summary: File system driver that allows you to mount a WebDAV server |
Summary: File system driver that allows you to mount a WebDAV server |
7 |
Name: davfs2 |
Name: davfs2 |
8 |
Version: 1.4.6 |
Version: 1.4.6 |
9 |
Release: %mkrel 1 |
Release: %mkrel 2 |
10 |
License: GPLv2+ |
License: GPLv2+ |
11 |
Group: System/Kernel and hardware |
Group: System/Kernel and hardware |
12 |
URL: http://savannah.nongnu.org/projects/davfs2 |
URL: http://savannah.nongnu.org/projects/davfs2 |
13 |
Source0: http://ftp.twaren.net/Unix/NonGNU/%{name}/%{name}-%{version}.tar.gz |
Source0: http://ftp.twaren.net/Unix/NonGNU/%{name}/%{name}-%{version}.tar.gz |
14 |
|
Source1: %{name}.tmpfiles.conf |
15 |
Patch2: davfs2-1.4.0-format_not_a_string_literal_and_no_format_arguments.diff |
Patch2: davfs2-1.4.0-format_not_a_string_literal_and_no_format_arguments.diff |
16 |
Requires(pre): rpm-helper |
Requires(pre): filesystem >= 2.1.9-18 |
17 |
Requires(postun): rpm-helper |
Requires(pre): rpm-helper |
18 |
|
Requires(postun): rpm-helper |
19 |
BuildRequires: neon-devel >= 0.27 |
BuildRequires: neon-devel >= 0.27 |
20 |
BuildRequires: gettext-devel >= 0.14.4 |
BuildRequires: gettext-devel >= 0.14.4 |
21 |
BuildRequires: libtool |
BuildRequires: libtool |
59 |
%install |
%install |
60 |
rm -fr %{buildroot} |
rm -fr %{buildroot} |
61 |
|
|
|
install -d %{buildroot}/sbin |
|
|
install -d %{buildroot}%{dav_localstatedir}/mount.%{name} |
|
62 |
install -d %{buildroot}%{dav_syscachedir}/%{name} |
install -d %{buildroot}%{dav_syscachedir}/%{name} |
63 |
install -d %{buildroot}%{_datadir}/%{name} |
install -d %{buildroot}%{_datadir}/%{name} |
64 |
|
|
65 |
%makeinstall_std |
%makeinstall_std |
66 |
|
|
67 |
|
# (cg) For some reason install puts stuff here... |
68 |
|
rm -rf %{buildroot}/sbin |
69 |
|
|
70 |
# rename the binaries |
# rename the binaries |
71 |
ln -s %{_sbindir}/mount.davfs %{buildroot}%{_sbindir}/mount.%{name} |
ln -s %{_sbindir}/mount.davfs %{buildroot}%{_sbindir}/mount.%{name} |
72 |
ln -s %{_sbindir}/umount.davfs %{buildroot}%{_sbindir}/umount.%{name} |
ln -s %{_sbindir}/umount.davfs %{buildroot}%{_sbindir}/umount.%{name} |
73 |
|
|
74 |
rm -f %{buildroot}/sbin/* |
# create tmpfiles directory |
75 |
ln -snf ..%{_sbindir}/mount.%{name} %{buildroot}/sbin/mount.%{name} |
install -d -m0755 %{buildroot}%{_prefix}/lib/tmpfiles.d |
76 |
ln -snf ..%{_sbindir}/umount.%{name} %{buildroot}/sbin/umount.%{name} |
install -m0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf |
77 |
|
|
78 |
# rename the manpages |
# rename the manpages |
79 |
find %{buildroot}%{_mandir} -name "*.gz" | xargs gunzip |
find %{buildroot}%{_mandir} -name "*.gz" | xargs gunzip |
83 |
%pre |
%pre |
84 |
%_pre_useradd %{dav_user} %{dav_localstatedir}/mount.%{name} /bin/false |
%_pre_useradd %{dav_user} %{dav_localstatedir}/mount.%{name} /bin/false |
85 |
|
|
86 |
|
%post |
87 |
|
systemd-tmpfiles --create %{name}.conf |
88 |
|
|
89 |
%postun |
%postun |
90 |
%_postun_userdel %{dav_user} |
%_postun_userdel %{dav_user} |
91 |
|
|
102 |
%config(noreplace) %{_sysconfdir}/%{name}/secrets |
%config(noreplace) %{_sysconfdir}/%{name}/secrets |
103 |
%{_sbindir}/mount.davfs* |
%{_sbindir}/mount.davfs* |
104 |
%{_sbindir}/umount.davfs* |
%{_sbindir}/umount.davfs* |
105 |
/sbin/mount.davfs* |
%{_prefix}/lib/tmpfiles.d/%{name}.conf |
|
/sbin/umount.davfs* |
|
106 |
%{_mandir}/man5/* |
%{_mandir}/man5/* |
107 |
%{_mandir}/man8/* |
%{_mandir}/man8/* |
108 |
%lang(de) %{_mandir}/de/man5/* |
%lang(de) %{_mandir}/de/man5/* |
109 |
%lang(de) %{_mandir}/de/man8/* |
%lang(de) %{_mandir}/de/man8/* |
110 |
%lang(es) %{_mandir}/es/man5/* |
%lang(es) %{_mandir}/es/man5/* |
|
%attr(1775,root,%{dav_group}) %dir %{dav_localstatedir}/mount.%{name} |
|
111 |
%attr(1775,root,%{dav_group}) %dir %{dav_syscachedir}/%{name} |
%attr(1775,root,%{dav_group}) %dir %{dav_syscachedir}/%{name} |
112 |
%dir %{_datadir}/%{name} |
%dir %{_datadir}/%{name} |
113 |
%{_datadir}/%{name}/* |
%{_datadir}/%{name}/* |