]> git.pld-linux.org Git - packages/varnish.git/blob - varnish.spec
secret file (-S) support in initscript, package ghost secret file
[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
5 # Conditional build:
6 %bcond_without  doc             # build documentation
7 %bcond_without  tests   # build without tests. binds daemon on 127.0.0.1 9080, 9081, 9001 ports
8
9 Summary:        Varnish - a high-performance HTTP accelerator
10 Summary(pl.UTF-8):      Varnish - wydajny akcelerator HTTP
11 Name:           varnish
12 Version:        3.0.3
13 Release:        2
14 License:        BSD
15 Group:          Networking/Daemons/HTTP
16 Source0:        http://repo.varnish-cache.org/source/%{name}-%{version}.tar.gz
17 # Source0-md5:  714310c83fdbd2061d897dacd3f63d8b
18 Source1:        %{name}.init
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
35 %if %{with doc}
36 BuildRequires:  docutils
37 BuildRequires:  groff
38 BuildRequires:  libxslt-progs
39 %endif
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}
47 Requires:       gcc
48 Requires:       glibc-devel
49 Requires:       rc-scripts >= 0.4.1.26
50 Suggests:       vim-syntax-vcl
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %define         _localstatedir  /var/run
54
55 %description
56 The goal of the Varnish project is to develop a state-of-the-art,
57 high-performance HTTP accelerator.
58
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.
62
63 %description -l pl.UTF-8
64 Celem projektu Varnish jest stworzenie wydajnego akceleratora HTTP.
65
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.
69
70 %package libs
71 Summary:        Libraries for Varnish
72 Group:          Libraries
73 Conflicts:      varnish < 2.0.4-2
74
75 %description libs
76 Libraies for Varnish.
77
78 %package devel
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}
83
84 %description devel
85 Header files for varnish library.
86
87 %description devel -l pl.UTF-8
88 Pliki nagłówkowe biblioteki varnish.
89
90 %package static
91 Summary:        Static varnish library
92 Summary(pl.UTF-8):      Statyczna biblioteka varnish
93 Group:          Development/Libraries
94 Requires:       %{name}-devel = %{version}-%{release}
95
96 %description static
97 Static varnish library.
98
99 %description static -l pl.UTF-8
100 Statyczna biblioteka varnish.
101
102 %prep
103 %setup -q
104 #%patch100 -p0
105 %patch0 -p1
106
107 %build
108 export CPPFLAGS="-I/usr/include/ncurses"
109 %{__aclocal} -I m4
110 %{__libtoolize}
111 %{__autoheader}
112 %{__automake}
113 %{__autoconf}
114 %configure \
115 %ifarch hppa s390 sparc ppc
116         --disable-jemalloc
117 %endif
118
119 %{__make}
120
121 %if %{with tests}
122 %{__make} check \
123         LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
124 %endif
125
126 %install
127 rm -rf $RPM_BUILD_ROOT
128
129 %{__make} install \
130         INSTALL="install -p" \
131         DESTDIR=$RPM_BUILD_ROOT
132
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}
137
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
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 %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
224
225 %dir %attr(751,root,root) /var/log/varnish
226 %dir %attr(750,root,root) /var/log/archive/varnish
227
228 %files libs
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_libdir}/libvarnishapi.so.*.*.*
231 %ghost %{_libdir}/libvarnishapi.so.1
232
233 %files devel
234 %defattr(644,root,root,755)
235 %{_includedir}/varnish
236 %{_libdir}/libvarnishapi.la
237 %{_libdir}/libvarnishapi.so
238 %{_pkgconfigdir}/varnishapi.pc
239
240 %files static
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
This page took 0.064416 seconds and 4 git commands to generate.