root/trunk/varnish-cache/redhat/varnish.spec @ 3463

Revision 3463, 14.6 KB (checked in by ingvar, 21 months ago)

Changed rpm summary string as requested by the Fedora project

  • Property svn:keywords set to Id
Line 
1Summary: High-performance HTTP accelerator
2Name: varnish
3Version: 2.0.2
4Release: 1%{?dist}
5License: BSD
6Group: System Environment/Daemons
7URL: http://www.varnish-cache.org/
8Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz
9Patch0: varnish.varnishtest_debugflag.patch
10BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11# The svn sources needs autoconf, automake and libtool to generate a suitable
12# configure script. Release tarballs would not need this
13#BuildRequires: automake autoconf libtool
14BuildRequires: ncurses-devel libxslt groff
15Requires: varnish-libs = %{version}-%{release}
16Requires: logrotate
17Requires: ncurses
18Requires(pre): shadow-utils
19Requires(post): /sbin/chkconfig
20Requires(preun): /sbin/chkconfig
21Requires(preun): /sbin/service
22Requires(preun): initscripts
23
24# Varnish actually needs gcc installed to work. It uses the C compiler
25# at runtime to compile the VCL configuration files. This is by design.
26Requires: gcc
27
28%description
29This is the Varnish high-performance HTTP accelerator. Documentation
30wiki and additional information about Varnish is available on the following
31web site: http://www.varnish-cache.org/
32
33%package libs
34Summary: Libraries for %{name}
35Group: System Environment/Libraries
36BuildRequires: ncurses-devel
37#Obsoletes: libvarnish1
38
39%description libs
40Libraries for %{name}.
41Varnish is a high-performance HTTP accelerator.
42
43%package libs-devel
44Summary: Development files for %{name}-libs
45Group: System Environment/Libraries
46BuildRequires: ncurses-devel
47Requires: varnish-libs = %{version}-%{release}
48
49%description libs-devel
50Development files for %{name}-libs
51Varnish is a high-performance HTTP accelerator
52
53#%package libs-static
54#Summary: Files for static linking of %{name} library functions
55#Group: System Environment/Libraries
56#BuildRequires: ncurses-devel
57#Requires: varnish-libs-devel = %{version}-%{release}
58#
59#%description libs-static
60#Files for static linking of varnish library functions
61#Varnish is a high-performance HTTP accelerator
62
63%prep
64%setup -q
65#%setup -q -n varnish-cache
66
67%patch0 -p0
68
69# The svn sources needs to generate a suitable configure script
70# Release tarballs would not need this
71#./autogen.sh
72
73# Hack to get 32- and 64-bits tests run concurrently on the same build machine
74case `uname -m` in
75        ppc64 | s390x | x86_64 | sparc64 )
76                sed -i '
77                        s,9001,9011,g;
78                        s,9080,9090,g;
79                        s,9081,9091,g;
80                        s,9082,9092,g;
81                        s,9180,9190,g;
82                ' bin/varnishtest/*.c bin/varnishtest/tests/*vtc
83                ;;
84        *)
85                ;;
86esac
87
88mkdir examples
89cp bin/varnishd/default.vcl etc/zope-plone.vcl examples
90
91%build
92
93# Remove "--disable static" if you want to build static libraries
94# jemalloc is not compatible with Red Hat's ppc64 RHEL5 kernel koji server :-(
95%ifarch ppc64 ppc
96%configure --disable-static --localstatedir=/var/lib --disable-jemalloc
97%else
98%configure --disable-static --localstatedir=/var/lib
99%endif
100
101# We have to remove rpath - not allowed in Fedora
102# (This problem only visible on 64 bit arches)
103sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g;
104        s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
105
106%{__make} %{?_smp_mflags}
107
108head -6 etc/default.vcl > redhat/default.vcl
109
110cat << EOF >> redhat/default.vcl
111backend default {
112  .host = "127.0.0.1";
113  .port = "80";
114}
115EOF
116
117tail -n +11 etc/default.vcl >> redhat/default.vcl
118
119%if 0%{?fedora}%{?rhel} == 0 || 0%{?rhel} <= 4 && 0%{?fedora} <= 8
120        # Old style daemon function
121        sed -i 's,--pidfile \$pidfile,,g;
122                s,status -p \$pidfile,status,g;
123                s,killproc -p \$pidfile,killproc,g' \
124        redhat/varnish.initrc redhat/varnishlog.initrc redhat/varnishncsa.initrc
125%endif
126
127%check
128# rhel5 on ppc64 is just too strange
129%ifarch ppc64
130        %if 0%{?rhel} > 4
131                cp bin/varnishd/.libs/varnishd bin/varnishd/lt-varnishd
132        %endif
133%endif
134
135LD_LIBRARY_PATH="lib/libvarnish/.libs:lib/libvarnishcompat/.libs:lib/libvarnishapi/.libs:lib/libvcl/.libs" bin/varnishd/varnishd -b 127.0.0.1:80 -C -n /tmp/foo
136%{__make} check LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
137
138%install
139rm -rf %{buildroot}
140make install DESTDIR=%{buildroot} INSTALL="install -p"
141
142# None of these for fedora
143find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';'
144
145# Remove this line to build a devel package with symlinks
146#find %{buildroot}/%{_libdir}/ -name '*.so' -type l -exec rm -f {} ';'
147
148mkdir -p %{buildroot}/var/lib/varnish
149mkdir -p %{buildroot}/var/log/varnish
150mkdir -p %{buildroot}/var/run/varnish
151%{__install} -D -m 0644 redhat/default.vcl %{buildroot}%{_sysconfdir}/varnish/default.vcl
152%{__install} -D -m 0644 redhat/varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/varnish
153%{__install} -D -m 0644 redhat/varnish.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/varnish
154%{__install} -D -m 0755 redhat/varnish.initrc %{buildroot}%{_initrddir}/varnish
155%{__install} -D -m 0755 redhat/varnishlog.initrc %{buildroot}%{_initrddir}/varnishlog
156%{__install} -D -m 0755 redhat/varnishncsa.initrc %{buildroot}%{_initrddir}/varnishncsa
157
158%clean
159rm -rf %{buildroot}
160
161%files
162%defattr(-,root,root,-)
163%{_sbindir}/*
164%{_bindir}/*
165%{_var}/lib/varnish
166%{_var}/log/varnish
167%{_mandir}/man1/*.1*
168%{_mandir}/man7/*.7*
169%doc INSTALL LICENSE README redhat/README.redhat ChangeLog
170%doc examples
171%dir %{_sysconfdir}/varnish/
172%config(noreplace) %{_sysconfdir}/varnish/default.vcl
173%config(noreplace) %{_sysconfdir}/sysconfig/varnish
174%config(noreplace) %{_sysconfdir}/logrotate.d/varnish
175%{_initrddir}/varnish
176%{_initrddir}/varnishlog
177%{_initrddir}/varnishncsa
178
179%files libs
180%defattr(-,root,root,-)
181%{_libdir}/*.so.*
182%doc LICENSE
183
184%files libs-devel
185%defattr(-,root,root,-)
186%{_libdir}/libvarnish.so
187%{_libdir}/libvarnishapi.so
188%{_libdir}/libvarnishcompat.so
189%{_libdir}/libvcl.so
190%dir %{_includedir}/varnish
191%{_includedir}/varnish/shmlog.h
192%{_includedir}/varnish/shmlog_tags.h
193%{_includedir}/varnish/stat_field.h
194%{_includedir}/varnish/stats.h
195%{_includedir}/varnish/varnishapi.h
196%{_libdir}/pkgconfig/varnishapi.pc
197%doc LICENSE
198
199#%files libs-static
200#%{_libdir}/libvarnish.a
201#%{_libdir}/libvarnishapi.a
202#%{_libdir}/libvarnishcompat.a
203#%{_libdir}/libvcl.a
204#%doc LICENSE
205
206%pre
207getent group varnish >/dev/null || groupadd -r varnish
208getent passwd varnish >/dev/null || \
209        useradd -r -g varnish -d /var/lib/varnish -s /sbin/nologin \
210                -c "Varnish http accelerator user" varnish
211exit 0
212
213%post
214/sbin/chkconfig --add varnish
215/sbin/chkconfig --add varnishlog
216/sbin/chkconfig --add varnishncsa
217
218%preun
219if [ $1 -lt 1 ]; then
220  /sbin/service varnish stop > /dev/null 2>&1
221  /sbin/service varnishlog stop > /dev/null 2>&1
222  /sbin/service varnishncsa stop > /dev/null 2>%1
223  /sbin/chkconfig --del varnish
224  /sbin/chkconfig --del varnishlog
225  /sbin/chkconfig --del varnishncsa
226fi
227
228%post libs -p /sbin/ldconfig
229
230%postun libs -p /sbin/ldconfig
231
232%changelog
233* Mon Nov 10 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0.2-1
234  New upstream release 2.0.2. A bugfix release
235
236* Sun Nov 02 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0.1-2
237- Removed the requirement for kernel => 2.6.0. All supported
238  platforms meets this, and it generates strange errors in EPEL
239
240* Fri Oct 17 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0.1-1
241- 2.0.1 released, a bugfix release. New upstream sources
242- Package now also available in EPEL
243
244* Thu Oct 16 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-2
245- Readded the debugflag patch. It's so practical
246- Added a strange workaround for make check on ppc64
247
248* Wed Oct 15 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-1
249- 2.0 released. New upstream sources
250- Disabled jemalloc on ppc and ppc64. Added a note in README.redhat
251- Synced to upstream again. No more patches needed
252
253* Wed Oct 08 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.11.rc1
254- 2.0-rc1 released. New upstream sources
255- Added a patch for pagesize to match redhat's rhel5 ppc64 koji build boxes
256- Added a patch for test a00008, from r3269
257- Removed condrestart in postscript at upgrade. We don't want that
258
259* Fri Sep 26 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.10.beta2
260- 2.0-beta2 released. New upstream sources
261- Whitespace changes to make rpmlint more happy
262
263* Fri Sep 12 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.9.20080912svn3184
264- Added varnisnsca init script (Colin Hill)
265- Corrected varnishlog init script (Colin Hill)
266
267* Tue Sep 09 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.8.beta1
268- Added a patch from r3171 that fixes an endian bug on ppc and ppc64
269- Added a hack that changes the varnishtest ports for 64bits builds,
270  so they can run in parallell with 32bits build on same build host
271
272* Tue Sep 02 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.7.beta1
273- Added a patch from r3156 and r3157, hiding a legit errno in make check
274
275* Tue Sep 02 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.6.beta1
276- Added a commented option for max coresize in the sysconfig script
277- Added a comment in README.redhat about upgrading from 1.x to 2.0
278
279* Fri Aug 29 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.5.beta1
280- Bumped version numbers and source url for first beta release \o/
281- Added a missing directory to the libs-devel package (Michael Schwendt)
282- Added the LICENSE file to the libs-devel package
283- Moved make check to its proper place
284- Removed superfluous definition of lockfile in initscripts
285
286* Wed Aug 27 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.4.20080827svn3136
287- Fixed up init script for varnishlog too
288
289* Mon Aug 25 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.3.20080825svn3125
290- Fixing up init script according to newer Fedora standards
291- The build now runs the test suite after compiling
292- Requires initscripts
293- Change default.vcl from nothing but comments to point to localhost:80,
294
295* Mon Aug 18 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.2.tp2
296- Changed source, version and release to match 2.0-tp2
297
298* Thu Aug 14 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-0.1.20080814svn
299- default.vcl has moved
300- Added groff to build requirements
301
302* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1.2-6
303- Autorebuild for GCC 4.3
304
305* Sat Dec 29 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.2-5
306- Added missing configuration examples
307- Corrected the license to "BSD"
308
309* Fri Dec 28 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.2-4
310- Build for fedora update
311
312* Fri Dec 28 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.2-2
313- Added missing changelog items
314
315* Thu Dec 20 2007 Stig Sandbeck Mathisen <ssm@linpro.no> - 1.1.2-1
316- Bumped the version number to 1.1.2.
317- Addeed build dependency on libxslt
318
319* Wed Sep 08 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.1-3
320- Added a patch, changeset 1913 from svn trunk. This makes varnish
321  more stable under specific loads.
322
323* Tue Sep 06 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.1-2
324- Removed autogen call (only diff from relase tarball)
325
326* Mon Aug 20 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.1-1
327- Bumped the version number to 1.1.1.
328
329* Tue Aug 14 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.1.svn
330- Update for 1.1 branch
331- Added the devel package for the header files and static library files
332- Added a varnish user, and fixed the init script accordingly
333
334* Thu Jul 05 2007 Dag-Erling SmÞrgrav <des@des.no> - 1.1-1
335- Bump Version and Release for 1.1
336
337* Mon May 28 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.4-3
338- Fixed initrc-script bug only visible on el4 (fixes #107)
339
340* Sun May 20 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.4-2
341- Repack from unchanged 1.0.4 tarball
342- Final review request and CVS request for Fedora Extras
343- Repack with extra obsoletes for upgrading from older sf.net package
344
345* Fri May 18 2007 Dag-Erling SmÞrgrav <des@des.no> - 1.0.4-1
346- Bump Version and Release for 1.0.4
347
348* Wed May 16 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.svn-20070517
349- Wrapping up for 1.0.4
350- Changes in sysconfig and init scripts. Syncing with files in
351  trunk/debian
352
353* Fri May 11 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.svn-20070511
354- Threw latest changes into svn trunk
355- Removed the conversion of manpages into utf8. They are all utf8 in trunk
356
357* Wed May 09 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-7
358- Simplified the references to the subpackage names
359- Added init and logrotate scripts for varnishlog
360
361* Mon Apr 23 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-6
362- Removed unnecessary macro lib_name
363- Fixed inconsistently use of brackets in macros
364- Added a condrestart to the initscript
365- All manfiles included, not just the compressed ones
366- Removed explicit requirement for ncurses. rpmbuild figures out the
367  correct deps by itself.
368- Added ulimit value to initskript and sysconfig file
369- Many thanks to Matthias Saou for valuable input
370
371* Mon Apr 16 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-5
372- Added the dist tag
373- Exchanged  RPM_BUILD_ROOT variable for buildroot macro
374- Removed stripping of binaries to create a meaningful debug package
375- Removed BuildRoot and URL from subpackages, they are picked from the
376  main package
377- Removed duplication of documentation files in the subpackages
378- 'chkconfig --list' removed from post script
379- Package now includes _sysconfdir/varnish/
380- Trimmed package information
381- Removed static libs and .so-symlinks. They can be added to a -devel package
382  later if anybody misses them
383
384* Wed Feb 28 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-4
385- More small specfile fixes for Fedora Extras Package
386  Review Request, see bugzilla ticket 230275
387- Removed rpath (only visible on x86_64 and probably ppc64)
388
389* Tue Feb 27 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-3
390- Made post-1.0.3 changes into a patch to the upstream tarball
391- First Fedora Extras Package Review Request
392
393* Fri Feb 23 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-2
394- A few other small changes to make rpmlint happy
395
396* Thu Feb 22 2007 Ingvar Hagelund <ingvar@linpro.no> - 1.0.3-1
397- New release 1.0.3. See the general ChangeLog
398- Splitted the package into varnish, libvarnish1 and
399  libvarnish1-devel
400
401* Thu Oct 19 2006 Ingvar Hagelund <ingvar@linpro.no> - 1.0.2-7
402- Added a Vendor tag
403
404* Thu Oct 19 2006 Ingvar Hagelund <ingvar@linpro.no> - 1.0.2-6
405- Added redhat subdir to svn
406- Removed default vcl config file. Used the new upstream variant instead.
407- Based build on svn. Running autogen.sh as start of build. Also added
408  libtool, autoconf and automake to BuildRequires.
409- Removed rule to move varnishd to sbin. This is now fixed in upstream
410- Changed the sysconfig script to include a lot more nice features.
411  Most of these were ripped from the Debian package. Updated initscript
412  to reflect this.
413
414* Tue Oct 10 2006 Ingvar Hagelund <ingvar@linpro.no> - 1.0.1-3
415- Moved Red Hat specific files to its own subdirectory
416
417* Tue Sep 26 2006 Ingvar Hagelund <ingvar@linpro.no> - 1.0.1-2
418- Added gcc requirement.
419- Changed to an even simpler example vcl in to /etc/varnish (thanks, perbu)
420- Added a sysconfig entry
421
422* Fri Sep 22 2006 Ingvar Hagelund <ingvar@linpro.no> - 1.0.1-1
423- Initial build.
Note: See TracBrowser for help on using the browser.