forked from pool/varnish
varnish-4.0.3
OBS-URL: https://build.opensuse.org/package/show/server:http/varnish?expand=0&rev=67
This commit is contained in:
53
varnish.spec
53
varnish.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package varnish
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,37 +15,42 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: varnish
|
||||
%define library_name libvarnishapi1
|
||||
Version: 3.0.5
|
||||
Version: 4.0.3
|
||||
Release: 0
|
||||
Summary: Varnish is a high-performance HTTP accelerator
|
||||
License: BSD-2-Clause
|
||||
Group: Productivity/Networking/Web/Proxy
|
||||
URL: http://varnish-cache.org/
|
||||
Url: http://varnish-cache.org/
|
||||
|
||||
#Git-Clone: git://git.varnish-cache.org/varnish-cache
|
||||
#Git-Web: https://varnish-cache.org/trac/browser
|
||||
#DL-URL: http://downloads.sf.net/varnish/%name-%version.tar.bz2
|
||||
Source: %name-%version.tar.gz
|
||||
Source2: varnish.init
|
||||
Source3: varnish.sysconfig
|
||||
Source4: vcl.conf
|
||||
Source5: varnish.logrotate
|
||||
Source6: varnishlog.init
|
||||
Source7: varnish.service
|
||||
Source8: varnishlog.service
|
||||
Source: https://repo.varnish-cache.org/source/%name-%version.tar.gz
|
||||
Source2: varnish.init
|
||||
Source3: varnish.sysconfig
|
||||
Source4: vcl.conf
|
||||
Source5: varnish.logrotate
|
||||
Source6: varnishlog.init
|
||||
Source7: varnish.service
|
||||
Source8: varnishlog.service
|
||||
Patch1: 0001-Fail-fetch-on-malformed-Content-Length-header.patch
|
||||
|
||||
BuildRoot: %_tmppath/%name-%version-build
|
||||
BuildRequires: libxslt, ncurses-devel, pcre-devel, readline-devel
|
||||
BuildRequires: pkgconfig, xz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: python-docutils
|
||||
BuildRequires: xz
|
||||
Prereq(post): %_sbindir/useradd %_sbindir/groupadd
|
||||
%if 0%{?suse_version} >= 1010
|
||||
Recommends: logrotate
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%endif
|
||||
%define pkg_home %_localstatedir/lib/%name
|
||||
%define pkg_logdir %_localstatedir/log/%name
|
||||
@@ -63,8 +68,8 @@ server. The purpose of this is to minimize the requests going to the backend
|
||||
server(s) by serving the same document to potentially many users.
|
||||
|
||||
%package -n %library_name
|
||||
Group: Productivity/Networking/Web/Proxy
|
||||
Summary: Shared libraries for Varnish
|
||||
Group: Productivity/Networking/Web/Proxy
|
||||
|
||||
%description -n %library_name
|
||||
Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse
|
||||
@@ -79,9 +84,9 @@ server(s) by serving the same document to potentially many users.
|
||||
This package holds the shared libraries for varnish.
|
||||
|
||||
%package devel
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %name = %version
|
||||
Summary: Development files for Varnish
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
%description devel
|
||||
Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse
|
||||
@@ -97,10 +102,11 @@ This package holds the development files for varnish.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -P 1 -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="%optflags -fstack-protector"
|
||||
%configure --disable-static \
|
||||
%configure --disable-static --docdir="%_docdir/%name" \
|
||||
--localstatedir=%_localstatedir/cache/ \
|
||||
--enable-developer-warnings
|
||||
make %{?_smp_mflags}
|
||||
@@ -133,6 +139,8 @@ install -Dpm 0644 %{S:4} "$b/%_sysconfdir/%name/vcl.conf.example";
|
||||
|
||||
find "$b" -type f -name "*.la" -delete
|
||||
mkdir -p "$b/%pkg_logdir"
|
||||
mkdir -p "$b/%_docdir/%name"
|
||||
cp -a ChangeLog LICENSE README "$b/%_docdir/%name/"
|
||||
|
||||
%pre
|
||||
%_bindir/getent group varnish >/dev/null || \
|
||||
@@ -185,12 +193,12 @@ mkdir -p "$b/%pkg_logdir"
|
||||
%dir %attr(0750,root,varnish) %_sysconfdir/%name/
|
||||
%config(noreplace) %attr(0640,root,varnish) %_sysconfdir/%name/vcl.conf
|
||||
%config %attr(0640,root,varnish) %_sysconfdir/%name/vcl.conf.example
|
||||
%config(noreplace) %attr(0640,root,varnish) %_sysconfdir/%name/default.vcl
|
||||
%_libdir/varnish
|
||||
%_sbindir/varnish*
|
||||
%_sbindir/rcvarnish*
|
||||
%_mandir/man*/*
|
||||
%doc ChangeLog LICENSE README
|
||||
%_docdir/%name/
|
||||
%_datadir/%name/
|
||||
%dir %attr(0750,varnish,varnish) %pkg_home
|
||||
%dir %attr(0750,varnish,varnish) %pkg_cachedir
|
||||
%dir %attr(0750,varnish,varnish) %pkg_logdir
|
||||
@@ -209,6 +217,7 @@ mkdir -p "$b/%pkg_logdir"
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%_includedir/varnish
|
||||
%_datadir/aclocal/
|
||||
%_libdir/pkgconfig/*
|
||||
%_libdir/libvarnishapi.so
|
||||
|
||||
|
Reference in New Issue
Block a user