You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-gfx/comix/comix-4.0.4-r1.ebuild

79 lines
1.9 KiB

# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/comix/comix-4.0.4-r1.ebuild,v 1.1 2013/08/15 02:43:36 tetromino Exp $
EAPI=5
PYTHON_COMPAT=( python{2_6,2_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}
virtual/python-imaging[${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
}