summaryrefslogtreecommitdiff
blob: 7ede7ef3b0554a7738ed628743500841cec7d51d (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="1"
## We need virtualx for src_test's Xmake stuff.
inherit eutils multilib virtualx

DESCRIPTION="A gnome applet interface to SSH."
HOMEPAGE="http://sshmenu.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~x86"
IUSE="gnome"

RDEPEND="dev-lang/ruby:1.8
	>=dev-ruby/ruby-gtk2-0.1.18
	gnome? ( dev-ruby/ruby-gconf2
		dev-ruby/ruby-panel-applet2 )
	|| ( net-misc/x11-ssh-askpass )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-fixmultilib.patch
}

src_test() {
	Xmake TEST || die "Tests failed!"
}

src_install() {
	emake LIBDIR="$(get_libdir)" DESTDIR="${D}" install || die "Install failed!"

	if ! use gnome; then
		rm "${D}"/usr/$(get_libdir)/ruby/1.8/gnome-sshmenu.rb
		rm "${D}"/usr/bin/sshmenu-gnome
		rm -rf "${D}"/usr/share/icons
	fi
}