2 # - make tests use secure dir, not /tmp, see varnish-2.0.6/bin/varnishtest
3 # - hungs ac builders: tests/a00009.vtc
7 %bcond_without doc # build documentation
8 %bcond_without tests # build without tests. binds daemon on 127.0.0.1 9080, 9081, 9001 ports
10 Summary: Varnish - a high-performance HTTP accelerator
11 Summary(pl.UTF-8): Varnish - wydajny akcelerator HTTP
16 Group: Networking/Daemons/HTTP
17 Source0: http://repo.varnish-cache.org/source/%{name}-%{version}.tar.gz
18 # Source0-md5: 714310c83fdbd2061d897dacd3f63d8b
20 Source3: %{name}ncsa.init
21 Source4: %{name}.sysconfig
22 Source5: %{name}ncsa.sysconfig
23 Source6: %{name}.logrotate
24 Source8: %{name}.tmpfiles
25 #Patch100: branch.diff
26 Patch0: no-ccache.patch
27 URL: http://www.varnish-cache.org/
28 BuildRequires: autoconf
29 BuildRequires: automake
30 BuildRequires: libstdc++-devel
31 BuildRequires: libtool >= 2:1.5
32 BuildRequires: ncurses-devel
33 BuildRequires: pcre-devel
34 BuildRequires: pkgconfig
35 BuildRequires: rpmbuild(macros) >= 1.583
37 BuildRequires: docutils
39 BuildRequires: libxslt-progs
41 Requires(postun): /usr/sbin/groupdel
42 Requires(postun): /usr/sbin/userdel
43 Requires(pre): /bin/id
44 Requires(pre): /usr/bin/getgid
45 Requires(pre): /usr/sbin/groupadd
46 Requires(pre): /usr/sbin/useradd
47 Requires: %{name}-libs = %{version}-%{release}
50 Requires: rc-scripts >= 0.4.1.26
51 Suggests: vim-syntax-vcl
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define _localstatedir /var/run
57 The goal of the Varnish project is to develop a state-of-the-art,
58 high-performance HTTP accelerator.
60 Varnish is targeted primarily at the FreeBSD 6 and Linux 2.6
61 platforms, and will take full advantage of the advanced I/O features
62 offered by these operating systems.
64 %description -l pl.UTF-8
65 Celem projektu Varnish jest stworzenie wydajnego akceleratora HTTP.
67 Varnish jest tworzony głównie z myślą o platformach FreeBSD 6 i Linux
68 2.6 i będzie wykorzystywał w pełni zaawansowane możliwości we/we
69 oferowane przez te systemy operacyjne.
72 Summary: Libraries for Varnish
74 Conflicts: varnish < 2.0.4-2
80 Summary: Header files for varnish library
81 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki varnish
82 Group: Development/Libraries
83 Requires: %{name}-libs = %{version}-%{release}
86 Header files for varnish library.
88 %description devel -l pl.UTF-8
89 Pliki nagłówkowe biblioteki varnish.
92 Summary: Static varnish library
93 Summary(pl.UTF-8): Statyczna biblioteka varnish
94 Group: Development/Libraries
95 Requires: %{name}-devel = %{version}-%{release}
98 Static varnish library.
100 %description static -l pl.UTF-8
101 Statyczna biblioteka varnish.
109 export CPPFLAGS="-I/usr/include/ncurses"
116 %ifarch hppa s390 sparc ppc
124 LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
128 rm -rf $RPM_BUILD_ROOT
131 INSTALL="install -p" \
132 DESTDIR=$RPM_BUILD_ROOT
134 # make dirs after make install to know which ones needs spec and which ones make install
135 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{logrotate.d,rc.d/init.d,sysconfig},/var/{run,lib}/varnish} \
136 $RPM_BUILD_ROOT/var/log/{archive/,}varnish \
137 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
139 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnish
140 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishncsa
141 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/varnish
142 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/varnishncsa
143 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/varnish
144 cp -p %{SOURCE8} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
146 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
147 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/vmods/*.la
150 rm -rf $RPM_BUILD_ROOT
153 /sbin/chkconfig --add varnish
154 /sbin/chkconfig --add varnishncsa
155 %service varnish restart
156 %service varnishncsa restart
159 %groupadd -g 241 %{name}
160 %useradd -u 241 -d /var/lib/%{name} -g %{name} -c "Varnishd User" %{name}
163 if [ "$1" = "0" ]; then
169 if [ "$1" = "0" ]; then
170 %service -q varnish stop
171 %service -q varnishncsa stop
172 /sbin/chkconfig --del varnish
173 /sbin/chkconfig --del varnishncsa
176 %post libs -p /sbin/ldconfig
177 %postun libs -p /sbin/ldconfig
180 %defattr(644,root,root,755)
181 %doc LICENSE README ChangeLog etc/*.vcl
182 %dir %{_sysconfdir}/%{name}
183 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.vcl
184 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/varnish
185 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/varnishncsa
186 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/varnish
187 %attr(754,root,root) /etc/rc.d/init.d/varnish
188 %attr(754,root,root) /etc/rc.d/init.d/varnishncsa
189 %attr(755,root,root) %{_sbindir}/varnishd
190 %attr(755,root,root) %{_bindir}/varnishadm
191 %attr(755,root,root) %{_bindir}/varnishhist
192 %attr(755,root,root) %{_bindir}/varnishlog
193 %attr(755,root,root) %{_bindir}/varnishncsa
194 %attr(755,root,root) %{_bindir}/varnishreplay
195 %attr(755,root,root) %{_bindir}/varnishsizes
196 %attr(755,root,root) %{_bindir}/varnishstat
197 %attr(755,root,root) %{_bindir}/varnishtest
198 %attr(755,root,root) %{_bindir}/varnishtop
199 %dir %{_libdir}/%{name}
200 %attr(755,root,root) %{_libdir}/%{name}/libvarnish.so
201 %attr(755,root,root) %{_libdir}/%{name}/libvarnishcompat.so
202 %attr(755,root,root) %{_libdir}/%{name}/libvcl.so
203 %attr(755,root,root) %{_libdir}/%{name}/libvgz.so
204 %dir %{_libdir}/%{name}/vmods
205 %attr(755,root,root) %{_libdir}/%{name}/vmods/libvmod_std.so
206 %{_mandir}/man1/varnishadm.1*
207 %{_mandir}/man1/varnishd.1*
208 %{_mandir}/man1/varnishhist.1*
209 %{_mandir}/man1/varnishlog.1*
210 %{_mandir}/man1/varnishncsa.1*
211 %{_mandir}/man1/varnishreplay.1*
212 %{_mandir}/man1/varnishsizes.1*
213 %{_mandir}/man1/varnishstat.1*
214 %{_mandir}/man1/varnishtest.1*
215 %{_mandir}/man1/varnishtop.1*
216 %{_mandir}/man3/vmod_std.3*
217 %{_mandir}/man7/varnish-cli.7*
218 %{_mandir}/man7/varnish-counters.7*
219 %{_mandir}/man7/vcl.7*
220 %dir /var/lib/varnish
221 %dir /var/run/varnish
222 /usr/lib/tmpfiles.d/%{name}.conf
224 %dir %attr(751,root,root) /var/log/varnish
225 %dir %attr(750,root,root) /var/log/archive/varnish
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libvarnishapi.so.*.*.*
230 %ghost %{_libdir}/libvarnishapi.so.1
233 %defattr(644,root,root,755)
234 %{_includedir}/varnish
235 %{_libdir}/libvarnishapi.la
236 %{_libdir}/libvarnishapi.so
237 %{_pkgconfigdir}/varnishapi.pc
240 %defattr(644,root,root,755)
241 %{_libdir}/libvarnishapi.a
242 %{_libdir}/%{name}/libvarnish.a
243 %{_libdir}/%{name}/libvarnishcompat.a
244 %{_libdir}/%{name}/libvcl.a
245 %{_libdir}/%{name}/libvgz.a
246 %{_libdir}/%{name}/vmods/libvmod_std.a