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

EAPI="2"
inherit eutils multilib

DESCRIPTION="Internet banking plugin for technology by BankID company"
SRC_URI="http://install.bankid.com/InstallBankidCom/InstallFiles/LinuxPersonal.tgz -> LinuxPersonal-${PV}.tgz"
HOMEPAGE="http://bankid.com/"

KEYWORDS="~x86"
SLOT="0"
LICENSE="as-is"

# Works with these browsers
BROWSERS="epiphany firefox mozilla seamonkey"
IUSE="doc ${BROWSERS}"

S=${WORKDIR}/personal-${PV}

RDEPEND="app-crypt/mit-krb5
	dev-libs/atk
	dev-libs/expat
	dev-libs/glib:2
	media-libs/libpng
	net-misc/curl[gnutls,kerberos]
	x11-libs/gtk+
	x11-libs/libSM
	x11-libs/libX11
	x11-libs/libXinerama
	x11-libs/pango
	virtual/jre"
DEPEND=""

RESTRICT="strip"

QA_TEXTRELS="opt/${P}/*.so"

src_install() {
	local id=/opt/${P}
	local ubin=/usr/local/bin
	local lib=$(get_abi_LIBDIR x86)

	exeinto ${id}
	doexe *.so personal.bin persadm || die "doexe failed."

	make_wrapper personal ${id}/personal.bin ${id} ${id} \
		|| die "make_wrapper failed."
	make_wrapper persadm "${id}/persadm" ${id} ${id} || die "make_wrapper failed."

	dosym /usr/bin/personal ${ubin}/personal || die "dosym failed."
	dosym /usr/bin/persadm ${ubin}/persadm || die "dosym failed."

	if use doc; then
		dohtml *.htm || die "dohtml failed."
		dodoc *.txt || die "dodoc failed."
	fi

	insinto ${id}/config
	doins Personal.cfg || die "doins failed."

	newicon nexus_logo_32x32.png ${PN}.png || die "newicon failed."
	dosym /usr/share/pixmaps/${PN}.png ${id}/icons/nexus_logo_32x32.png

	make_desktop_entry personal "Nexus Personal" ${PN} Utility

	dosym ${id}/libplugins.so /usr/${lib}/nsbrowser/plugins/libnexuspersonal.so \
		|| die "dosym failed."

	dosym /usr/${lib}/libcurl.so ${id}/libcurl-gnutls.so.4 \
		|| die "dosym failed."

	for i in ${BROWSERS}; do
		if use ${i}; then
			make_wrapper ${i}-nexus ${i} ${id} ${id}
		fi
	done
}

pkg_postinst() {
	einfo
	for i in ${BROWSERS}; do
		if use ${i}; then
			einfo "Run '${i}-nexus' for BankID plugin support."
		fi
	done
	einfo "For all other browsers:"
	einfo "\texport LD_LIBRARY_PATH=\"\${LD_LIBRARY_PATH}:${ROOT}opt/${P}\""
	einfo "for BankID plugin support, then start your browser."
	einfo
}