inherit eutils

DESCRIPTION="AICCU, a cient to configure an IPv6 tunnel to SixXS and other Tunnel Brokers" 
HOMEPAGE="http://www.sixxs.net/"
SRC_URI="http://www.sixxs.net/archive/sixxs/aiccu/unix/aiccu_current.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="x86 amd64 ppc arm hppa"
IUSE=""
DEPEND="net-libs/gnutls sys-apps/iproute2"
S=${WORKDIR}/aiccu

src_compile() {
	cd ${S}
	export RPM_OPT_FLAGS=${CFLAGS}
	make || die "Build Failed"
}

src_install() {
	dosbin unix-console/aiccu
	insopts -m 600
	insinto /etc
	doins aiccu.conf
	dodoc doc/{HOWTO,LICENSE,README,changelog}
	exeinto /etc/init.d
	newexe doc/aiccu.init.gentoo aiccu
}

pkg_postinst() {
	einfo "The aiccu ebuild installs an init script named 'aiccu'"
	einfo "To add support for a SixXS connection at startup, do"
	einfo "edit your /etc/aiccu.conf and do"
	einfo "# rc-update add aiccu default"
}

