]> git.pld-linux.org Git - packages/varnish.git/blob - varnish.spec
do not overwrite upstream default.vcl with an outdated copy
[packages/varnish.git] / varnish.spec
1 # TODO
2 # - make tests use secure dir, not /tmp, see varnish-2.0.6/bin/varnishtest
3 # - hungs ac builders: tests/a00009.vtc
4 # -S support
5
6 # Conditional build:
7 %bcond_without  doc             # build documentation
8 %bcond_without  tests   # build without tests. binds daemon on 127.0.0.1 9080, 9081, 9001 ports
9
10 Summary:        Varnish - a high-performance HTTP accelerator
11 Summary(pl.UTF-8):      Varnish - wydajny akcelerator HTTP
12 Name:           varnish
13 Version:        3.0.3
14 Release:        2
15 License:        BSD
16 Group:          Networking/Daemons/HTTP
17 Source0:        http://repo.varnish-cache.org/source/%{name}-%{version}.tar.gz
18 # Source0-md5:  714310c83fdbd2061d897dacd3f63d8b
19 Source1:        %{name}.init
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
36 %if %{with doc}
37 BuildRequires:  docutils
38 BuildRequires:  groff
39 BuildRequires:  libxslt-progs
40 %endif
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}
48 Requires:       gcc
49 Requires:       glibc-devel
50 Requires:       rc-scripts >= 0.4.1.26
51 Suggests:       vim-syntax-vcl
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %define         _localstatedir  /var/run
55
56 %description
57 The goal of the Varnish project is to develop a state-of-the-art,
58 high-performance HTTP accelerator.
59
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.
63
64 %description -l pl.UTF-8
65 Celem projektu Varnish jest stworzenie wydajnego akceleratora HTTP.
66
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.
70
71 %package libs
72 Summary:        Libraries for Varnish
73 Group:          Libraries
74 Conflicts:      varnish < 2.0.4-2
75
76 %description libs
77 Libraies for Varnish.
78
79 %package devel
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}
84
85 %description devel
86 Header files for varnish library.
87
88 %description devel -l pl.UTF-8
89 Pliki nagłówkowe biblioteki varnish.
90
91 %package static
92 Summary:        Static varnish library
93 Summary(pl.UTF-8):      Statyczna biblioteka varnish
94 Group:          Development/Libraries
95 Requires:       %{name}-devel = %{version}-%{release}
96
97 %description static
98 Static varnish library.
99
100 %description static -l pl.UTF-8
101 Statyczna biblioteka varnish.
102
103 %prep
104 %setup -q
105 #%patch100 -p0
106 %patch0 -p1
107
108 %build
109 export CPPFLAGS="-I/usr/include/ncurses"
110 %{__aclocal} -I m4
111 %{__libtoolize}
112 %{__autoheader}
113 %{__automake}
114 %{__autoconf}
115 %configure \
116 %ifarch hppa s390 sparc ppc
117         --disable-jemalloc
118 %endif
119
120 %{__make}
121
122 %if %{with tests}
123 %{__make} check \
124         LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
125 %endif
126
127 %install
128 rm -rf $RPM_BUILD_ROOT
129
130 %{__make} install \
131         INSTALL="install -p" \
132         DESTDIR=$RPM_BUILD_ROOT
133
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
138
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
145
146 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
147 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/vmods/*.la
148
149 %clean
150 rm -rf $RPM_BUILD_ROOT
151
152 %post
153 /sbin/chkconfig --add varnish
154 /sbin/chkconfig --add varnishncsa
155 %service varnish restart
156 %service varnishncsa restart
157
158 %pre
159 %groupadd -g 241 %{name}
160 %useradd -u 241 -d /var/lib/%{name} -g %{name} -c "Varnishd User" %{name}
161
162 %postun
163 if [ "$1" = "0" ]; then
164         %userremove %{name}
165         %groupremove %{name}
166 fi
167
168 %preun
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
174 fi
175
176 %post   libs -p /sbin/ldconfig
177 %postun libs -p /sbin/ldconfig
178
179 %files
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
223
224 %dir %attr(751,root,root) /var/log/varnish
225 %dir %attr(750,root,root) /var/log/archive/varnish
226
227 %files libs
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libvarnishapi.so.*.*.*
230 %ghost %{_libdir}/libvarnishapi.so.1
231
232 %files devel
233 %defattr(644,root,root,755)
234 %{_includedir}/varnish
235 %{_libdir}/libvarnishapi.la
236 %{_libdir}/libvarnishapi.so
237 %{_pkgconfigdir}/varnishapi.pc
238
239 %files static
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
This page took 0.080552 seconds and 4 git commands to generate.