2 # - make tests use secure dir, not /tmp, see varnish-2.0.6/bin/varnishtest
3 # - hungs ac builders: tests/a00009.vtc
6 %bcond_without doc # build documentation
7 %bcond_without tests # build without tests. binds daemon on 127.0.0.1 9080, 9081, 9001 ports
9 Summary: Varnish - a high-performance HTTP accelerator
10 Summary(pl.UTF-8): Varnish - wydajny akcelerator HTTP
15 Group: Networking/Daemons/HTTP
16 Source0: http://repo.varnish-cache.org/source/%{name}-%{version}.tar.gz
17 # Source0-md5: 714310c83fdbd2061d897dacd3f63d8b
19 Source3: %{name}ncsa.init
20 Source4: %{name}.sysconfig
21 Source5: %{name}ncsa.sysconfig
22 Source6: %{name}.logrotate
23 Source8: %{name}.tmpfiles
24 #Patch100: branch.diff
25 Patch0: no-ccache.patch
26 URL: http://www.varnish-cache.org/
27 BuildRequires: autoconf
28 BuildRequires: automake
29 BuildRequires: libstdc++-devel
30 BuildRequires: libtool >= 2:1.5
31 BuildRequires: ncurses-devel
32 BuildRequires: pcre-devel
33 BuildRequires: pkgconfig
34 BuildRequires: rpmbuild(macros) >= 1.647
36 BuildRequires: docutils
38 BuildRequires: libxslt-progs
40 Requires(postun): /usr/sbin/groupdel
41 Requires(postun): /usr/sbin/userdel
42 Requires(pre): /bin/id
43 Requires(pre): /usr/bin/getgid
44 Requires(pre): /usr/sbin/groupadd
45 Requires(pre): /usr/sbin/useradd
46 Requires: %{name}-libs = %{version}-%{release}
49 Requires: rc-scripts >= 0.4.1.26
50 Suggests: vim-syntax-vcl
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 %define _localstatedir /var/run
56 The goal of the Varnish project is to develop a state-of-the-art,
57 high-performance HTTP accelerator.
59 Varnish is targeted primarily at the FreeBSD 6 and Linux 2.6
60 platforms, and will take full advantage of the advanced I/O features
61 offered by these operating systems.
63 %description -l pl.UTF-8
64 Celem projektu Varnish jest stworzenie wydajnego akceleratora HTTP.
66 Varnish jest tworzony głównie z myślą o platformach FreeBSD 6 i Linux
67 2.6 i będzie wykorzystywał w pełni zaawansowane możliwości we/we
68 oferowane przez te systemy operacyjne.
71 Summary: Libraries for Varnish
73 Conflicts: varnish < 2.0.4-2
79 Summary: Header files for varnish library
80 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki varnish
81 Group: Development/Libraries
82 Requires: %{name}-libs = %{version}-%{release}
85 Header files for varnish library.
87 %description devel -l pl.UTF-8
88 Pliki nagłówkowe biblioteki varnish.
91 Summary: Static varnish library
92 Summary(pl.UTF-8): Statyczna biblioteka varnish
93 Group: Development/Libraries
94 Requires: %{name}-devel = %{version}-%{release}
97 Static varnish library.
99 %description static -l pl.UTF-8
100 Statyczna biblioteka varnish.
108 export CPPFLAGS="-I/usr/include/ncurses"
115 %ifarch hppa s390 sparc ppc
123 LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
127 rm -rf $RPM_BUILD_ROOT
130 INSTALL="install -p" \
131 DESTDIR=$RPM_BUILD_ROOT
133 # make dirs after make install to know which ones needs spec and which ones make install
134 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{logrotate.d,rc.d/init.d,sysconfig},/var/{run,lib}/varnish} \
135 $RPM_BUILD_ROOT/var/log/{archive/,}varnish \
136 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
138 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnish
139 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishncsa
140 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/varnish
141 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/varnishncsa
142 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/varnish
143 cp -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
144 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/secret
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 %attr(750,root,root) %{_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 %ghost %attr(600,root,root) %{_sysconfdir}/%{name}/secret
187 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/varnish
188 %attr(754,root,root) /etc/rc.d/init.d/varnish
189 %attr(754,root,root) /etc/rc.d/init.d/varnishncsa
190 %attr(755,root,root) %{_sbindir}/varnishd
191 %attr(755,root,root) %{_bindir}/varnishadm
192 %attr(755,root,root) %{_bindir}/varnishhist
193 %attr(755,root,root) %{_bindir}/varnishlog
194 %attr(755,root,root) %{_bindir}/varnishncsa
195 %attr(755,root,root) %{_bindir}/varnishreplay
196 %attr(755,root,root) %{_bindir}/varnishsizes
197 %attr(755,root,root) %{_bindir}/varnishstat
198 %attr(755,root,root) %{_bindir}/varnishtest
199 %attr(755,root,root) %{_bindir}/varnishtop
200 %dir %{_libdir}/%{name}
201 %attr(755,root,root) %{_libdir}/%{name}/libvarnish.so
202 %attr(755,root,root) %{_libdir}/%{name}/libvarnishcompat.so
203 %attr(755,root,root) %{_libdir}/%{name}/libvcl.so
204 %attr(755,root,root) %{_libdir}/%{name}/libvgz.so
205 %dir %{_libdir}/%{name}/vmods
206 %attr(755,root,root) %{_libdir}/%{name}/vmods/libvmod_std.so
207 %{_mandir}/man1/varnishadm.1*
208 %{_mandir}/man1/varnishd.1*
209 %{_mandir}/man1/varnishhist.1*
210 %{_mandir}/man1/varnishlog.1*
211 %{_mandir}/man1/varnishncsa.1*
212 %{_mandir}/man1/varnishreplay.1*
213 %{_mandir}/man1/varnishsizes.1*
214 %{_mandir}/man1/varnishstat.1*
215 %{_mandir}/man1/varnishtest.1*
216 %{_mandir}/man1/varnishtop.1*
217 %{_mandir}/man3/vmod_std.3*
218 %{_mandir}/man7/varnish-cli.7*
219 %{_mandir}/man7/varnish-counters.7*
220 %{_mandir}/man7/vcl.7*
221 %dir /var/lib/varnish
222 %dir /var/run/varnish
223 %{systemdtmpfilesdir}/%{name}.conf
225 %dir %attr(751,root,root) /var/log/varnish
226 %dir %attr(750,root,root) /var/log/archive/varnish
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_libdir}/libvarnishapi.so.*.*.*
231 %ghost %{_libdir}/libvarnishapi.so.1
234 %defattr(644,root,root,755)
235 %{_includedir}/varnish
236 %{_libdir}/libvarnishapi.la
237 %{_libdir}/libvarnishapi.so
238 %{_pkgconfigdir}/varnishapi.pc
241 %defattr(644,root,root,755)
242 %{_libdir}/libvarnishapi.a
243 %{_libdir}/%{name}/libvarnish.a
244 %{_libdir}/%{name}/libvarnishcompat.a
245 %{_libdir}/%{name}/libvcl.a
246 %{_libdir}/%{name}/libvgz.a
247 %{_libdir}/%{name}/vmods/libvmod_std.a