nautilus-dropbox-1.6.2.ebuild 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. GNOME2_LA_PUNT="yes"
  5. PYTHON_COMPAT=( python2_7 )
  6. inherit autotools eutils python-r1 linux-info gnome2 readme.gentoo user
  7. DESCRIPTION="Store, Sync and Share Files Online"
  8. HOMEPAGE="http://www.dropbox.com/"
  9. SRC_URI="http://www.dropbox.com/download?dl=packages/${P}.tar.bz2"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
  13. IUSE="debug"
  14. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  15. RDEPEND="${PYTHON_DEPS}
  16. gnome-base/nautilus
  17. dev-libs/glib:2
  18. dev-python/pygtk:2[${PYTHON_USEDEP}]
  19. net-misc/dropbox
  20. x11-libs/gtk+:2
  21. x11-libs/libnotify
  22. x11-libs/libXinerama"
  23. DEPEND="${RDEPEND}
  24. virtual/pkgconfig
  25. dev-python/docutils[${PYTHON_USEDEP}]"
  26. CONFIG_CHECK="~INOTIFY_USER"
  27. pkg_setup () {
  28. check_extra_config
  29. enewgroup dropbox
  30. DOC_CONTENTS="Add any users who wish to have access to the dropbox nautilus
  31. plugin to the group 'dropbox'. You need to setup a drobox account
  32. before using this plugin. Visit ${HOMEPAGE} for more information."
  33. python_export_best
  34. }
  35. src_prepare() {
  36. G2CONF="${G2CONF} $(use_enable debug) --disable-static"
  37. gnome2_src_prepare
  38. # use sysem dropbox
  39. sed \
  40. -e "s|~/[.]dropbox-dist|${EPREFIX}/opt/dropbox|" \
  41. -e "s|\(DROPBOXD_PATH = \).*|\1\"${EPREFIX}/opt/dropbox/dropboxd\"|" \
  42. -i dropbox.in || die
  43. # us system rst2man
  44. epatch "${FILESDIR}"/${PN}-0.7.0-system-rst2man.patch
  45. sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.in || die
  46. AT_NOELIBTOOLIZE=yes eautoreconf
  47. }
  48. src_install () {
  49. gnome2_src_install
  50. local extensiondir="$(pkg-config --variable=extensiondir libnautilus-extension)"
  51. [ -z ${extensiondir} ] && die "pkg-config unable to get nautilus extensions dir"
  52. # Strip $EPREFIX from $extensiondir as fowners/fperms act on $ED not $D
  53. extensiondir="${extensiondir#${EPREFIX}}"
  54. use prefix || fowners root:dropbox "${extensiondir}"/libnautilus-dropbox.so
  55. fperms o-rwx "${extensiondir}"/libnautilus-dropbox.so
  56. readme.gentoo_create_doc
  57. python_replicate_script "${ED}"/usr/bin/dropbox
  58. }
  59. pkg_postinst () {
  60. gnome2_pkg_postinst
  61. readme.gentoo_print_elog
  62. }