Search
j0ke.net Open Build Service
>
Projects
>
ha
>
varnish4
> varnish.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File varnish.spec of Package varnish4 (Revision 17)
Currently displaying revision
17
,
show latest
# norootforbuild %define pversion 4.0.4 %define varnish_backend_secret 2017#${RANDOM} Name: varnish Version: 4.0.4 Release: 1 # License: BSD Group: Productivity/Networking/Web/Proxy # BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-docutils ncurses-devel libxslt pcre-devel BuildRequires: gcc gcc-c++ bison flex autoconf automake libtool BuildRequires: readline-devel %if 0%{?suse_version} BuildRequires: pkg-config %endif %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} BuildRequires: pkgconfig %endif Requires: gcc Requires: libvarnishapi1 = %{version} %define _bindir %{_sbindir} %define pkg_home %{_var}/lib/%{name} %define pkg_logdir %{_var}/log/%{name} %define pkg_cachedir %{_var}/cache/%{name} %define pkg_name %{name} # URL: http://www.varnish-cache.org/ Source0: http://downloads.sourceforge.net/varnish/varnish-%{pversion}.tar.bz2 Source1: redhat-init.tar.bz2 Source2: varnish.init Source3: varnish.service Source4: varnishlog.service Summary: Varnish is a high-performance HTTP accelerator %description Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse Proxy) is an application that stores (caches) documents that have been requested over the HTTP protocol. Based on certain criteria the next client requesting the document is either given the cached document, or a "fresh" document requested from a backend 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. Authors: -------- Poul-Henning Kamp <phk@phk.freebsd.dk> %package -n libvarnishapi1 Group: Productivity/Networking/Web/Proxy Conflicts: libvarnish0 Conflicts: libvarnish1 # Summary: Shared libraries for Varnish %description -n libvarnishapi1 Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse Proxy) is an application that stores (caches) documents that have been requested over the HTTP protocol. Based on certain criteria the next client requesting the document is either given the cached document, or a "fresh" document requested from a backend 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. This package holds the shared libraries for varnish. Authors: -------- Poul-Henning Kamp <phk@phk.freebsd.dk> %package devel Group: Development/Libraries/C and C++ Summary: Development files for Varnish Requires: %{name} = %{version} Requires: pcre-devel %description devel Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse Proxy) is an application that stores (caches) documents that have been requested over the HTTP protocol. Based on certain criteria the next client requesting the document is either given the cached document, or a "fresh" document requested from a backend 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. This package holds the development files for varnish. Authors: -------- Poul-Henning Kamp <phk@phk.freebsd.dk> %prep %setup -n %{name}-%{pversion} -a 1 # fix for suse fillup cat >> redhat/varnish.sysconfig << EOF VARNISHD_PARAMS="\${DAEMON_OPTS}" ## Path: Network/WWW/Varnishd ## Description: Start parameters for varnishlog ## Type: string ## Default: "-a -w /var/log/varnish.log" ## Config: varnishd # # start parameters for varnishlog/varnishncsa # # see man 1 varnishlog for more # VARNISHLOG_PARAMS="-a -w /var/log/varnish/varnish.log" EOF touch AUTHORS COPYING NEWS %build ##autoreconf -fi #%if 0%{?suse_version} > 1000 #export CFLAGS="%{optflags} -fstack-protector" export CFLAGS="$CFLAGS -O2 -g -Wp,-D_FORTIFY_SOURCE=0" #%endif ./configure --prefix=%{_prefix} --libdir=%{_libdir} \ --bindir=%{_bindir} --sbindir=%{_sbindir} \ --mandir=%{_mandir} --datadir=%{_datadir} \ --disable-static --localstatedir=%{_var}/cache/ \ --libexecdir=%{_libexecdir} \ --enable-debugging-symbols \ --enable-developer-warnings %{__make} %install %__make DESTDIR=%{buildroot} install find %{buildroot} -ls # # remove unneeded files # libvarnish.la has -lrt as dependency lib #%{__rm} -fv %{buildroot}%{_libdir}/*.la # # missing directories %{__install} -d -m 0755 %{buildroot}{%{pkg_logdir},%{pkg_home}} %{__install} -D -m 0644 redhat/varnish.logrotate %{buildroot}/etc/logrotate.d/varnish %if 0%{?suse_version} # # init scripts %{__install} -D -m 0644 redhat/varnish.sysconfig %{buildroot}/var/adm/fillup-templates/sysconfig.%{name} %{__install} -D -m 0755 %{S:2} %{buildroot}%{_sysconfdir}/init.d/%{name} %{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} # reload vcl script %{__install} -D -m 0755 redhat/varnish_reload_vcl %{buildroot}%{_sbindir}/varnish_reload_vcl # # config files %{__install} -D -m 0644 etc/example.vcl %{buildroot}%{_sysconfdir}/%{name}/default.vcl %{__install} -D -m 0644 etc/example.vcl %{buildroot}%{_sysconfdir}/%{name}/default.vcl.example echo %{varnish_backend_secret} > %{buildroot}%{_sysconfdir}/%{name}/secret %else # # init scripts %{__install} -D -m 0644 redhat/varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name} %{__install} -D -m 0755 redhat/varnish.initrc %{buildroot}%{_sysconfdir}/init.d/%{name} # reload vcl script %{__install} -D -m 0755 redhat/varnish_reload_vcl %{buildroot}%{_sbindir}/varnish_reload_vcl # # config files %{__install} -D -m 0644 etc/example.vcl %{buildroot}%{_sysconfdir}/%{name}/default.vcl %{__install} -D -m 0644 etc/example.vcl %{buildroot}%{_sysconfdir}/%{name}/default.vcl.example echo %{varnish_backend_secret} > %{buildroot}%{_sysconfdir}/%{name}/secret # directorys %{__install} -m 0755 -d %{buildroot}%{pkg_cachedir} %endif %{__install} -m 0755 -d %{buildroot}%{_var}/run/%{name} %{__install} -m 0755 -d %{buildroot}/var/log/varnish %if 0%{?suse_version} >= 1210 || 0%{?rhel} >= 7 # systemd %{__install} -m 0644 -D %{S:3} %{buildroot}/usr/lib/systemd/system/varnish.service %{__install} -m 0644 -D %{S:4} %{buildroot}/usr/lib/systemd/system/varnishlog.service %endif rm -rf %{buildroot}/usr/share/doc/varnish %clean %{__rm} -rf %{buildroot} %pre /usr/sbin/groupadd -r %{pkg_name} &>/dev/null ||: /usr/sbin/useradd -g %{pkg_name} -s /bin/false -r -c "user for %{pkg_name}" -d %{pkg_home} %{pkg_name} &>/dev/null ||: %if 0%{?suse_version} %post %fillup_and_insserv %{pkg_name} %preun %stop_on_removal %{pkg_name} %postun %restart_on_update %{pkg_name} %{insserv_cleanup} %else # how to do the same for RH/mandriva? %endif %post -n libvarnishapi1 -p /sbin/ldconfig %postun -n libvarnishapi1 -p /sbin/ldconfig %files %defattr(-,root,root,-) %if 0%{?suse_version} %{_sbindir}/rc%{name} /var/adm/fillup-templates/sysconfig.%{name} %else %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %endif %config(noreplace) %{_sysconfdir}/init.d/%{name} # %dir %attr(750,%{pkg_name},%{pkg_name}) %{_sysconfdir}/%{name}/ %config(noreplace) %attr(640,%{pkg_name},%{pkg_name}) %{_sysconfdir}/%{name}/secret %config(noreplace) %attr(640,%{pkg_name},%{pkg_name}) %{_sysconfdir}/%{name}/default.vcl %config %attr(640,%{pkg_name},%{pkg_name}) %{_sysconfdir}/%{name}/default.vcl.example %dir %attr(750,%{pkg_name},%{pkg_name}) %{_var}/run/%{name}/ # %{_sbindir}/varnishd %{_sbindir}/varnishhist %{_sbindir}/varnishlog %{_sbindir}/varnishncsa %{_sbindir}/varnishstat %{_sbindir}/varnishtop %{_sbindir}/varnishadm %{_sbindir}/varnishtest %{_sbindir}/varnish_reload_vcl %{_mandir}/man1/varnishadm.1* %{_mandir}/man1/varnishd.1* %{_mandir}/man1/varnishhist.1* %{_mandir}/man1/varnishlog.1* %{_mandir}/man1/varnishncsa.1* %{_mandir}/man1/varnishstat.1* %{_mandir}/man1/varnishtop.1* %{_mandir}/man1/varnishtest.1* %{_mandir}/man7/vcl.7* %{_mandir}/man3/vmod_std.3* %{_mandir}/man3/vmod_directors.3* %{_mandir}/man7/varnish-cli.7* %{_mandir}/man7/varnish-counters.7* %{_mandir}/man7/vsl.7* %{_mandir}/man7/vsl-query.7* %doc ChangeLog LICENSE README etc/example.vcl etc/builtin.vcl %dir %attr(750,%{pkg_name},%{pkg_name}) %{pkg_home} %dir %attr(750,%{pkg_name},%{pkg_name}) %{pkg_cachedir} %config /etc/logrotate.d/varnish %dir /var/log/varnish %dir %{_libdir}/varnish %{_libdir}/varnish/libvarnish.so %{_libdir}/varnish/libvarnishcompat.so %{_libdir}/varnish/libvcc.so %{_libdir}/varnish/libvgz.so %dir %{_libdir}/varnish/vmods %{_libdir}/varnish/vmods/libvmod_std.so %{_libdir}/varnish/vmods/libvmod_directors.so %if 0%{?suse_version} >= 1210 || 0%{?rhel} >= 7 /usr/lib/systemd/system/varnish.service /usr/lib/systemd/system/varnishlog.service %endif %files -n libvarnishapi1 %defattr(-,root,root,-) %{_libdir}/libvarnishapi.so.1 %{_libdir}/libvarnishapi.so.1.0.0 %files devel %defattr(-,root,root,-) %{_includedir}/varnish/ %{_libdir}/pkgconfig/varnishapi.pc %{_libdir}/varnish/libvarnish.la %{_libdir}/libvarnishapi.la %{_libdir}/libvarnishapi.so %{_libdir}/varnish/libvcc.la %{_libdir}/varnish/libvarnishcompat.la %{_libdir}/varnish/libvgz.la %{_libdir}/varnish/vmods/libvmod_std.la %{_libdir}/varnish/vmods/libvmod_directors.la %{_datadir}/aclocal/varnish.m4 %dir %{_datadir}/varnish %{_datadir}/varnish/vmodtool.py* #%dir %{_includedir}/varnish/include #%{_includedir}/varnish/include/*.h #%dir %{_includedir}/varnish/include/cache #%dir %{_includedir}/varnish/include/common #%{_includedir}/varnish/include/*/*.h %changelog