| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gdesklets-core/gdesklets-core-0.36.3-r3.ebuild,v 1.13 2012/06/17 11:36:28 ssuominen Exp $
|
| 4 |
|
| 5 |
EAPI=3
|
| 6 |
# desklets don't run with USE=debug
|
| 7 |
GCONF_DEBUG=no
|
| 8 |
PYTHON_USE_WITH=xml
|
| 9 |
PYTHON_DEPEND="2:2.5"
|
| 10 |
|
| 11 |
inherit gnome2 python eutils autotools multilib bash-completion-r1
|
| 12 |
|
| 13 |
MY_PN=${PN/-core}
|
| 14 |
MY_P=${MY_PN}-${PV}
|
| 15 |
S=${WORKDIR}/${MY_P}
|
| 16 |
|
| 17 |
DESCRIPTION="GNOME Desktop Applets: Core library for desktop applets"
|
| 18 |
SRC_URI="http://gdesklets.de/files/${MY_P}.tar.bz2"
|
| 19 |
HOMEPAGE="http://gdesklets.de"
|
| 20 |
LICENSE="GPL-2"
|
| 21 |
|
| 22 |
SLOT="0"
|
| 23 |
IUSE="dbus"
|
| 24 |
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
|
| 25 |
|
| 26 |
# is libgsf needed for runtime or just compiling?
|
| 27 |
# only need expat for python-2.4, I think
|
| 28 |
RDEPEND=">=dev-libs/glib-2
|
| 29 |
>=gnome-base/librsvg-2.8
|
| 30 |
>=gnome-base/libgtop-2.8.2
|
| 31 |
>=dev-python/pygtk-2.10
|
| 32 |
>=dev-python/libbonobo-python-2.6
|
| 33 |
>=dev-python/gconf-python-2.6
|
| 34 |
>=dev-python/pygobject-2.6:2
|
| 35 |
>=dev-python/pyorbit-2.0.1
|
| 36 |
|| ( >=dev-python/gnome-vfs-python-2.6 >=dev-python/libgnome-python-2.6 )
|
| 37 |
>=dev-libs/expat-1.95.8
|
| 38 |
dbus? ( dev-python/dbus-python )"
|
| 39 |
DEPEND="${RDEPEND}
|
| 40 |
dev-util/intltool
|
| 41 |
sys-devel/gettext
|
| 42 |
virtual/pkgconfig"
|
| 43 |
|
| 44 |
DOCS="AUTHORS ChangeLog NEWS README TODO"
|
| 45 |
CONVERT_SHEBANGS="ctrlinfo gdesklets gdesklets-daemon gdesklets-logview \
|
| 46 |
gdesklets-shell test-control.py contrib/gdesklets-migration-tool"
|
| 47 |
|
| 48 |
pkg_setup() {
|
| 49 |
python_set_active_version 2
|
| 50 |
python_pkg_setup
|
| 51 |
}
|
| 52 |
|
| 53 |
src_prepare() {
|
| 54 |
epatch \
|
| 55 |
"${FILESDIR}"/${P}-.in-files.patch \
|
| 56 |
"${FILESDIR}"/${P}-CFLAGS.patch
|
| 57 |
|
| 58 |
# Postpone pyc compiling until pkg_postinst
|
| 59 |
>py-compile
|
| 60 |
|
| 61 |
python_convert_shebangs 2 ${CONVERT_SHEBANGS}
|
| 62 |
|
| 63 |
eautoreconf
|
| 64 |
|
| 65 |
gnome2_src_prepare
|
| 66 |
}
|
| 67 |
|
| 68 |
src_install() {
|
| 69 |
gnome2_src_install
|
| 70 |
|
| 71 |
# Install bash completion script
|
| 72 |
dobashcomp contrib/bash/gdesklets
|
| 73 |
|
| 74 |
# Install the gdesklets-control-getid script
|
| 75 |
insinto /usr/$(get_libdir)/gdesklets
|
| 76 |
insopts -m0555
|
| 77 |
doins "${FILESDIR}"/gdesklets-control-getid
|
| 78 |
}
|
| 79 |
|
| 80 |
pkg_postinst() {
|
| 81 |
gnome2_pkg_postinst
|
| 82 |
python_need_rebuild
|
| 83 |
# Compile pyc files on target system
|
| 84 |
python_mod_optimize /usr/$(get_libdir)/gdesklets
|
| 85 |
|
| 86 |
echo
|
| 87 |
elog "gDesklets Displays are required before the library"
|
| 88 |
elog "will be usable. Core Displays (Calendar, Clock, Quote-of-the-Day,"
|
| 89 |
elog "and the 15pieces game) are already installed in"
|
| 90 |
elog " ${ROOT}usr/$(get_libdir)/gdesklets/Displays"
|
| 91 |
elog "Additional Displays can be found in -"
|
| 92 |
elog " x11-plugins/desklet-* ,"
|
| 93 |
elog "at http://www.gdesklets.de, or at http://archive.gdesklets.info"
|
| 94 |
elog
|
| 95 |
elog "Next you'll need to start gDesklets using"
|
| 96 |
elog " ${ROOT}usr/bin/gdesklets start"
|
| 97 |
elog "If you're using GNOME this can be done conveniently through"
|
| 98 |
elog "Applications->Accessories->gDesklets or automatically each login"
|
| 99 |
elog "under System->Preferences->Sessions"
|
| 100 |
elog
|
| 101 |
elog "If you're updating from a version less than 0.35_rc1,"
|
| 102 |
elog "you can migrate your desklet configurations by"
|
| 103 |
elog "running"
|
| 104 |
elog " ${ROOT}usr/$(get_libdir)/gdesklets/contrib/gdesklets-migration-tool"
|
| 105 |
elog "after the first time you run gDesklets"
|
| 106 |
elog
|
| 107 |
}
|
| 108 |
|
| 109 |
pkg_postrm() {
|
| 110 |
gnome2_pkg_postrm
|
| 111 |
# Cleanup after our cavalier python compilation
|
| 112 |
# The function takes care of ${ROOT} for us
|
| 113 |
python_mod_cleanup /usr/$(get_libdir)/gdesklets
|
| 114 |
}
|