aboutsummaryrefslogtreecommitdiff
blob: 9ea16a433386ca259f2558db3a372a0c2f00cfad (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
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DESCRIPTION="A fork of porthole rewritten for python 3"
HOMEPAGE="https://gitlab.com/quarkyalice/porthole"

LICENSE="GPL-2"
SLOT="0"

PYTHON_COMPAT=( python3_{7,8,9} )
inherit distutils-r1
inherit python-r1

if [[ ${PV} == 9999* ]] ; then
	inherit git-r3
	EGIT_REPO_URI="https://gitlab.com/quarkyalice/porthole.git"
else
	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~sparc ~x86"
fi

RESTRICT="mirror"

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

RDEPEND="
	dev-lang/python
	sys-apps/portage
	gnome-base/libglade
	dev-python/beautifulsoup4
	x11-libs/gtksourceview
"
DEPEND="${RDEPEND}
"

src_install() {
	distutils-r1_src_install

	dodoc TODO README NEWS AUTHORS

	keepdir /var/log/porthole
	fperms g+w /var/log/porthole
	keepdir /var/db/porthole
	fperms g+w /var/db/porthole

	rm -rf "${D}/usr/share/${PN}"/{pocompile,dopot}.sh
}

python_install() {
	distutils-r1_python_install
	python_doexe scripts/porthole

	cp -rv "${WORKDIR}/porthole-${PV}/scripts" \
	"${D}/usr/lib/python3.9/site-packages/porthole-0.7.0-py3.9.egg-info"
}

pkg_preinst() {
	chgrp portage "${D}"/var/log/porthole
	chgrp portage "${D}"/var/db/porthole
}

pkg_postinst() {
	einfo
	einfo "Porthole has updated the way that the upgrades are sent to emerge."
	einfo "In this new way the user needs to set any 'Settings' menu emerge options"
	einfo "Porthole automatically adds '--oneshot' for all upgrades selections"
	einfo "Other options recommended are '--noreplace'  along with '--update'"
	einfo "They allow for portage to skip any packages that might have already"
	einfo "been upgraded as a dependency of another previously upgraded package"
	einfo
}