diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2017-02-26 01:15:47 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2017-02-26 01:16:13 +0100 |
commit | f349c60685f77c6ca4cc004619f7dc9e10970bdd (patch) | |
tree | 0575b7e10ee24f4f6d5c3e02913ab80c1d33cef0 /net-firewall | |
parent | profiles: USE-mask xlib-xcb on x11-libs/cairo. (diff) | |
download | gentoo-f349c60685f77c6ca4cc004619f7dc9e10970bdd.tar.gz gentoo-f349c60685f77c6ca4cc004619f7dc9e10970bdd.tar.bz2 gentoo-f349c60685f77c6ca4cc004619f7dc9e10970bdd.zip |
net-firewall/ufw-frontends: Port USE=kde to kde-plasma/kde-cli-tools
Package-Manager: portage-2.2.28
Diffstat (limited to 'net-firewall')
-rw-r--r-- | net-firewall/ufw-frontends/ufw-frontends-0.3.2-r4.ebuild | 67 |
1 files changed, 67 insertions, 0 deletions
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 new file mode 100644 index 000000000000..99fc472a0f1c --- /dev/null +++ b/net-firewall/ufw-frontends/ufw-frontends-0.3.2-r4.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +inherit distutils-r1 + +DESCRIPTION="Provides graphical frontend to ufw" +HOMEPAGE="https://github.com/baudm/ufw-frontends" +SRC_URI="https://github.com/baudm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +# CC-BY-NC-SA-3.0 is for a png file +LICENSE="GPL-3 CC-BY-NC-SA-3.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="kde policykit" + +DEPEND="" +RDEPEND="${DEPEND} + dev-python/pygobject:2[${PYTHON_USEDEP}] + dev-python/pygtk[${PYTHON_USEDEP}] + dev-python/pyinotify[${PYTHON_USEDEP}] + net-firewall/ufw[${PYTHON_USEDEP}] + !policykit? ( + kde? ( kde-plasma/kde-cli-tools[kdesu] ) + ) + policykit? ( sys-auth/polkit ) +" + +python_prepare_all() { + if use policykit; then + sed -i 's/^Exec=su-to-root -X -c/Exec=pkexec/' \ + share/ufw-gtk.desktop || die + elif use kde; then + sed -i 's/^Exec=su-to-root -X -c/Exec=kdesu5/' \ + share/ufw-gtk.desktop || die + fi + + # don't try to override run() to install the script + # under /usr/sbin; it does not work with distutils-r1 + # and so it is handled differently (in python_install) + sed -i '/cmdclass=/d' setup.py || die + + # Qt version is unusable + rm gfw/frontend_qt.py || die + distutils-r1_python_prepare_all + + # fix crash when no ufw logs in supported locations can + # be found + epatch "${FILESDIR}/${P}-no-log-crash.patch" +} + +python_install() { + distutils-r1_python_install --install-scripts="/usr/sbin" +} + +python_install_all() { + distutils-r1_python_install_all + + if use policykit; then + insinto /usr/share/polkit-1/actions/ + doins "${FILESDIR}"/org.gentoo.pkexec.ufw-gtk.policy + elif ! use kde; then + rm "${D}usr/share/applications/ufw-gtk.desktop" || die + fi +} |