# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 inherit meson MY_P=rogerrouter-v${PV} DESCRIPTION="Implements fax over TCP on your Fritz!Box" HOMEPAGE="https://tabos.org" SRC_URI="https://git.krueger-it.net/tabos.org/rogerrouter/-/archive/v${PV}/${MY_P}.tar.gz" LICENSE="GPL2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="+fax kwallet cups gnome-keyring gstreamer pulseaudio" RESTRICT="mirror" DEPEND="dev-util/meson >=net-libs/libsoup-2.4 media-libs/speex media-libs/spandsp dev-libs/json-glib media-libs/libsndfile >=media-libs/gstreamer-0.10.0 >=x11-libs/gtk+-3.12.0 >=net-libs/libcapi-3.0.5" RDEPEND="$DEPEND fax? ( >=media-libs/tiff-4 ) cups? ( net-print/cups ) pulseaudio? ( media-sound/pulseaudio )" S="${WORKDIR}/${MY_P}" src_unpack() { unpack ${A} cd "${S}" } src_configure() { local emesonargs=( -Ddocdir="/usr/share/doc/${PF}/html" -Dkwallet="$(usex kwallet true false)" -Dgnome-keyring="$(usex gnome-keyring true false)" -Dpulseaudio="$(usex pulseaudio true false)" -Dgstreamer="$(usex gstreamer true false)" -Debook=false ) meson_src_configure } src_install() { meson_src_install 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 }