summaryrefslogtreecommitdiff
blob: d72c5ac7f10710a2093bc0f9e3a2d41ba0750564 (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
# Copyright 2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/ymessenger/ymessenger-0.99.19.ebuild,v 1.8 2002/10/05 05:39:22 drobbins Exp $

IUSE="gnome"

# If you are looking in here, it is because emerge has instructed you to do
# so.  Please go to http://messenger.yahoo.com/download/unix.html and scroll
# all the way to the bottom.  There, please click on the tar.gz file for
# Debian Sid, and download that file to /usr/portage/distfiles.

MY_P=${PN}_${PV}-1
S=${WORKDIR}/opt/${PN}
DESCRIPTION="Yahoo's instant messenger client"
SRC_URI=""
HOMEPAGE="http://messenger.yahoo.com/messenger/download/unix.html"

DEPEND="gnome? ( gnome-extra/gtkhtml )"
RDEPEND="virtual/x11"

RESTRICT="fetch"

SLOT="0"
LICENSE="yahoo"
KEYWORDS="x86 -ppc -sparc -sparc64"

pkg_setup() {
	if [ ${ARCH} != "x86" ] ; then
		einfo "This is an x86 only package, sorry"
		die "Not supported on your ARCH"
	fi
}

src_unpack() {
	if [ ! -f ${DISTDIR}/${MY_P}.tar.gz ]
	then
		die "Please download ${MY_P} from ${HOMEPAGE}.  Scroll to the bottom to find the tarballs for Non-Root Installs.-- Note that you need the one for Debian Sid -- and place into ${DISTDIR}"
	fi
	unpack ${MY_P}.tar.gz || die
}

src_compile() {
	cd bin
	cp yahoo_gnome.png yahoo.png
	cp yahoo_kde.xpm yahoo.xpm

	#use kde && ( \
	#	mv ymessenger.kdelnk ymessenger.kdelnk.old
	#	sed "s:^Ic.*:Icon=${KDEDIR}/share/icons/hicolor/48x48/apps/yahoo.png:" \
	#		ymessenger.kdelnk.old > ymessenger.kdelnk
	#)
	
	#use gnome && ( \
	#	mv ymessenger.desktop ymessenger.desktop.old
	#	sed "s:Icon.*:Icon=/usr/share/pixmaps/yahoo.xpm:" \
	#		ymessenger.desktop.old > ymessenger.desktop
	#)
}

src_install () {

	insinto /opt/ymessenger/bin
	doins bin/*

	exeinto /opt/ymessenger/bin
	doexe bin/ymessenger
	doexe bin/ymessenger.bin

	cp -a lib ${D}/opt/${PN}
	
	#use gnome && ( \
	#	insinto /usr/share/gnome/apps/Internet
	#	doins ymessenger.desktop
#
#		insinto /usr/share/pixmaps
#		doins yahoo.xpm
#	) || (
#		dohtml yahoo.xpm
#	)
	
#	use kde && ( \
#		insinto ${KDEDIR}/share/applnk/Applications
#		doins ymessenger.kdelnk
#
#		insinto ${KDEDIR}/share/icons/hicolor/48x48/apps
#		doins yahoo.png
#	) || (
#		dohtml yahoo.png
#	)

	dodir /etc/env.d
	echo "PATH=/opt/ymessenger/bin" > ${D}/etc/env.d/97ymessenger
}

pkg_postinst() {

	einfo "If you are upgrading from an old version of ymessenger, please"
	einfo "remove the older version.  Also, please do this: "
	einfo "mv ~/.ymessenger/preferences ~/.ymessenger/preferences.old"
}