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

EAPI=4

inherit eutils gnome2-utils

MY_PN="KeePass"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="KeePass is a free, open source, light-weight and easy-to-use password manager."
HOMEPAGE="http://keepass.info/"
SRC_URI="mirror://sourceforge/${PN/-bin/}/${MY_P}.zip"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

LICENSE="GPL-2"

RDEPEND=">=dev-lang/mono-2.6"

#S="${WORKDIR}"

src_unpack() {
	mkdir "${S}"
	cd "${S}"
	unpack ${A}
}

src_install() {
	INSTDIR="/opt/${MY_PN}"

	dodir ${INSTDIR}
	insinto ${INSTDIR}
	doins *

	#insinto /usr/share/pixmaps
	#doins "${FILESDIR}"/${MY_PN}.png

	echo "#!/bin/sh" > "${S}/keepass"
	echo "exec mono \"${INSTDIR}/${MY_PN}.exe\" \"\$@\"" >> "${S}/keepass"
	dobin keepass

	make_desktop_entry ${PN} ${MY_PN} ${MY_PN} Utility
}

pkg_preinst() {
	gnome2_icon_savelist;
}

pkg_postinst() {
	gnome2_icon_cache_update;
	einfo "Documentation has been installed to \"${INSTDIR}/${MY_PN}.chm\"."
	einfo "use app-text/xchm or any other chm viewer to read it."
}

pkg_postrm() {
	gnome2_icon_cache_update;
}