# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=3 inherit autotools eutils gnome2-utils MY_P=${PN}-${PV} DESCRIPTION="Implements fax over TCP on your Fritz!Box" HOMEPAGE="http://en.tabos.org/home" SRC_URI="http://en.tabos.org/download/${MY_P}.tar.xz" LICENSE="GPL2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="+fax kwallet cups gnome-keyring gstreamer pulseaudio" RESTRICT="mirror" DEPEND=">=x11-libs/gtk+-2.6.16 >=net-libs/libcapi-3.0.5 media-libs/spandsp >=media-libs/gstreamer-0.10.0 dev-util/gtk-builder-convert x11-libs/libnotify dev-libs/libpeas" RDEPEND="$DEPEND fax? ( media-libs/tiff ) cups? ( net-print/cups net-print/foomatic-filters-ppds ) pulseaudio? ( media-sound/pulseaudio )" AUTOMAKE_OPTIONS="--force --install" S="${WORKDIR}/${MY_P}" src_unpack() { unpack ${A} cd "${S}" eautoreconf intltoolize --automake --force --copy } src_configure() { econf --docdir=/usr/share/doc/${PF}/html \ $(use_with kwallet kwallet4) \ $(use_with gnome-keyring) \ $(use_with pulseaudio) \ $(use_with gstreamer) \ --with-ebook=no } src_install() { emake DESTDIR="${D}" install || die dodoc README || die docinto scripts || die dodoc share/install-fax.sh || die if use cups ; then exeinto /usr/libexec/cups/backend/ doexe ${D}/usr/share/roger/roger-cups || die diropts -m1777 dodir /var/spool/roger || die fi make_desktop_entry /usr/bin/roger-router "Roger Router" /usr/share/pixmaps/roger-router.png || die } pkg_postinst() { if use cups ; then elog "Installing files for cups support." elog "To use cups as a fax driver you have to run" elog " emerge --config =${PF}" elog fi /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/ #gnome2_schemas_update elog "If you want to use the incoming notification you'll have to dial #96*5*" elog elog "To use the capifax plugin you will have to enable capi-over-tcp by" elog "dialing #96*3*" } pkg_config() { if use cups ; then lpadmin -p Fax -E -v roger-router-cups:/ -P /usr/share/ppd/HP/HP-LaserJet_4-ljet4.ppd.gz else elog "No cups usage found. Nothing configured" fi }