# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Powerful SMS and WAP gateway" HOMEPAGE="http://www.kannel.org/" SRC_URI="http://www.kannel.org/download/${PV}/gateway-${PV}.tar.bz2" LICENSE="BSD" SLOT="0" KEYWORDS="x86" IUSE="ssl mysql sqlite oracle postgres pcre doc debug pam" DEPEND="virtual/libc >=dev-libs/libxml2-2.6.17 >=sys-devel/bison-1.875d >=dev-lang/perl-5.8.5 >=sys-libs/zlib-1.2.2 ssl? ( >=dev-libs/openssl-0.9.7d ) mysql? ( >=dev-db/mysql-4.0.22 ) sqlite? ( dev-db/sqlite ) oracle? ( dev-db/oracle ) postgres? ( dev-db/postgresql ) pcre? ( dev-libs/libpcre ) doc? ( media-gfx/transfig app-text/jadetex app-text-docbook-dsssl-stylesheets ) pam? (>=sys-libs/pam-0.77)" S=${WORKDIR}/gateway-${PV} src_unpack() { unpack ${A} cd ${S} } src_compile() { econf \ --enable-localtime \ --enable-start-stop-daemon \ $(use_enable pam pam) \ $(use_enable debug debug) \ $(use_enable pcre pcre) \ $(use_enable doc docs) \ $(use_enable ssl ssl) \ $(use_with mysql mysql) \ $(use_with sqlite sqlite) \ $(use_with oracle oracl) \ $(use_with postgres pgsql) \ || die "./configure failed" emake || die "emake failed" } src_install() { make DESTDIR=${D} install || die "make install failed" insinto /etc/kannel || die "instinto failed" doins doc/examples/kannel.conf \ doc/examples/modems.conf \ doc/examples/dlr-mysql.conf \ doc/examples/dlr-oracle.conf \ doc/examples/dlr-sdb.conf \ || die "doins failed" exeinto /etc/init.d || die "exeinto failed" newexe ${FILESDIR}/kannel-rc kannel || die "newexe failed" } src_test() { make check || die "make check failed" } pkg_postinst() { einfo "Consider to run: rc-update add kannel default" }