New package: varnish-3.0.3.

This commit is contained in:
Juan RP 2012-12-11 15:43:20 +01:00
parent 9983b002ca
commit 1e734d5ac1
8 changed files with 88 additions and 0 deletions

View File

@ -1134,3 +1134,4 @@ libgtkspell.so.0 gtkspell-2.0.16_1
libpurple.so.0 libpurple-2.10.6_1
libpurple-client.so.0 libpurple-2.10.6_1
libgnt.so.0 libgnt-2.10.6_1
libvarnishapi.so.1 libvarnishapi-3.0.3_1

1
srcpkgs/libvarnishapi Symbolic link
View File

@ -0,0 +1 @@
varnish

1
srcpkgs/libvarnishapi-devel Symbolic link
View File

@ -0,0 +1 @@
varnish

View File

@ -0,0 +1,20 @@
#!/bin/sh
cfg=${1:-/etc/varnish/default.vcl}
if [ ! -e "$cfg" ]; then
printf 'ERROR: VCL file %s does not exist\n' "$cfg" >&2
exit 1
fi
activecfg=$(varnishadm 'vcl.list' | awk '/active/ { print $3 }')
if [ -z "$activecfg" ]; then
printf 'ERROR: No active VCL found!\n' >&2
exit 1
fi
newcfg=$(date +'vcl-%s')
printf 'INFO: using new config %s\n' "$cfg"
varnishadm "vcl.load $newcfg $cfg" &&
varnishadm "vcl.use $newcfg" &&
varnishadm "vcl.discard $activecfg"

View File

@ -0,0 +1,10 @@
[Unit]
Description=Web Application Accelerator
After=network.target
[Service]
ExecStart=/usr/sbin/varnishd -a 0.0.0.0:80 -f /etc/varnish/default.vcl -T localhost:6082 -s malloc,64M -u nobody -g nobody -F
ExecReload=/usr/bin/varnish-vcl-reload
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,14 @@
# Template file for 'libvarnishapi-devel'.
#
noarch=yes
depends="libvarnishapi>=${version}"
short_desc="${short_desc} -- API development files"
long_desc="${long_desc}
This package contains files for development, headers, static libs, etc."
do_install() {
vmove usr/include usr
vmove usr/lib/pkgconfig usr/lib
vmove usr/share/man/man3 usr/share/man
}

View File

@ -0,0 +1,10 @@
# Template file for 'libvarnishapi'.
#
short_desc="${short_desc} -- API runtime library"
long_desc="${long_desc}
This package contains the runtime API library for varnish."
do_install() {
vmove "usr/lib/*.so*" usr/lib
}

31
srcpkgs/varnish/template Normal file
View File

@ -0,0 +1,31 @@
# Template file for 'varnish'
pkgname=varnish
version=3.0.3
revision=1
build_style=gnu-configure
configure_args="--disable-static"
makedepends="pkg-config pcre-devel readline-devel"
short_desc="A fast caching HTTP reverse proxy"
maintainer="Juan RP <xtraeme@gmail.com>"
license="Simplified BSD"
homepage="https://www.varnish-cache.org/"
distfiles="http://repo.varnish-cache.org/source/${pkgname}-${version}.tar.gz"
checksum=2d37d18d952f58b208ac3a0706d4d3e4c0de304b1fcc9df5019571c75f148ab2
long_desc="
Varnish Cache is a web application accelerator also known as a caching HTTP
reverse proxy. You install it in front of any server that speaks HTTP and
configure it to cache the contents. Varnish Cache is really, really fast.
It typically speeds up delivery with a factor of 300 - 1000x, depending on
your architecture. A high level overview of what Varnish does can be seen
in the video attached to this web page."
subpackages="libvarnishapi libvarnishapi-devel"
conf_files="/etc/varnish/default.vcl"
systemd_services="varnish.service on"
post_install() {
# systemd reload helper
vinstall ${FILESDIR}/varnish-vcl-reload 755 usr/sbin
# systemd service
vinstall ${FILESDIR}/varnish.service 644 usr/lib/systemd/system
}