# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils qt4 pax-utils DESCRIPTION="A P2P-VoiceIP client." HOMEPAGE="http://www.skype.com/" SFILENAME=${P}-static.tar.bz2 DFILENAME=${P}.bz2 SRC_URI="!static? ( http://download.skype.com/linux/${DFILENAME} ) static? ( http://download.skype.com/linux/${SFILENAME} ) amd64? ( http://felisberto.net/~humpback/libsigc++20-2.0.17-1-from-fc5.rf.i386.tar.gz )" LICENSE="skype-eula" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="static" RESTRICT="mirror strip" DEPEND=" amd64? ( >=app-emulation/emul-linux-x86-xlibs-1.2 >=app-emulation/emul-linux-x86-baselibs-2.1.1 >=app-emulation/emul-linux-x86-soundlibs-2.4 app-emulation/emul-linux-x86-compat ) x86? ( >=sys-libs/glibc-2.4 >=media-libs/alsa-lib-1.0.11 >=dev-libs/libsigc++-2 !static? ( $(qt4_min_version 4.2.3) ) )" RDEPEND="${DEPEND} >=sys-apps/dbus-1.0.0" QA_EXECSTACK="opt/skype/skype" use static && S="${WORKDIR}/${PN}_static-${PV}" pkg_setup() { if ! use static && ! built_with_use ">=x11-libs/qt-4.0" accessibility; then eerror "Rebuild qt-4 with USE=accessibility or try again with USE=static" die "USE=-static only works with qt-4 built with USE=accessibility." fi } src_unpack() { unpack ${A} # Hack around bug in filename if ! use static ; then tar xf ${P} || die "unpack failed" fi } src_install() { # remove mprotect() restrictions for PaX usage - see Bug 100507 pax-mark m "${S}"/skype exeinto /opt/${PN} doexe skype fowners root:audio /opt/skype/skype make_wrapper skype /opt/${PN}/skype /opt/${PN} /opt/${PN} /usr/bin insinto /opt/${PN}/sounds doins sounds/*.wav insinto /etc/dbus-1/system.d newins ${FILESDIR}/skype.debus.config skype.conf insinto /opt/${PN} for X in 16 32 48 do insinto /usr/share/icons/hicolor/${X}x${X}/apps newins ${S}/icons/SkypeBlue_${X}x${X}.png ${PN}.png done dodoc README # insinto /usr/share/applications/ # doins skype.desktop make_desktop_entry ${PN} "Skype VoIP" ${PN}.png "Network;InstantMessaging;Telephony" # AMD64 team does not provide this so we add it: if use amd64; then exeinto /opt/${PN} dosym libsigc-2.0.so.0.0.0 /opt/${PN}/libsigc-2.0.so.0 doexe "${WORKDIR}"/libsigc-2.0.so.0.0.0 fi # Ugly hack for bug #179568 use amd64 && multilib_toolchain_setup x86 dosym /usr/$(get_libdir)/libdbus-1.so /opt/${PN}/libdbus-1.so.2 # TODO: avatars # insinto /opt/${PN}/avatars # doins avatars/*.jpg # TODO: Optional configuration of callto:// in KDE, Mozilla and friends # doexe skype-callto-handler } pkg_postinst() { elog "If you have sound problems please visit: " elog "http://forum.skype.com/bb/viewtopic.php?t=4489" elog "These kernel options are reported to help" elog elog "Processor type and features --->" elog "-- Preemption Model (Preemptible Kernel (Low-Latency Desktop))" elog "-- Timer frequency (250 HZ)" elog ewarn "This release no longer uses the old wrapper because ${PN} now uses ALSA" ewarn }