summaryrefslogtreecommitdiff
blob: 0d67dfc7a93e0da51aa7488e68c91abbb7ab7156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/skype/skype-2.2.0.35-r99.ebuild,v 1.11 2013/09/08 21:17:44 reavertm Exp $

EAPI=4
inherit eutils gnome2-utils qt4-r2 pax-utils

SVERSION=2.2.0.99
SFILENAME=${PN}_static-${SVERSION}.tar.bz2
DVERSION=${PV}
DFILENAME=${PN}-${DVERSION}.tar.bz2

DESCRIPTION="An P2P Internet Telephony (VoiceIP) client"
HOMEPAGE="http://www.skype.com/"
SRC_URI="qt-static? ( http://download.skype.com/linux/${SFILENAME} )
	!qt-static? ( http://download.skype.com/linux/${DFILENAME} )"

LICENSE="skype-eula"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="pax_kernel selinux qt-static"

RESTRICT="mirror strip" #299368
EMUL_VER=20120520

RDEPEND="
	amd64? (
		>=app-emulation/emul-linux-x86-baselibs-${EMUL_VER}
		>=app-emulation/emul-linux-x86-soundlibs-${EMUL_VER}
		|| (
			(
				x11-libs/libX11[abi_x86_32]
				x11-libs/libXext[abi_x86_32]
				x11-libs/libXScrnSaver[abi_x86_32]
				x11-libs/libXv[abi_x86_32]
				qt-static? (
					media-libs/fontconfig[abi_x86_32]
					>=media-libs/freetype-2[abi_x86_32]
					x11-libs/libICE[abi_x86_32]
					x11-libs/libSM[abi_x86_32]
					x11-libs/libXrender[abi_x86_32]
				)
			)
			>=app-emulation/emul-linux-x86-xlibs-${EMUL_VER}
		)
		!qt-static? ( >=app-emulation/emul-linux-x86-qtlibs-${EMUL_VER} )
		)
	x86? (
		>=media-libs/alsa-lib-1.0.24.1
		x11-libs/libX11
		x11-libs/libXext
		x11-libs/libXScrnSaver
		x11-libs/libXv
		qt-static? (
			=dev-libs/glib-2*
			media-libs/fontconfig
			>=media-libs/freetype-2
			>=media-libs/tiff-3.9.5-r3:3
			sys-libs/zlib
			x11-libs/libICE
			x11-libs/libSM
			x11-libs/libXrender
			)
		!qt-static? (
			dev-qt/qtcore:4
			dev-qt/qtdbus:4
			dev-qt/qtgui:4[accessibility]
			)
		)
	virtual/ttf-fonts
	selinux? ( sec-policy/selinux-skype )"

# Required to get `lrelease` command for src_install()
DEPEND="!qt-static? ( dev-qt/qtcore:4 )
	selinux? ( sec-policy/selinux-skype )"

QA_EXECSTACK="opt/skype/skype"
QA_WX_LOAD="opt/skype/skype"
QA_FLAGS_IGNORED="opt/skype/skype"

pkg_setup() { :; }

src_unpack() {
	unpack ${A}
	[[ -d ${S} ]] || { mv skype* "${S}" || die; }
}

src_install() {
	exeinto /opt/skype
	doexe skype
	fowners root:audio /opt/skype/skype
	make_wrapper skype ./skype /opt/skype /opt/skype

	insinto /opt/skype/sounds
	doins sounds/*.wav

	if ! use qt-static; then
		insinto /etc/dbus-1/system.d
		doins skype.conf
	fi

	if ! use qt-static; then
		lrelease lang/*.ts
	fi

	insinto /opt/skype/lang
	doins lang/*.qm

	insinto /opt/skype/avatars
	doins avatars/*.png

	local res
	for res in 16 32 48; do
		insinto /usr/share/icons/hicolor/${res}x${res}/apps
		newins icons/SkypeBlue_${res}x${res}.png skype.png
	done

	dodoc README

	make_desktop_entry skype "Skype VoIP" skype "Network;InstantMessaging;Telephony"

	dosym /opt/skype /usr/share/skype # Fix for disabled sound notification

	if use pax_kernel; then
		pax-mark Cm "${ED}"/opt/skype/skype || die
		eqawarn "You have set USE=pax_kernel meaning that you intend to run"
		eqawarn "skype under a PaX enabled kernel.  To do so, we must modify"
		eqawarn "the skype binary itself and this *may* lead to breakage!  If"
		eqawarn "you suspect that skype is being broken by this modification,"
		eqawarn "please open a bug."
	fi
}

pkg_preinst() { gnome2_icon_savelist; }
pkg_postinst() { gnome2_icon_cache_update; }
pkg_postrm() { gnome2_icon_cache_update; }