]> git.pld-linux.org Git - packages/varnish.git/blob - varnish.spec
- HTTP_HDR_MAX_VAL 128 instead of 32
[packages/varnish.git] / varnish.spec
1 # TODO
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
4 #
5 # Conditional build:
6 %bcond_without  tests           # build without tests. binds daemon on 127.0.0.1 9080, 9081, 9001 ports
7
8 Summary:        Varnish - a high-performance HTTP accelerator
9 Summary(pl.UTF-8):      Varnish - wydajny akcelerator HTTP
10 Name:           varnish
11 Version:        2.0.6
12 Release:        3
13 License:        BSD
14 Group:          Networking/Daemons/HTTP
15 Source0:        http://downloads.sourceforge.net/varnish/%{name}-%{version}.tar.gz
16 # Source0-md5:  d91dc21c636db61c69b5e8f061c5bb95
17 Source1:        %{name}.init
18 Source2:        %{name}log.init
19 Source3:        %{name}ncsa.init
20 Source4:        %{name}.sysconfig
21 Source5:        %{name}ncsa.sysconfig
22 Source6:        %{name}.logrotate
23 Source7:        %{name}.conf
24 #Patch100:      branch.diff
25 Patch0:         %{name}-build.patch
26 URL:            http://www.varnish-cache.org/
27 BuildRequires:  autoconf
28 BuildRequires:  automake
29 BuildRequires:  groff
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}
40 Requires:       gcc
41 Requires:       glibc-devel
42 Requires:       rc-scripts >= 0.4.1.26
43 Suggests:       vim-syntax-vcl
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         _localstatedir  /var/run
47
48 %description
49 The goal of the Varnish project is to develop a state-of-the-art,
50 high-performance HTTP accelerator.
51
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.
55
56 %description -l pl.UTF-8
57 Celem projektu Varnish jest stworzenie wydajnego akceleratora HTTP.
58
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.
62
63 %package libs
64 Summary:        Libraries for Varnish
65 Group:          Libraries
66 Conflicts:      varnish < 2.0.4-2
67
68 %description libs
69 Libraies for Varnish.
70
71 %package devel
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}
76
77 %description devel
78 Header files for varnish library.
79
80 %description devel -l pl.UTF-8
81 Pliki nagłówkowe biblioteki varnish.
82
83 %package static
84 Summary:        Static varnish library
85 Summary(pl.UTF-8):      Statyczna biblioteka varnish
86 Group:          Development/Libraries
87 Requires:       %{name}-devel = %{version}-%{release}
88
89 %description static
90 Static varnish library.
91
92 %description static -l pl.UTF-8
93 Statyczna biblioteka varnish.
94
95 %prep
96 %setup -q
97 #%patch100 -p0
98 %patch0 -p1
99
100 %build
101 export CPPFLAGS="-I/usr/include/ncurses"
102 %{__aclocal}
103 %{__libtoolize}
104 %{__autoheader}
105 %{__automake}
106 %{__autoconf}
107 %configure \
108         --with-max-header-fields=128 \
109 %ifarch hppa s390 sparc ppc
110         --disable-jemalloc
111 %endif
112
113 %{__make}
114
115 %if %{with tests}
116 %{__make} check \
117         LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
118 %endif
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122
123 %{__make} install \
124         INSTALL="install -p" \
125         DESTDIR=$RPM_BUILD_ROOT
126
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
130
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
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %post
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
149
150 %pre
151 %groupadd -g 241 %{name}
152 %useradd -u 241 -d /var/lib/%{name} -g %{name} -c "Varnishd User" %{name}
153
154 %postun
155 if [ "$1" = "0" ]; then
156         %userremove %{name}
157         %groupremove %{name}
158 fi
159
160 %preun
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
168 fi
169
170 %post   libs -p /sbin/ldconfig
171 %postun libs -p /sbin/ldconfig
172
173 %files
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*
186 %{_mandir}/man1/*
187 %{_mandir}/man7/*
188 %dir /var/lib/varnish
189 %dir /var/run/varnish
190
191 %dir %attr(751,root,root) /var/log/varnish
192 %dir %attr(750,root,root) /var/log/archive/varnish
193
194 %files libs
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
200
201 %files devel
202 %defattr(644,root,root,755)
203 %{_includedir}/varnish
204 %attr(755,root,root) %{_libdir}/*.so
205 %{_libdir}/*.la
206 %{_pkgconfigdir}/*.pc
207
208 %files static
209 %defattr(644,root,root,755)
210 %{_libdir}/*.a
This page took 0.125686 seconds and 3 git commands to generate.