]> git.pld-linux.org Git - packages/varnish.git/blob - varnish.spec
- up to 2.1.5, --with-max-header-fields no longer needed
[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 # - some -l missing: /usr/lib64/libvcl.so.1.0.0
5
6 # Conditional build:
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:        2.1.5
13 Release:        0.1
14 License:        BSD
15 Group:          Networking/Daemons/HTTP
16 Source0:        http://repo.varnish-cache.org/source/%{name}-%{version}.tar.gz
17 # Source0-md5:  2d2f227da36a2a240c475304c717b8e3
18 Source1:        %{name}.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:    rpmbuild(macros) >= 1.583
33 BuildRequires:  ncurses-devel
34 Requires(postun):       /usr/sbin/groupdel
35 Requires(postun):       /usr/sbin/userdel
36 Requires(pre):  /bin/id
37 Requires(pre):  /usr/bin/getgid
38 Requires(pre):  /usr/sbin/groupadd
39 Requires(pre):  /usr/sbin/useradd
40 Requires:       %{name}-libs = %{version}-%{release}
41 Requires:       gcc
42 Requires:       glibc-devel
43 Requires:       rc-scripts >= 0.4.1.26
44 Suggests:       vim-syntax-vcl
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %define         _localstatedir  /var/run
48
49 # TODO: find reasons http://pastebin.com/ZNq1KDPG
50 %define         skip_post_check_so      libvcl.so.1.0.0
51
52 %description
53 The goal of the Varnish project is to develop a state-of-the-art,
54 high-performance HTTP accelerator.
55
56 Varnish is targeted primarily at the FreeBSD 6 and Linux 2.6
57 platforms, and will take full advantage of the advanced I/O features
58 offered by these operating systems.
59
60 %description -l pl.UTF-8
61 Celem projektu Varnish jest stworzenie wydajnego akceleratora HTTP.
62
63 Varnish jest tworzony głównie z myślą o platformach FreeBSD 6 i Linux
64 2.6 i będzie wykorzystywał w pełni zaawansowane możliwości we/we
65 oferowane przez te systemy operacyjne.
66
67 %package libs
68 Summary:        Libraries for Varnish
69 Group:          Libraries
70 Conflicts:      varnish < 2.0.4-2
71
72 %description libs
73 Libraies for Varnish.
74
75 %package devel
76 Summary:        Header files for varnish library
77 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki varnish
78 Group:          Development/Libraries
79 Requires:       %{name}-libs = %{version}-%{release}
80
81 %description devel
82 Header files for varnish library.
83
84 %description devel -l pl.UTF-8
85 Pliki nagłówkowe biblioteki varnish.
86
87 %package static
88 Summary:        Static varnish library
89 Summary(pl.UTF-8):      Statyczna biblioteka varnish
90 Group:          Development/Libraries
91 Requires:       %{name}-devel = %{version}-%{release}
92
93 %description static
94 Static varnish library.
95
96 %description static -l pl.UTF-8
97 Statyczna biblioteka varnish.
98
99 %prep
100 %setup -q
101 #%patch100 -p0
102 %patch0 -p1
103
104 %build
105 export CPPFLAGS="-I/usr/include/ncurses"
106 %{__aclocal}
107 %{__libtoolize}
108 %{__autoheader}
109 %{__automake}
110 %{__autoconf}
111 %configure \
112 %ifarch hppa s390 sparc ppc
113         --disable-jemalloc
114 %endif
115
116 %{__sed} -i -e '/CURSES_LIBS = / s,-lcurses,-ltinfo &,' bin/varnish{hist,stat,top,sizes}/Makefile
117
118 %{__make}
119
120 %if %{with tests}
121 %{__make} check \
122         LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
123 %endif
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127
128 %{__make} install \
129         INSTALL="install -p" \
130         DESTDIR=$RPM_BUILD_ROOT
131
132 # make dirs after make install to know which ones needs spec and which ones make install
133 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{logrotate.d,rc.d/init.d,sysconfig},/var/{run,lib}/varnish} \
134         $RPM_BUILD_ROOT/var/log/{archive/,}varnish
135
136 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnish
137 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishncsa
138 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/varnish
139 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/varnishncsa
140 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/varnish
141 cp -p %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/default.vcl
142
143 %clean
144 rm -rf $RPM_BUILD_ROOT
145
146 %post
147 /sbin/chkconfig --add varnish
148 /sbin/chkconfig --add varnishncsa
149 %service varnish restart
150 %service varnishncsa restart
151
152 %pre
153 %groupadd -g 241 %{name}
154 %useradd -u 241 -d /var/lib/%{name} -g %{name} -c "Varnishd User" %{name}
155
156 %postun
157 if [ "$1" = "0" ]; then
158         %userremove %{name}
159         %groupremove %{name}
160 fi
161
162 %preun
163 if [ "$1" = "0" ]; then
164         %service -q varnish stop
165         %service -q varnishncsa stop
166         /sbin/chkconfig --del varnish
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/varnishncsa
183 %attr(755,root,root) %{_sbindir}/varnishd
184 %attr(755,root,root) %{_bindir}/varnish*
185 %{_mandir}/man1/*
186 %{_mandir}/man7/*
187 %dir /var/lib/varnish
188 %dir /var/run/varnish
189
190 %dir %attr(751,root,root) /var/log/varnish
191 %dir %attr(750,root,root) /var/log/archive/varnish
192
193 %files libs
194 %defattr(644,root,root,755)
195 %attr(755,root,root) %{_libdir}/libvarnish*.so.*.*.*
196 %attr(755,root,root) %ghost %{_libdir}/libvarnish*.so.1
197 %attr(755,root,root) %{_libdir}/libvcl.so.*.*.*
198 %attr(755,root,root) %ghost %{_libdir}/libvcl.so.1
199
200 %files devel
201 %defattr(644,root,root,755)
202 %{_includedir}/varnish
203 %attr(755,root,root) %{_libdir}/*.so
204 %{_libdir}/*.la
205 %{_pkgconfigdir}/*.pc
206
207 %files static
208 %defattr(644,root,root,755)
209 %{_libdir}/*.a
This page took 0.038766 seconds and 4 git commands to generate.