gtg-0.3.1.ebuild 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit eutils fdo-mime gnome2-utils distutils-r1 versionator
  6. MY_PV="$(get_version_component_range 1-2)"
  7. DESCRIPTION="Personal organizer for the GNOME desktop environment"
  8. HOMEPAGE="http://gtgnome.net/"
  9. SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${P}.tar.gz"
  10. LICENSE="GPL-3"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE=""
  14. RDEPEND="
  15. dev-python/configobj[${PYTHON_USEDEP}]
  16. dev-python/dbus-python[${PYTHON_USEDEP}]
  17. dev-python/liblarch[${PYTHON_USEDEP}]
  18. dev-python/notify-python[${PYTHON_USEDEP}]
  19. dev-python/pycairo[${PYTHON_USEDEP}]
  20. dev-python/pygobject:2[${PYTHON_USEDEP}]
  21. dev-python/pygtk[${PYTHON_USEDEP}]
  22. dev-python/python-dateutil[${PYTHON_USEDEP}]
  23. dev-python/pyxdg[${PYTHON_USEDEP}]
  24. dev-python/simplejson[${PYTHON_USEDEP}]
  25. "
  26. DEPEND="${RDEPEND}"
  27. python_prepare_all() {
  28. # Plugins are voluntarily left automagic as application has a nice way
  29. # to suggest missing dependencies. We only remove the ones that cannot
  30. # work on gentoo.
  31. # Backends should be enabled via USE flag when pulling extra deps
  32. # geoloc: uses removed from tree bindings
  33. sed -e "/GTG.plugins.geolocalized_tasks',/d" \
  34. -e "/geolocalized-tasks.gtg-plugin/d" \
  35. -i setup.py || die
  36. # launchpad: missing dependency
  37. # evolution: missing python-r1 support
  38. rm GTG/backends/backend_launchpad.py \
  39. GTG/backends/backend_evolution.py \
  40. || die
  41. # Respect LINGUAS
  42. epatch "${FILESDIR}"/${PN}-0.3.1-locales.patch
  43. # Fix validation warning
  44. epatch "${FILESDIR}"/${PN}-0.3.1-desktop.patch
  45. distutils-r1_python_prepare_all
  46. }
  47. pkg_preinst() {
  48. gnome2_icon_savelist
  49. }
  50. pkg_postinst() {
  51. fdo-mime_desktop_database_update
  52. fdo-mime_mime_database_update
  53. gnome2_icon_cache_update
  54. }
  55. pkg_postrm() {
  56. fdo-mime_desktop_database_update
  57. fdo-mime_mime_database_update
  58. gnome2_icon_cache_update
  59. }