]> git.pld-linux.org Git - packages/davfs.git/blob - davfs.spec
37e68cef389bf713a11a4792fc202308926a4711
[packages/davfs.git] / davfs.spec
1
2 # conditional build
3 # _without_dist_kernel          without kernel from distribution
4
5 %define         _rel    1
6
7 Summary:        Web-based Distributed Authoring and Versioning
8 Summary(pl):    Bazuj±cy na WWW Rozproszone Autoryzowanie i Wersjonowanie
9 Name:           davfs
10 Version:        0.2.4
11 Release:        %{_rel}
12 License:        GPL
13 Group:          Base/Kernel
14 Source0:        http://prdownloads.sourceforge.net/dav/%{name}-%{version}.tar.gz
15 Source1:        %{name}.init
16 Patch0:         %{name}-path.patch
17 Patch1:         %{name}-is_socket_ready.patch
18 URL:            http://dav.sourceforge.net/
19 %{!?_without_dist_kernel:BuildRequires: kernel-headers}
20 BuildRequires:  autoconf
21 BuildRequires:  %{kgcc_package}
22 BuildRequires:  openssl-devel
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _sysconfdir     /etc
26
27 %description
28 WebDAV is an acronym for Web-based Distributed Authoring and Version-
29 ing. Usually http is a read only protocol, but if you install DAV on
30 your web server, it becomes writable. Furthermore, if you use DAVfs,
31 you can mount your web server onto your filesystem and can use it as a
32 normal disk.
33
34 %description -l pl
35 WebDAV to bazuj±cy na WWW Rozproszone Autoryzowanie i Wersjonowanie.
36 Zazwyczaj protokó³ http jest protoko³em tylko do odczytu ale po
37 zainstalowaniu DAVa staje siê on równie¿ zapisywalnym. Co wiêcej je¶li
38 u¿ywasz DAVfs to mo¿esz montowaæ swój serwer www jako system plików i
39 u¿ywaæ tak jak normalnego dysku.
40
41 %package -n kernel-fs-davfs
42 Summary:        DAVfs - Drivers
43 Summary(pl):    DAVfs - Sterowniki
44 Release:        %{_rel}@%{_kernel_ver_str}
45 Group:          Base/Kernel
46 Prereq:         /sbin/depmod
47 %{!?_without_dist_kernel:%requires_releq_kernel_up}
48
49
50 %description -n kernel-fs-davfs
51 WebDAV is an acronym for Web-based Distributed Authoring and Version-
52 ing. Usually http is a read only protocol, but if you install DAV on
53 your web server, it becomes writable. Furthermore, if you use DAVfs,
54 you can mount your web server onto your filesystem and can use it as a
55 normal disk.
56
57 %description -n kernel-fs-davfs -l pl
58 WebDAV to bazuj±cy na WWW Rozproszone Autoryzowanie i Wersjonowanie.
59 Zazwyczaj protokó³ http jest protoko³em tylko do odczytu ale po
60 zainstalowaniu DAVa staje siê on równie¿ zapisywalnym. Co wiêcej je¶li
61 u¿ywasz DAVfs to mo¿esz montowaæ swój serwer www jako system plików i
62 u¿ywaæ tak jak normalnego dysku.
63
64 %package -n kernel-smp-fs-davfs
65 Summary:        DAVfs - SMP Drivers
66 Summary(pl):    DAVfs - Sterowniki SMP
67 Release:        %{_rel}@%{_kernel_ver_str}
68 Group:          Base/Kernel
69 Prereq:         /sbin/depmod
70 %{!?_without_dist_kernel:%requires_releq_kernel_smp}
71
72 %description -n kernel-smp-fs-davfs
73 WebDAV is an acronym for Web-based Distributed Authoring and Version-
74 ing. Usually http is a read only protocol, but if you install DAV on
75 your web server, it becomes writable. Furthermore, if you use DAVfs,
76 you can mount your web server onto your filesystem and can use it as a
77 normal disk.
78
79 %description -n kernel-smp-fs-davfs -l pl
80 WebDAV to bazuj±cy na WWW Rozproszone Autoryzowanie i Wersjonowanie.
81 Zazwyczaj protokó³ http jest protoko³em tylko do odczytu ale po
82 zainstalowaniu DAVa staje siê on równie¿ zapisywalnym. Co wiêcej je¶li
83 u¿ywasz DAVfs to mo¿esz montowaæ swój serwer www jako system plików i
84 u¿ywaæ tak jak normalnego dysku.
85
86 %prep
87 %setup -q
88 %patch0 -p1
89 %patch1 -p1
90
91 %build
92 %configure2_13 \
93         --with-ssl \
94         --with-kernel=%{_kernelsrcdir}
95 %{__make}
96
97 %{__make} -C davfs clean all \
98         CC=%{kgcc} \
99         CFLAGS="-O2 -D__KERNEL__ -DMODULE -D__SMP__ -DCONFIG_X86_LOCAL_APIC \
100         -I%{_kernelsrcdir}/include -Wall -Wstrict-prototypes -fomit-frame-pointer \
101         -fno-strict-aliasing -pipe -fno-strength-reduce"
102 mv davfs/davfs.o davfs-smp.o
103
104 %{__make} -C davfs clean all \
105         CC=%{kgcc} \
106         CFLAGS="-O2 -D__KERNEL__ -DMODULE \
107         -I%{_kernelsrcdir}/include -Wall -Wstrict-prototypes -fomit-frame-pointer \
108         -fno-strict-aliasing -pipe -fno-strength-reduce"
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112 install -d $RPM_BUILD_ROOT{/sbin,%{_sysconfdir}/rc.d/init.d}
113 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
114
115 echo "all install:" > davfs/Makefile
116
117 %{__make} install \
118         DESTDIR=$RPM_BUILD_ROOT
119
120 install davfs/davfs.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/davfs.o
121 install davfs-smp.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/davfs.o
122 ln -s %{_sbindir}/mount.davfs $RPM_BUILD_ROOT/sbin/mount.davfs
123
124 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/davfsd
125
126 gzip -9nf ChangeLog
127
128 %post   -n kernel-fs-davfs
129 /sbin/depmod -a
130
131 %postun -n kernel-fs-davfs
132 /sbin/depmod -a
133
134 %post   -n kernel-smp-fs-davfs
135 /sbin/depmod -a
136
137 %postun -n kernel-smp-fs-davfs
138 /sbin/depmod -a
139
140 %post
141 /sbin/chkconfig --add davfsd
142 if [ -f /var/lock/subsys/davfsd ]; then
143         /etc/rc.d/init.d/davfsd restart 1>&2
144 else
145         echo "Run \"/etc/rc.d/init.d/davfsd start\" to start davfsd daemon."
146 fi
147
148 %preun
149 if [ "$1" = "0" ]; then
150         if [ -f /var/lock/subsys/davfsd ]; then
151                 /etc/rc.d/init.d/davfsd stop 1>&2
152         fi
153         /sbin/chkconfig --del davfsd
154 fi
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %files
160 %defattr(644,root,root,755)
161 %doc *.gz doc/*.html
162 %attr(755,root,root) /sbin/*
163 %attr(755,root,root) %{_sbindir}/*
164 %attr(754,root,root) /etc/rc.d/init.d/davfsd
165
166 %files -n kernel-fs-davfs
167 %defattr(644,root,root,755)
168 %attr(600,root,root) /lib/modules/%{_kernel_ver}/misc/*.o
169
170 %files -n kernel-smp-fs-davfs
171 %defattr(644,root,root,755)
172 %attr(600,root,root) /lib/modules/%{_kernel_ver}smp/misc/*.o
This page took 0.068124 seconds and 2 git commands to generate.