]> git.pld-linux.org Git - packages/varnish.git/blob - varnish.spec
- release 3
[packages/varnish.git] / varnish.spec
1 Summary:        Varnish - a high-performance HTTP accelerator
2 Summary(pl.UTF-8):      Varnish - wydajny akcelerator HTTP
3 Name:           varnish
4 Version:        2.0.6
5 Release:        3
6 License:        BSD
7 Group:          Networking/Daemons/HTTP
8 Source0:        http://dl.sourceforge.net/varnish/%{name}-%{version}.tar.gz
9 # Source0-md5:  d91dc21c636db61c69b5e8f061c5bb95
10 Source1:        %{name}.init
11 Source2:        %{name}log.init
12 Source3:        %{name}ncsa.init
13 Source4:        %{name}.sysconfig
14 Source5:        %{name}ncsa.sysconfig
15 Source6:        %{name}.logrotate
16 Source7:        %{name}.conf
17 #Patch100:      branch.diff
18 Patch0:         %{name}-build.patch
19 URL:            http://www.varnish-cache.org/
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 BuildRequires:  groff
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  libtool >= 2:1.5
25 BuildRequires:  ncurses-devel
26 Requires(postun):       /usr/sbin/groupdel
27 Requires(postun):       /usr/sbin/userdel
28 Requires(pre):  /bin/id
29 Requires(pre):  /usr/bin/getgid
30 Requires(pre):  /usr/sbin/groupadd
31 Requires(pre):  /usr/sbin/useradd
32 Requires:       %{name}-libs = %{version}-%{release}
33 Requires:       gcc
34 Requires:       glibc-devel
35 Requires:       rc-scripts >= 0.4.1.26
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _localstatedir  /var/run
39
40 %description
41 The goal of the Varnish project is to develop a state-of-the-art,
42 high-performance HTTP accelerator.
43
44 Varnish is targeted primarily at the FreeBSD 6 and Linux 2.6
45 platforms, and will take full advantage of the advanced I/O features
46 offered by these operating systems.
47
48 %description -l pl.UTF-8
49 Celem projektu Varnish jest stworzenie wydajnego akceleratora HTTP.
50
51 Varnish jest tworzony głównie z myślą o platformach FreeBSD 6 i Linux
52 2.6 i będzie wykorzystywał w pełni zaawansowane możliwości we/we
53 oferowane przez te systemy operacyjne.
54
55 %package libs
56 Summary:        Libraries for Varnish
57 Group:          Libraries
58 Conflicts:      varnish < 2.0.4-2
59
60 %description libs
61 Libraies for Varnish.
62
63 %package devel
64 Summary:        Header files for varnish library
65 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki varnish
66 Group:          Development/Libraries
67 Requires:       %{name}-libs = %{version}-%{release}
68
69 %description devel
70 Header files for varnish library.
71
72 %description devel -l pl.UTF-8
73 Pliki nagłówkowe biblioteki varnish.
74
75 %package static
76 Summary:        Static varnish library
77 Summary(pl.UTF-8):      Statyczna biblioteka varnish
78 Group:          Development/Libraries
79 Requires:       %{name}-devel = %{version}-%{release}
80
81 %description static
82 Static varnish library.
83
84 %description static -l pl.UTF-8
85 Statyczna biblioteka varnish.
86
87 %prep
88 %setup -q
89 #%patch100 -p0
90 %patch0 -p1
91
92 %build
93 export CPPFLAGS="-I/usr/include/ncurses"
94 %{__aclocal}
95 %{__libtoolize}
96 %{__autoheader}
97 %{__automake}
98 %{__autoconf}
99 %configure \
100 %ifarch hppa s390 sparc ppc
101         --disable-jemalloc
102 %endif
103
104 %{__make}
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108
109 %{__make} install \
110         DESTDIR=$RPM_BUILD_ROOT
111
112 # make dirs after make install to know which ones needs spec and which ones make install
113 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{logrotate.d,rc.d/init.d,sysconfig},/var/{run,lib}/varnish} \
114         $RPM_BUILD_ROOT/var/log/{archive/,}varnish
115
116 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnish
117 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishlog
118 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishncsa
119 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/varnish
120 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/varnishncsa
121 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/varnish
122 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/default.vcl
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %post
128 /sbin/chkconfig --add varnish
129 /sbin/chkconfig --add varnishlog
130 /sbin/chkconfig --add varnishncsa
131 %service varnish restart
132 %service varnishlog restart
133 %service varnishncsa restart
134
135 %pre
136 %groupadd -g 241 %{name}
137 %useradd -u 241 -d /var/lib/%{name} -g %{name} -c "Varnishd User" %{name}
138
139 %postun
140 if [ "$1" = "0" ]; then
141         %userremove %{name}
142         %groupremove %{name}
143 fi
144
145
146 %preun
147 if [ "$1" = "0" ]; then
148         %service -q varnish stop
149         %service -q varnishlog stop
150         %service -q varnishncsa stop
151         /sbin/chkconfig --del varnish
152         /sbin/chkconfig --del varnishlog
153         /sbin/chkconfig --del varnishncsa
154 fi
155
156 %post   libs -p /sbin/ldconfig
157 %postun libs -p /sbin/ldconfig
158
159 %files
160 %defattr(644,root,root,755)
161 %doc LICENSE README ChangeLog etc/*.vcl
162 %dir %{_sysconfdir}/%{name}
163 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.vcl
164 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/varnish
165 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/varnishncsa
166 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/varnish
167 %attr(754,root,root) /etc/rc.d/init.d/varnish
168 %attr(754,root,root) /etc/rc.d/init.d/varnishlog
169 %attr(754,root,root) /etc/rc.d/init.d/varnishncsa
170 %attr(755,root,root) %{_sbindir}/varnishd
171 %attr(755,root,root) %{_bindir}/varnish*
172 %{_mandir}/man1/*
173 %{_mandir}/man7/*
174 /var/lib/varnish
175 /var/run/varnish
176
177 %dir %attr(751,root,root) /var/log/varnish
178 %dir %attr(750,root,root) /var/log/archive/varnish
179
180 %files libs
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_libdir}/libvarnish*.so.*.*.*
183 %attr(755,root,root) %ghost %{_libdir}/libvarnish*.so.1
184 %attr(755,root,root) %{_libdir}/libvcl.so.*.*.*
185 %attr(755,root,root) %ghost %{_libdir}/libvcl.so.1
186
187 %files devel
188 %defattr(644,root,root,755)
189 %{_includedir}/varnish
190 %attr(755,root,root) %{_libdir}/*.so
191 %{_libdir}/*.la
192 %{_pkgconfigdir}/*.pc
193
194 %files static
195 %defattr(644,root,root,755)
196 %{_libdir}/*.a
This page took 0.075686 seconds and 3 git commands to generate.