# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-sound/mumble/mumble-1.0.0.ebuild,v 1.0 2007/07/16 19:13:10 drizzt Exp $ inherit eutils toolchain-funcs DESCRIPTION="A client-server based voice chat software for gaming written in Qt4" HOMEPAGE="http://mumble.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="pulseaudio disable-client-build disable-server-build" DEPEND=">=x11-libs/qt-4.3 media-libs/alsa-lib dev-libs/boost x11-libs/libXevie disable-client-build? ( pulseaudio? (media-sound/pulseaudio) )" RDEPEND="${DEPEND}" pkg_setup() { if use disable-client-build && use pulseaudio; then ewarn "Only the mumble client uses pulsaudio library while"; ewarn "the server does not but you have pulseaudio use flag still enabled"; die "Disable the pulseaudio use flag and recompile" fi if ! built_with_use -o =x11-libs/qt-4* sqlite3 || ! built_with_use -o =x11-libs/qt-4* dbus; then echo if ! built_with_use -o =x11-libs/qt-4* sqlite3; then ewarn "You need to build Qt4 with the sqlite3 use-flag" fi if ! built_with_use -o =x11-libs/qt-4* dbus; then ewarn "You need to build Qt4 with the dbus use-flag" fi echo die "Your Qt4 installation lacks propper useflag configuration, see above" fi if [[ $(gcc-major-version) -eq 3 && $(gcc-minor-version) -lt 4 ]]; then ewarn "You need >=sys-devel/gcc-3.4 to compile ${PN}." die "System gcc is too old to compile ${PN}." fi } src_unpack() { unpack ${A} cd "${S}" if use disable-client-build || ! use pulseaudio; then ewarn "pulseaudio support not enabled: disabling pulseaudio support" epatch "${FILESDIR}"/mumble-1.1.1-disablePulsaudioBuild.patch fi if use disable-server-build && use disable-client-build; then ewarn "error, nothing to build since server and client is disabled" die "fix your useflags for this ebuild" fi if use disable-server-build; then ewarn "building client only. murmur server building will be disabled" epatch "${FILESDIR}"/mumble-1.1.1-clientonly.patch fi if use disable-client-build; then ewarn "building murmur server only. mumble client building will be disabled" epatch "${FILESDIR}"/mumble-1.1.1-serveronly.patch fi } src_compile() { qmake main.pro || die "qmake failed" emake || die "emake failed" } src_install() { cd ${WORKDIR}/${P}/ cat README.Linux >> README dodoc README CHANGES || die "installing docs failed" if built_with_use -o =x11-libs/qt-4* debug; then echo ewarn "Built debug-version because your Qt4 has the debug use-flag enabled." # client build if ! use disable-client-build; then dobin debug/mumble || die "installing failed" dolib.so debug/lib*.so || die "installing failed" dolib.a debug/lib*.a || die "installing failed" fi # server build if ! use disable-server-build; then dobin debug/murmurd || die "installing failed" dolib.a debug/lib*.a || die "installing failed" fi else # client build if ! use disable-client-build; then dobin release/mumble || die "installing failed" dolib.so release/lib*.so || die "installing failed" dolib.a release/lib*.a || die "installing failed" fi # server build if ! use disable-server-build; then dobin release/murmurd || die "installing failed" dolib.a release/lib*.a || die "installing failed" fi fi dobin scripts/mumble-overlay || die "installing failed" if ! use disable-client-build; then insinto /usr/share/pixmaps newins ${WORKDIR}/${P}/icons/mumble.64x64.png mumble.png \ || die "installing icon failed" make_desktop_entry mumble "Mumble" mumble.png "KDE;Qt;AudioVideo" \ || die "installing desktop entry failed" fi } pkg_postinst() { if ! use disable-client-build; then # client was built einfo "Visit http://mumble.sourceforge.net/Audio_Tuning for futher configuration" einfo "type mumble to run the client" einfo "you might want to add this to your xorg.conf to get shortcut support" einfo " Section \"Extensions\"" einfo " Option \"XEVIE\" \"Enable\"" einfo " EndSection" fi if ! use disable-server-build; then # server was built einfo "Mumble supports either sqlight db or PostgreSQL db" einfo "You can set your initial 'SuperUser' password using:" einfo " murmur -supw " einfo "Read on here:" einfo "http://mumble.sourceforge.net/Configuring_Murmur" einfo "http://mumble.sourceforge.net/Running_Murmur" fi einfo "Both mumble/murmurd support dbus for configuration & misc" }