Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/ufw-frontends/
Date: Sun, 26 Feb 2017 00:16:31
Message-Id: 1488068173.f349c60685f77c6ca4cc004619f7dc9e10970bdd.asturm@gentoo
1 commit: f349c60685f77c6ca4cc004619f7dc9e10970bdd
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 26 00:15:47 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 26 00:16:13 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f349c606
7
8 net-firewall/ufw-frontends: Port USE=kde to kde-plasma/kde-cli-tools
9
10 Package-Manager: portage-2.2.28
11
12 .../ufw-frontends/ufw-frontends-0.3.2-r4.ebuild | 67 ++++++++++++++++++++++
13 1 file changed, 67 insertions(+)
14
15 diff --git a/net-firewall/ufw-frontends/ufw-frontends-0.3.2-r4.ebuild b/net-firewall/ufw-frontends/ufw-frontends-0.3.2-r4.ebuild
16 new file mode 100644
17 index 0000000000..99fc472a0f
18 --- /dev/null
19 +++ b/net-firewall/ufw-frontends/ufw-frontends-0.3.2-r4.ebuild
20 @@ -0,0 +1,67 @@
21 +# Copyright 1999-2017 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +PYTHON_COMPAT=( python2_7 )
27 +inherit distutils-r1
28 +
29 +DESCRIPTION="Provides graphical frontend to ufw"
30 +HOMEPAGE="https://github.com/baudm/ufw-frontends"
31 +SRC_URI="https://github.com/baudm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
32 +
33 +# CC-BY-NC-SA-3.0 is for a png file
34 +LICENSE="GPL-3 CC-BY-NC-SA-3.0"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~x86"
37 +IUSE="kde policykit"
38 +
39 +DEPEND=""
40 +RDEPEND="${DEPEND}
41 + dev-python/pygobject:2[${PYTHON_USEDEP}]
42 + dev-python/pygtk[${PYTHON_USEDEP}]
43 + dev-python/pyinotify[${PYTHON_USEDEP}]
44 + net-firewall/ufw[${PYTHON_USEDEP}]
45 + !policykit? (
46 + kde? ( kde-plasma/kde-cli-tools[kdesu] )
47 + )
48 + policykit? ( sys-auth/polkit )
49 +"
50 +
51 +python_prepare_all() {
52 + if use policykit; then
53 + sed -i 's/^Exec=su-to-root -X -c/Exec=pkexec/' \
54 + share/ufw-gtk.desktop || die
55 + elif use kde; then
56 + sed -i 's/^Exec=su-to-root -X -c/Exec=kdesu5/' \
57 + share/ufw-gtk.desktop || die
58 + fi
59 +
60 + # don't try to override run() to install the script
61 + # under /usr/sbin; it does not work with distutils-r1
62 + # and so it is handled differently (in python_install)
63 + sed -i '/cmdclass=/d' setup.py || die
64 +
65 + # Qt version is unusable
66 + rm gfw/frontend_qt.py || die
67 + distutils-r1_python_prepare_all
68 +
69 + # fix crash when no ufw logs in supported locations can
70 + # be found
71 + epatch "${FILESDIR}/${P}-no-log-crash.patch"
72 +}
73 +
74 +python_install() {
75 + distutils-r1_python_install --install-scripts="/usr/sbin"
76 +}
77 +
78 +python_install_all() {
79 + distutils-r1_python_install_all
80 +
81 + if use policykit; then
82 + insinto /usr/share/polkit-1/actions/
83 + doins "${FILESDIR}"/org.gentoo.pkexec.ufw-gtk.policy
84 + elif ! use kde; then
85 + rm "${D}usr/share/applications/ufw-gtk.desktop" || die
86 + fi
87 +}