summaryrefslogtreecommitdiff
blob: 4c10bfbd05559cbffca93758ca4e13ab360020f2 (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit qmake-utils

DESCRIPTION="multi-platform GUI for pass, the standard unix password manager"
HOMEPAGE="https://qtpass.org/"
SRC_URI="https://github.com/IJHack/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="+qt5"
DOCS=( FAQ.md README.md CONTRIBUTING.md )

RDEPEND="qt5? (
		dev-qt/qtcore:5
		dev-qt/qtgui:5[xcb]
		dev-qt/qtwidgets:5
		dev-qt/qtnetwork:5
	)
	!qt5? (
		dev-qt/qtcore:4
		dev-qt/qtgui:4
	)
	app-admin/pass
	net-misc/x11-ssh-askpass"
DEPEND="${RDEPEND}
	qt5? (
		dev-qt/linguist-tools:5
		dev-qt/qtsvg:5
	)
	!qt5? ( dev-qt/qtsvg:4 )"

src_prepare() {
	# Modify install path
	sed -i "s/target.path = \$\$PREFIX/target.path = \$\$PREFIX\/bin/" \
		${PN}.pro \
		|| die "sed failed to modify install path for ${PN}.pro"

	epatch_user
}

src_configure() {
	if use qt5 ; then
		eqmake5 PREFIX="${D}"/usr
	else
		eqmake4 PREFIX="${D}"/usr
	fi
}

src_install() {
	default

	insinto /usr/share/applications
	doins "${PN}.desktop"

	newicon artwork/icon.svg "${PN}-icon.svg"
}