Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PYTHON_COMPAT=( python3+ )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_SINGLE_IMPL=1

inherit git-r3 distutils-r1 waf-utils xdg-utils gnome2-utils

DESCRIPTION="Time tracking for the masses"
HOMEPAGE="http://projecthamster.wordpress.com"
EGIT_REPO_URI="https://github.com/projecthamster/hamster.git"
EGIT_COMMIT="v${PV}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE=""

RDEPEND="
gnome-base/gconf[introspection]
dev-python/pyxdg
$(python_gen_cond_dep '
dev-python/requests[${PYTHON_MULTI_USEDEP}]
')
"
DEPEND="${RDEPEND}
dev-util/glib-utils
dev-util/intltool"

src_unpack() {
git-r3_src_unpack
}

src_prepare() {
# Fix python2 legacy
sed -i -e 's:python2:python:g' po/wscript || die "Error on fix wscript"
sed -i -e 's:python2:python:g' setup.py || die "Error on fix setup.py"
# Disable update of the icon cache. I will do it directly.
sed -i -e 's:bld.add_post_fun:#bld.add_post_fun:g' wscript || die "Error on block update of the icons cache"

# Disable gtk-update from installer to avoid issue with sandkbox
sed -i -e 's:gtk-update-icon-cache -q -f -t:echo:g' data/wscript || die "Error on disable gtk-update-icon-cache"

python_fix_shebang .
distutils-r1_src_prepare
}

src_configure() {
local mywafconfargs=(
--prefix=/usr
--datadir=/usr/share
)
waf-utils_src_configure ${mywafconfargs[@]}
}

src_install() {
waf-utils_src_install
dosym /usr/bin/hamster /usr/bin/hamster-service

rm -rf ${D}/usr/share/glib-2.0/schemas/gschemas.compiled || die "Error on remove glib-2.0 schemas"
# glib-compile-schemas /usr/share/glib-2.0/schemas
}

pkg_postinst() {
xdg_icon_cache_update
gnome2_schemas_update
}

pkg_postrm() {
xdg_icon_cache_update
gnome2_schemas_update
}