summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2013-12-20 01:06:48 +0000
committerAnthony G. Basile <blueness@gentoo.org>2013-12-20 01:06:48 +0000
commit6bfd014fbe96191de3abfd335c2a75037872b5a4 (patch)
tree84ac74845c74e8fec386332fbf61c083893e8a09 /www-servers
parentFix gpg signing of manifest, again! (diff)
downloadgentoo-2-6bfd014fbe96191de3abfd335c2a75037872b5a4.tar.gz
gentoo-2-6bfd014fbe96191de3abfd335c2a75037872b5a4.tar.bz2
gentoo-2-6bfd014fbe96191de3abfd335c2a75037872b5a4.zip
Add systemd unit file, bug #494708. Thanks Roc Vallès!
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/varnish/ChangeLog8
-rw-r--r--www-servers/varnish/files/varnishd.service13
-rw-r--r--www-servers/varnish/varnish-3.0.5-r1.ebuild85
3 files changed, 105 insertions, 1 deletions
diff --git a/www-servers/varnish/ChangeLog b/www-servers/varnish/ChangeLog
index ab38e973f4c2..6b09738ec2e1 100644
--- a/www-servers/varnish/ChangeLog
+++ b/www-servers/varnish/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for www-servers/varnish
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/ChangeLog,v 1.67 2013/12/06 21:15:29 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/ChangeLog,v 1.68 2013/12/20 01:06:47 blueness Exp $
+
+*varnish-3.0.5-r1 (20 Dec 2013)
+
+ 20 Dec 2013; Anthony G. Basile <blueness@gentoo.org> +files/varnishd.service,
+ +varnish-3.0.5-r1.ebuild:
+ Add systemd unit file, bug #494708. Thanks Roc Vallès!
06 Dec 2013; Anthony G. Basile <blueness@gentoo.org>
-files/varnish-3.0.2-automagic.patch, -files/varnish-3.0.3-automagic.patch,
diff --git a/www-servers/varnish/files/varnishd.service b/www-servers/varnish/files/varnishd.service
new file mode 100644
index 000000000000..169206e0714b
--- /dev/null
+++ b/www-servers/varnish/files/varnishd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Varnish is a high-performance HTTP accelerator
+After=network.target
+
+[Service]
+Type=forking
+LimitNOFILE=32786
+LimitMEMLOCK=82000
+PIDFile=/var/run/varnishd.pid
+ExecStart=/usr/sbin/varnishd -a 0.0.0.0:80 -f /etc/varnish/default.vcl -P /var/run/varnishd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-servers/varnish/varnish-3.0.5-r1.ebuild b/www-servers/varnish/varnish-3.0.5-r1.ebuild
new file mode 100644
index 000000000000..3922e0dd60a5
--- /dev/null
+++ b/www-servers/varnish/varnish-3.0.5-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/varnish-3.0.5-r1.ebuild,v 1.1 2013/12/20 01:06:47 blueness Exp $
+
+EAPI="5"
+
+inherit autotools-utils eutils systemd
+
+DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator"
+HOMEPAGE="http://www.varnish-cache.org/"
+SRC_URI="http://repo.varnish-cache.org/source/${P}.tar.gz"
+
+LICENSE="BSD-2 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86"
+IUSE="doc jemalloc jit static-libs +tools"
+
+CDEPEND="
+ || ( dev-libs/libedit sys-libs/readline )
+ dev-libs/libpcre[jit?]
+ jemalloc? ( dev-libs/jemalloc )
+ tools? ( sys-libs/ncurses )"
+
+#varnish compiles stuff at run time
+RDEPEND="
+ ${CDEPEND}
+ sys-devel/gcc"
+
+DEPEND="
+ ${CDEPEND}
+ virtual/pkgconfig"
+
+RESTRICT="test" #315725
+
+DOCS=( README doc/changes.rst )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.4-fix-automake-1.13.patch
+ "${FILESDIR}"/${PN}-3.0.4-automagic.patch
+ "${FILESDIR}"/${PN}-3.0.3-pthread-uclibc.patch
+)
+
+AUTOTOOLS_AUTORECONF="yes"
+
+src_prepare() {
+ # Remove bundled libjemalloc. We also fix
+ # automagic dep in our patches, bug #461638
+ rm -rf lib/libjemalloc
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_enable jit pcre-jit )
+ $(use_with jemalloc)
+ $(use_with tools)
+ --without-rst2man
+ --without-rst2html
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ newinitd "${FILESDIR}"/varnishd.initd-r1 varnishd
+ newconfd "${FILESDIR}"/varnishd.confd-r1 varnishd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/varnishd.logrotate" varnishd
+
+ dodir /var/log/varnish
+
+ use doc && dohtml -r "doc/sphinx/=build/html/"
+
+ systemd_dounit "${FILESDIR}/${PN}d.service"
+}
+
+pkg_postinst () {
+ elog "No demo-/sample-configfile is included in the distribution. Please"
+ elog "read the man-page for more info. A sample configuration proxying"
+ elog "localhost:8080 for localhost:80 is given in /etc/conf.d/varnishd."
+}