| 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.3.ebuild,v 1.1 2012/08/23 20:59:46 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=(
|
| 33 |
"${FILESDIR}"/${PN}-3.0.3-automagic.patch
|
| 34 |
"${FILESDIR}"/${PN}-3.0.3-pthread-uclibc.patch
|
| 35 |
)
|
| 36 |
|
| 37 |
src_prepare() {
|
| 38 |
autotools-utils_src_prepare
|
| 39 |
eautoreconf
|
| 40 |
}
|
| 41 |
|
| 42 |
src_configure() {
|
| 43 |
local myeconfargs=(
|
| 44 |
$(use_with libedit)
|
| 45 |
$(use_with tools)
|
| 46 |
)
|
| 47 |
autotools-utils_src_configure
|
| 48 |
}
|
| 49 |
|
| 50 |
src_install() {
|
| 51 |
autotools-utils_src_install
|
| 52 |
|
| 53 |
newinitd "${FILESDIR}"/varnishd.initd varnishd
|
| 54 |
newconfd "${FILESDIR}"/varnishd.confd varnishd
|
| 55 |
|
| 56 |
insinto /etc/logrotate.d
|
| 57 |
newins "${FILESDIR}/varnishd.logrotate" varnishd
|
| 58 |
|
| 59 |
dodir /var/log/varnish
|
| 60 |
|
| 61 |
use doc && dohtml -r "doc/sphinx/=build/html/"
|
| 62 |
}
|
| 63 |
|
| 64 |
pkg_postinst () {
|
| 65 |
elog "No demo-/sample-configfile is included in the distribution -"
|
| 66 |
elog "please read the man-page for more info."
|
| 67 |
elog "A sample (localhost:8080 -> localhost:80) for gentoo is given in"
|
| 68 |
elog " /etc/conf.d/varnishd"
|
| 69 |
}
|