net-misc/mastodome: New package
the build was successful Details

Package-Manager: Portage-2.3.51, Repoman-2.3.11
Manifest-Sign-Key: 3555266864CA6D7FF45AA6E7CFC39497F1B26E07
This commit is contained in:
tastytea 2018-11-22 22:40:49 +01:00
parent 47346f64f3
commit 314883c130
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
5 changed files with 171 additions and 0 deletions

View File

@ -0,0 +1,14 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
AUX 0.2-modify-config-dirs.patch 3596 BLAKE2B 6d1cf7d030f70184fb6e9d63784e576124e9d359c0ba9d731e6a93be7727cc335227df61fcd71f7cceee1d372ba4e2058e4c3aa4d70e129e4fbc8bb26d2b5aae SHA512 1694e924d0440146288b80cc90145f1650828f338a1defc182983571c98fdb0dd9f540d14aa0736f4d4a08f4614906165dfd23484329865a4495ce59192f63fe
AUX mastodon_wrapper.sh 243 BLAKE2B 94348add4837b3074e5fa6b3b67b09bcd3a8cbb6f84c287bfb7a69540131b78d9112f8327867bd3b0a49a8f26da009bd39f3be52d9c3d7ec23e9c256302e43fb SHA512 794edc2bc42d5ab1658967b1081d7a71d638cf73c5866fafac85f69f46d10e869fbac755f87e4fb47b2b13762a8bff9e80fb0702c43f558cc7d798ac011ea561
EBUILD mastodome-9999.ebuild 1222 BLAKE2B d7bae38614d108400f92277ea03d48c6eb92e5a6038f663451b30a885025e3453f7c00f5e12fbac87aeb26af0dac2d9215d0ec0d0349bf5c1eb8f95d1eef861f SHA512 19e46044a355eb8eed6356506796c92b783847bf69da73fb5271571e42ea3d06b91b78bbcd216b11715412c044dac4c899374f9404778e46d5dbab8491876dc4
MISC metadata.xml 347 BLAKE2B a6dd8efb61b3c1a263ce36de8296aac2a36c945bdd5a8d76de9380f9b1e7b3945cad01da89c69103fc7b72fa4e77b09684dcbe47bdf53079bf6862d2d7653a70 SHA512 82d9b832e318fb3948dd1a3f948ead4b172b323e9840f1d047bd3639a303e8daa5a1441e2e5e6f37c1d4d70551ed636c4a9ea964ba72f0f186cf8e7c1fcd6f8e
-----BEGIN PGP SIGNATURE-----
iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCW/ciYQAKCRDPw5SX8bJu
BxXqAP9CUhFAWkGJFzTYP5erU3l1WAFz/j5n0kbfOf4FLa2QXwD+Nmz67jUveYft
6IZ57bk+UZ8LAkbZcLXsu+e7mUyMeRc=
=No9N
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,80 @@
diff -ur a/config/config.py b/config/config.py
--- a/config/config.py 2018-11-22 21:49:01.886536931 +0100
+++ b/config/config.py 2018-11-22 22:29:21.497097833 +0100
@@ -27,8 +27,8 @@
self.GUI_LANG_FILE_LOC_PREFIX = "/config/lang/"
self.GUI_ICON_FILE_LOC_PREFIX = "/config/icons/"
self.GUI_IMG_FILE_LOC_PREFIX = "/config/img/"
- self.GUI_IMG_AVATAR_CACHE_PREFIX = "/config/.cache/"
- self.GUI_DEFAULTS_FILE_LOC_PREFIX = "/config/.defaults/"
+ self.GUI_IMG_AVATAR_CACHE_PREFIX = "/.local/share/mastodome/cache/"
+ self.GUI_DEFAULTS_FILE_LOC_PREFIX = "/.local/share/mastodome/defaults/"
self.GUI_TOOT_MAX_SIZE_CHARS = 280
self.APP_NAME = "Mastodome"
self.APP_VERSION = "0.2"
diff -ur a/config/icons_pics.py b/config/icons_pics.py
--- a/config/icons_pics.py 2018-11-22 21:49:01.887536915 +0100
+++ b/config/icons_pics.py 2018-11-22 21:52:57.149765632 +0100
@@ -28,7 +28,7 @@
class Icons:
def __init__(self):
config = Config()
- path = os.curdir + config.GUI_ICON_FILE_LOC_PREFIX
+ path = "/usr/share/mastodome" + config.GUI_ICON_FILE_LOC_PREFIX
self.btnHomeIcon = path + "home.svg"
self.btnLocalIcon = path + "local.svg"
self.btnPublicIcon = path + "public.svg"
@@ -49,7 +49,7 @@
class Pics:
def __init__(self):
config = Config()
- path = os.curdir + config.GUI_IMG_FILE_LOC_PREFIX
+ path = "/usr/share/mastodome" + config.GUI_IMG_FILE_LOC_PREFIX
self.loginLogoImg = path + "mastodon_logo.svg"
self.loginMascotImg = path + "mastodon_mascot.png"
self.aboutMascoutImg = path + "mastodome_art.png"
diff -ur a/config/translations.py b/config/translations.py
--- a/config/translations.py 2018-11-22 21:49:01.900536706 +0100
+++ b/config/translations.py 2018-11-22 21:52:32.099166922 +0100
@@ -31,7 +31,7 @@
def __init__(self):
config = Config()
self.translations = json.load(
- open(os.curdir + config.GUI_LANG_FILE_LOC_PREFIX
+ open("/usr/share/mastodome" + config.GUI_LANG_FILE_LOC_PREFIX
+ config.GUI_LANG + '.json'))
def load(self, control_name):
diff -ur a/rest/credential_store.py b/rest/credential_store.py
--- a/rest/credential_store.py 2018-11-22 21:49:01.901536690 +0100
+++ b/rest/credential_store.py 2018-11-22 21:58:18.485623649 +0100
@@ -33,7 +33,7 @@
self.secret_client_prefix = "csec"
self.secret_user_prefix = "usec"
self.config = Config()
- self.key_cache_location = os.curdir \
+ self.key_cache_location = os.getenv("HOME") \
+ self.config.GUI_DEFAULTS_FILE_LOC_PREFIX + "known-keys.txt"
def set_client_keys(self, domain, uname, client_id, client_secret):
diff -ur a/rest/fetch.py b/rest/fetch.py
--- a/rest/fetch.py 2018-11-22 21:49:01.901536690 +0100
+++ b/rest/fetch.py 2018-11-22 21:55:08.624660555 +0100
@@ -29,7 +29,7 @@
def clear_image_cache():
my_config = config.Config()
- path = os.curdir + my_config.GUI_IMG_AVATAR_CACHE_PREFIX
+ path = os.getenv("HOME") + my_config.GUI_IMG_AVATAR_CACHE_PREFIX
for the_file in os.listdir(path):
full_path = os.path.join(path, the_file)
if os.path.isfile(full_path):
@@ -38,7 +38,7 @@
def get_image(url):
my_config = config.Config()
- path = os.curdir + my_config.GUI_IMG_AVATAR_CACHE_PREFIX
+ path = os.getenv("HOME") + my_config.GUI_IMG_AVATAR_CACHE_PREFIX
filename = url.split('/')[-1]
if not os.path.isfile(os.path.join(path, filename)):

View File

@ -0,0 +1,8 @@
#!/bin/sh
if [[ ! -d ~/.local/share/mastodome ]]; then
mkdir -p ~/.local/share/mastodome/cache
cp -r /usr/share/mastodome/config/.defaults ~/.local/share/mastodome/defaults
fi
cd /usr/share/mastodome/
exec python3 ./mastodome.py "$@"

View File

@ -0,0 +1,58 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
#PYTHON_COMPAT=( python3_6 )
#inherit distutils-r1 gnome2-utils
if [[ "${PV}" == "9999" ]]; then
inherit git-r3
fi
MY_P="${PN}-v${PV}"
DESCRIPTION="Desktop client for Mastodon built on Python & Qt"
HOMEPAGE="https://gitlab.com/bobstechsite/mastodome"
if [[ "${PV}" == "9999" ]]; then
EGIT_REPO_URI="https://gitlab.com/bobstechsite/mastodome.git"
else
SRC_URI="https://gitlab.com/bobstechsite/mastodome/-/archive/v${PV}/${MY_P}.tar.bz2"
fi
LICENSE="GPL-3+"
SLOT="0"
if [[ "${PV}" == "9999" ]]; then
KEYWORDS=""
else
KEYWORDS="~amd64"
fi
IUSE=""
DEPEND="
dev-python/html2text
dev-python/PyQt5
dev-python/keyring
dev-python/mastodon
"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/0.2-modify-config-dirs.patch"
)
if [[ "${PV}" != "9999" ]]; then
S="${WORKDIR}/${MY_P}"
fi
src_install() {
default
insinto /usr/share/${PN}
doins -r config/ gui/ rest/ mastodome.py
cp "${FILESDIR}/mastodon_wrapper.sh" mastodome
dobin mastodome
}
pkg_postinst() {
einfo "This ebuild installs some files in non-standard directories and" \
"the program does not respect the XDG Base Directory Specification."
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>gentoo@tastytea.de</email>
<name>tastytea</name>
</maintainer>
<upstream>
<bugs-to>https://gitlab.com/bobstechsite/mastodome/issues</bugs-to>
</upstream>
</pkgmetadata>