2020-07-13 21:56:43 +02:00
|
|
|
# Copyright 1999-2020 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
|
|
|
PYTHON_COMPAT=( python3_{6,7,8} )
|
|
|
|
|
|
|
|
inherit distutils-r1 xdg
|
|
|
|
|
|
|
|
DESCRIPTION="A program to download, updated, and run the Tor Browser Bundle"
|
|
|
|
HOMEPAGE="https://github.com/micahflee/torbrowser-launcher"
|
|
|
|
|
|
|
|
if [[ "${PV}" == *9999* ]]; then
|
|
|
|
inherit git-r3
|
|
|
|
EGIT_REPO_URI="https://github.com/micahflee/${PN}.git"
|
|
|
|
else
|
|
|
|
SRC_URI="https://github.com/micahflee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
KEYWORDS="~amd64"
|
|
|
|
fi
|
|
|
|
|
|
|
|
RESTRICT="mirror"
|
|
|
|
LICENSE="MIT"
|
|
|
|
SLOT="0"
|
2020-09-15 21:05:59 +02:00
|
|
|
IUSE="apparmor"
|
2020-07-13 21:56:43 +02:00
|
|
|
|
|
|
|
RDEPEND="
|
|
|
|
app-crypt/gpgme[python,${PYTHON_USEDEP}]
|
|
|
|
dev-python/PyQt5[${PYTHON_USEDEP},widgets]
|
|
|
|
dev-python/PySocks[${PYTHON_USEDEP}]
|
|
|
|
dev-python/requests[${PYTHON_USEDEP}]
|
2020-09-15 21:05:59 +02:00
|
|
|
apparmor? ( sys-libs/libapparmor )
|
2020-07-13 21:56:43 +02:00
|
|
|
"
|
|
|
|
|
2020-09-04 17:29:21 +02:00
|
|
|
PATCHES=(
|
|
|
|
"${FILESDIR}/${PN}-distro.patch"
|
|
|
|
)
|
|
|
|
|
2020-07-13 21:56:43 +02:00
|
|
|
python_install_all() {
|
|
|
|
distutils-r1_python_install_all
|
|
|
|
|
|
|
|
# delete apparmor profiles
|
2020-09-15 21:05:59 +02:00
|
|
|
if ! use apparmor; then
|
|
|
|
rm -r "${D}/etc/apparmor.d" || die "Failed to remove apparmor profiles"
|
|
|
|
rmdir "${D}/etc" || die "Failed to remove empty directory"
|
|
|
|
fi
|
2020-07-13 21:56:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
xdg_desktop_database_update
|
|
|
|
xdg_icon_cache_update
|
|
|
|
|
|
|
|
elog "For updating over system TOR install net-vpn/tor and dev-python/txsocksx"
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postrm() {
|
|
|
|
xdg_desktop_database_update
|
|
|
|
xdg_icon_cache_update
|
|
|
|
}
|