# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils apache-module

DESCRIPTION="an Apache module which adds Zeroconf support via DNS-SD using Avahi."

HOMEPAGE="http://0pointer.de/lennart/projects/mod_dnssd/"
SRC_URI="http://0pointer.de/lennart/projects/mod_dnssd/${P}.tar.gz"
LICENSE="Apache-2.0"

SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND=">=net-dns/avahi-0.6.4"

DOCFILES="README LICENSE doc/README.html"
APACHE2_MOD_CONF="85_mod_dnssd"
APACHE2_MOD_DEFINE="DNSSD"
DESIRED_FLAGS="-Wall"
LIBS="-lavahi-common -lavahi-client"

APXS2_ARGS="-c -Wc,\"${DESIRED_FLAGS}\" ${LIBS} ${PN}.c"

need_apache2

src_unpack() {
	unpack ${A}
	cd ${S}
}

# Yes, I know in most cases defining src_install isn't needed but
# the stylesheet doesn't get installed properly with DOCFILES
src_install() {
	apache-module_src_install
	dohtml doc/style.css
}

