# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit autotools eutils MY_P=${PN}-${PV} DESCRIPTION="Implements fax over TCP on your Fritz!Box" HOMEPAGE="http://www.tabos.org/ffgtk" SRC_URI="http://www.tabos.org/ffgtk/download/${MY_P}.tar.bz2" LICENSE="GPL2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="+fax kwallet cups gnome-keyring pulseaudio" RESTRICT="mirror" DEPEND=">=x11-libs/gtk+-2.6.16 >=net-dialup/libcapi-3.0.5 media-libs/spandsp >=media-libs/gstreamer-0.10.0 x11-libs/libnotify" RDEPEND="$DEPEND fax? ( media-libs/tiff ) cups? ( net-print/cups ) pulseaudio? ( media-sound/pulseaudio )" AUTOMAKE_OPTIONS="--force --install" S="${WORKDIR}/${MY_P}" src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/${PV}/${P}-pkg-config-backslash.patch" eautoreconf intltoolize --automake --force --copy } src_prepare() { EPATCH_OPTS="-p1" epatch "${FILESDIR}/${PV}/${P}-libnotify-0-7-0.patch" } src_configure() { econf --docdir=/usr/share/doc/${PF}/html \ $(use_with kwallet kwallet4) \ $(use_with gnome-keyring) $(use_with pulseaudio) $(use_with gstreamer) } src_install() { emake DESTDIR="${D}" install || die dodoc README || die docinto scripts || die dodoc scripts/install-fax.sh || die if use cups ; then exeinto /usr/libexec/cups/backend/ doexe ${D}/usr/share/${PN}/ffgtk-cups || die diropts -m1777 dodir /var/spool/${PN} || die fi make_desktop_entry /usr/bin/ffgtk "Fritz Fun" /usr/share/pixmaps/ffgtk.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 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 ffgtk-cups:/ -P /usr/share/cups/model/foomatic-db-ppds/HP/mono_laser/HP_LaserJet_4.ppd.gz else elog "No cups usage found. Nothing configured" fi }