2 # - make tests use secure dir, not /tmp, see varnish-2.0.6/bin/varnishtest
3 # - some -l missing: /usr/lib64/libvcl.so.1.0.0
6 %bcond_without tests # build without tests. binds daemon on 127.0.0.1 9080, 9081, 9001 ports
8 Summary: Varnish - a high-performance HTTP accelerator
9 Summary(pl.UTF-8): Varnish - wydajny akcelerator HTTP
14 Group: Networking/Daemons/HTTP
15 Source0: http://downloads.sourceforge.net/varnish/%{name}-%{version}.tar.gz
16 # Source0-md5: d91dc21c636db61c69b5e8f061c5bb95
18 Source2: %{name}log.init
19 Source3: %{name}ncsa.init
20 Source4: %{name}.sysconfig
21 Source5: %{name}ncsa.sysconfig
22 Source6: %{name}.logrotate
24 #Patch100: branch.diff
25 Patch0: %{name}-build.patch
26 URL: http://www.varnish-cache.org/
27 BuildRequires: autoconf
28 BuildRequires: automake
30 BuildRequires: libstdc++-devel
31 BuildRequires: libtool >= 2:1.5
32 BuildRequires: ncurses-devel
33 Requires(postun): /usr/sbin/groupdel
34 Requires(postun): /usr/sbin/userdel
35 Requires(pre): /bin/id
36 Requires(pre): /usr/bin/getgid
37 Requires(pre): /usr/sbin/groupadd
38 Requires(pre): /usr/sbin/useradd
39 Requires: %{name}-libs = %{version}-%{release}
42 Requires: rc-scripts >= 0.4.1.26
43 Suggests: vim-syntax-vcl
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define _localstatedir /var/run
49 The goal of the Varnish project is to develop a state-of-the-art,
50 high-performance HTTP accelerator.
52 Varnish is targeted primarily at the FreeBSD 6 and Linux 2.6
53 platforms, and will take full advantage of the advanced I/O features
54 offered by these operating systems.
56 %description -l pl.UTF-8
57 Celem projektu Varnish jest stworzenie wydajnego akceleratora HTTP.
59 Varnish jest tworzony głównie z myślą o platformach FreeBSD 6 i Linux
60 2.6 i będzie wykorzystywał w pełni zaawansowane możliwości we/we
61 oferowane przez te systemy operacyjne.
64 Summary: Libraries for Varnish
66 Conflicts: varnish < 2.0.4-2
72 Summary: Header files for varnish library
73 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki varnish
74 Group: Development/Libraries
75 Requires: %{name}-libs = %{version}-%{release}
78 Header files for varnish library.
80 %description devel -l pl.UTF-8
81 Pliki nagłówkowe biblioteki varnish.
84 Summary: Static varnish library
85 Summary(pl.UTF-8): Statyczna biblioteka varnish
86 Group: Development/Libraries
87 Requires: %{name}-devel = %{version}-%{release}
90 Static varnish library.
92 %description static -l pl.UTF-8
93 Statyczna biblioteka varnish.
101 export CPPFLAGS="-I/usr/include/ncurses"
108 --with-max-header-fields=128 \
109 %ifarch hppa s390 sparc ppc
117 LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
121 rm -rf $RPM_BUILD_ROOT
124 INSTALL="install -p" \
125 DESTDIR=$RPM_BUILD_ROOT
127 # make dirs after make install to know which ones needs spec and which ones make install
128 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{logrotate.d,rc.d/init.d,sysconfig},/var/{run,lib}/varnish} \
129 $RPM_BUILD_ROOT/var/log/{archive/,}varnish
131 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnish
132 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishlog
133 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishncsa
134 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/varnish
135 cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/varnishncsa
136 cp -a %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/varnish
137 cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/default.vcl
140 rm -rf $RPM_BUILD_ROOT
143 /sbin/chkconfig --add varnish
144 /sbin/chkconfig --add varnishlog
145 /sbin/chkconfig --add varnishncsa
146 %service varnish restart
147 %service varnishlog restart
148 %service varnishncsa restart
151 %groupadd -g 241 %{name}
152 %useradd -u 241 -d /var/lib/%{name} -g %{name} -c "Varnishd User" %{name}
155 if [ "$1" = "0" ]; then
161 if [ "$1" = "0" ]; then
162 %service -q varnish stop
163 %service -q varnishlog stop
164 %service -q varnishncsa stop
165 /sbin/chkconfig --del varnish
166 /sbin/chkconfig --del varnishlog
167 /sbin/chkconfig --del varnishncsa
170 %post libs -p /sbin/ldconfig
171 %postun libs -p /sbin/ldconfig
174 %defattr(644,root,root,755)
175 %doc LICENSE README ChangeLog etc/*.vcl
176 %dir %{_sysconfdir}/%{name}
177 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.vcl
178 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/varnish
179 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/varnishncsa
180 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/varnish
181 %attr(754,root,root) /etc/rc.d/init.d/varnish
182 %attr(754,root,root) /etc/rc.d/init.d/varnishlog
183 %attr(754,root,root) /etc/rc.d/init.d/varnishncsa
184 %attr(755,root,root) %{_sbindir}/varnishd
185 %attr(755,root,root) %{_bindir}/varnish*
188 %dir /var/lib/varnish
189 %dir /var/run/varnish
191 %dir %attr(751,root,root) /var/log/varnish
192 %dir %attr(750,root,root) /var/log/archive/varnish
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_libdir}/libvarnish*.so.*.*.*
197 %attr(755,root,root) %ghost %{_libdir}/libvarnish*.so.1
198 %attr(755,root,root) %{_libdir}/libvcl.so.*.*.*
199 %attr(755,root,root) %ghost %{_libdir}/libvcl.so.1
202 %defattr(644,root,root,755)
203 %{_includedir}/varnish
204 %attr(755,root,root) %{_libdir}/*.so
206 %{_pkgconfigdir}/*.pc
209 %defattr(644,root,root,755)