| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/varnish-3.0.2-r1.ebuild,v 1.5 2012/07/11 23:10:42 blueness Exp $ |
| 4 |
|
| 5 |
EAPI="4" |
| 6 |
|
| 7 |
inherit autotools-utils eutils |
| 8 |
|
| 9 |
DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator" |
| 10 |
HOMEPAGE="http://www.varnish-cache.org/" |
| 11 |
SRC_URI="http://repo.varnish-cache.org/source/${P}.tar.gz" |
| 12 |
|
| 13 |
LICENSE="BSD-2 GPL-2" |
| 14 |
SLOT="0" |
| 15 |
KEYWORDS="amd64 ~mips x86" |
| 16 |
IUSE="doc libedit static-libs +tools" |
| 17 |
|
| 18 |
CDEPEND="dev-libs/libpcre |
| 19 |
libedit? ( dev-libs/libedit ) |
| 20 |
tools? ( sys-libs/ncurses )" |
| 21 |
#varnish compiles stuff at run time |
| 22 |
RDEPEND="${CDEPEND} |
| 23 |
sys-devel/gcc" |
| 24 |
DEPEND="${CDEPEND} |
| 25 |
dev-python/docutils |
| 26 |
virtual/pkgconfig" |
| 27 |
|
| 28 |
RESTRICT="test" #315725 |
| 29 |
|
| 30 |
DOCS=( README doc/changes.rst ) |
| 31 |
|
| 32 |
PATCHES=( "${FILESDIR}"/${P}-automagic.patch ) |
| 33 |
|
| 34 |
src_prepare() { |
| 35 |
autotools-utils_src_prepare |
| 36 |
eautoreconf |
| 37 |
} |
| 38 |
|
| 39 |
src_configure() { |
| 40 |
local myeconfargs=( |
| 41 |
$(use_with libedit) |
| 42 |
$(use_with tools) |
| 43 |
) |
| 44 |
autotools-utils_src_configure |
| 45 |
} |
| 46 |
|
| 47 |
src_install() { |
| 48 |
autotools-utils_src_install |
| 49 |
|
| 50 |
newinitd "${FILESDIR}"/varnishd.initd varnishd |
| 51 |
newconfd "${FILESDIR}"/varnishd.confd varnishd |
| 52 |
|
| 53 |
insinto /etc/logrotate.d |
| 54 |
newins "${FILESDIR}/varnishd.logrotate" varnishd |
| 55 |
|
| 56 |
dodir /var/log/varnish |
| 57 |
|
| 58 |
use doc && dohtml -r "doc/sphinx/=build/html/" |
| 59 |
} |
| 60 |
|
| 61 |
pkg_postinst () { |
| 62 |
elog "No demo-/sample-configfile is included in the distribution -" |
| 63 |
elog "please read the man-page for more info." |
| 64 |
elog "A sample (localhost:8080 -> localhost:80) for gentoo is given in" |
| 65 |
elog " /etc/conf.d/varnishd" |
| 66 |
} |