]> git.pld-linux.org Git - packages/varnish.git/blob - varnish.spec
- added initscripts
[packages/varnish.git] / varnish.spec
1 Summary:        Varnish is a high-performance HTTP accelerator
2 Name:           varnish
3 Version:        1.0.2
4 Release:        0.7
5 License:        BSD-like
6 Group:          Daemons
7 URL:            http://www.varnish-cache.org/
8 Source0:        http://downloads.sourceforge.net/varnish/%{name}-%{version}.tar.gz
9 # Source0-md5:  d905f63a6665224c370154eb006ca4cc
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 BuildRequires:  autoconf
13 BuildRequires:  automake
14 BuildRequires:  libstdc++-devel
15 BuildRequires:  libtool
16 BuildRequires:  ncurses-devel
17 Requires(post): /sbin/ldconfig
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _sysconfdir     /etc/%{name}
21
22 %description
23 The goal of the Varnish project is to develop a state-of-the-art,
24 high-performance HTTP accelerator.
25
26 Varnish is targeted primarily at the FreeBSD 6 and Linux 2.6
27 platforms, and will take full advantage of the advanced I/O features
28 offered by these operating systems.
29
30 %package devel
31 Summary:        Header files for varnish library
32 Group:          Development/Libraries
33 Requires:       %{name} = %{version}-%{release}
34
35 %description devel
36 Header files for varnish library.
37
38 %package static
39 Summary:        Static varnish library
40 Group:          Development/Libraries
41 Requires:       %{name}-devel = %{version}-%{release}
42
43 %description static
44 Static varnish library.
45
46 %prep
47 %setup -q
48
49 %build
50 export CPPFLAGS="-I/usr/include/ncurses"
51 ./autogen.sh
52 %configure
53 %{__make}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 %{__make} install \
58         DESTDIR=$RPM_BUILD_ROOT
59
60 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig},/var/lib/varnish}
61 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnish
62 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/varnish
63 install etc/vcl.conf $RPM_BUILD_ROOT%{_sysconfdir}/vcl.conf
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %post
69 /sbin/ldconfig
70 /sbin/chkconfig --add varnish
71 %service %{name} restart
72
73 %postun -p /sbin/ldconfig
74
75 %preun
76 if [ "$1" = "0" ]; then
77         %service -q %{name} stop
78         /sbin/chkconfig --del %{name}
79 fi
80
81 %files
82 %defattr(644,root,root,755)
83 %doc INSTALL LICENSE README ChangeLog
84 %config(noreplace) %{_sysconfdir}/vcl.conf
85 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/varnish
86 %attr(754,root,root) /etc/rc.d/init.d/varnish
87 %attr(755,root,root) %{_sbindir}/varnishd
88 %attr(755,root,root) %{_bindir}/varnishhist
89 %attr(755,root,root) %{_bindir}/varnishlog
90 %attr(755,root,root) %{_bindir}/varnishncsa
91 %attr(755,root,root) %{_bindir}/varnishstat
92 %attr(755,root,root) %{_bindir}/varnishtop
93 %attr(755,root,root) %{_libdir}/libvarnish.so.0.0.0
94 %attr(755,root,root) %{_libdir}/libvarnishapi.so.0.0.0
95 %attr(755,root,root) %{_libdir}/libvcl.so.0.0.0
96 /var/lib/varnish
97 %{_mandir}/man1/varnishd.1*
98 %{_mandir}/man1/varnishhist.1*
99 %{_mandir}/man1/varnishlog.1*
100 %{_mandir}/man1/varnishncsa.1*
101 %{_mandir}/man1/varnishstat.1*
102 %{_mandir}/man1/varnishtop.1*
103 %{_mandir}/man7/vcl.7*
104
105 %files devel
106 %defattr(644,root,root,755)
107 %{_libdir}/libvarnish.la
108 %{_libdir}/libvarnishapi.la
109 %{_libdir}/libvcl.la
110 %attr(755,root,root) %{_libdir}/libvarnish.so
111 %attr(755,root,root) %{_libdir}/libvarnishapi.so
112 %attr(755,root,root) %{_libdir}/libvcl.so
113
114 %files static
115 %defattr(644,root,root,755)
116 %{_libdir}/libvarnish.a
117 %{_libdir}/libvarnishapi.a
118 %{_libdir}/libvcl.a
This page took 0.039911 seconds and 4 git commands to generate.