forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
comix-4.0.4-r1.ebuild
78 lines (60 loc) · 1.79 KB
/
comix-4.0.4-r1.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
PYTHON_COMPAT=( python2_7 )
PLOCALES="ca cs es fr hr hu id ja ko pl pt_BR ru sv zh_CN zh_TW"
inherit eutils fdo-mime gnome2-utils l10n python-single-r1
DESCRIPTION="A GTK image viewer specifically designed to handle comic books"
HOMEPAGE="http://comix.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86 ~x86-fbsd"
IUSE="rar"
DEPEND="${PYTHON_DEPS}
dev-python/pillow[${PYTHON_USEDEP}]
>=dev-python/pygtk-2.12[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}
rar? ( || ( app-arch/unrar app-arch/rar ) )"
pkg_setup() {
python-single-r1_pkg_setup
}
src_prepare() {
l10n_find_plocales_changes messages "" "/LC_MESSAGES/comix.po"
epatch "${FILESDIR}/${P}-pillow.patch" #471522, https://sourceforge.net/p/comix/patches/50/
# do not install .pyc into /usr/share
local pythondir="$(python_get_sitedir)/comix"
pythondir="${pythondir#${EPREFIX}/usr/}"
sed -i -e "s:share/comix/src:${pythondir}:g" install.py || die
python_fix_shebang mime/comicthumb src/comix.py
}
src_install() {
dodir /usr
"${PYTHON}" install.py install --no-mime --dir "${D}"usr || die
insinto /usr/share/mime/packages
doins mime/comix.xml
insinto /etc/gconf/schemas
doins mime/comicbook.schemas
dobin mime/comicthumb
dodoc ChangeLog README
remove_locale() {
rm -r "${ED}/usr/share/locale/"$1 || die
}
l10n_for_each_disabled_locale_do remove_locale
}
pkg_preinst() {
gnome2_gconf_savelist
gnome2_icon_savelist
}
pkg_postinst() {
gnome2_gconf_install
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
gnome2_icon_cache_update
}
pkg_postrm() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
gnome2_icon_cache_update
}