dropbox-20.3.18.ebuild 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit eutils gnome2-utils pax-utils systemd python-single-r1
  6. DESCRIPTION="Dropbox daemon (pretends to be GUI-less)"
  7. HOMEPAGE="http://dropbox.com/"
  8. SRC_URI="
  9. x86? ( https://dl.dropboxusercontent.com/u/17/dropbox-lnx.x86-${PV}.tar.gz )
  10. amd64? ( https://dl.dropboxusercontent.com/u/17/dropbox-lnx.x86_64-${PV}.tar.gz )"
  11. LICENSE="CC-BY-ND-3.0 FTL MIT LGPL-2 openssl dropbox"
  12. SLOT="0"
  13. KEYWORDS="amd64 x86 ~x86-linux"
  14. IUSE="+librsync-bundled selinux X"
  15. RESTRICT="mirror strip"
  16. QA_PREBUILT="opt/.*"
  17. QA_EXECSTACK="opt/dropbox/dropbox"
  18. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  19. DEPEND="librsync-bundled? ( dev-util/patchelf )"
  20. # Be sure to have GLIBCXX_3.4.9, #393125
  21. # USE=X require wxGTK's dependencies. system-library cannot be used due to
  22. # missing symbol (CtlColorEvent). #443686
  23. RDEPEND="${PYTHON_DEPS}
  24. X? (
  25. dev-libs/glib:2
  26. dev-qt/qtcore:5
  27. dev-qt/qtdbus:5
  28. dev-qt/qtdeclarative:5
  29. dev-qt/qtgui:5[-gles2,xcb]
  30. dev-qt/qtopengl:5[-gles2]
  31. dev-qt/qtnetwork:5
  32. dev-qt/qtprintsupport:5[-gles2]
  33. dev-qt/qtwebkit:5
  34. dev-qt/qtwidgets:5[-gles2]
  35. media-libs/fontconfig
  36. media-libs/freetype
  37. virtual/jpeg
  38. x11-libs/libSM
  39. x11-libs/libX11
  40. x11-libs/libXinerama
  41. x11-libs/libXxf86vm
  42. x11-libs/pango[X]
  43. x11-misc/wmctrl
  44. x11-themes/hicolor-icon-theme
  45. )
  46. !librsync-bundled? ( <net-libs/librsync-2 )
  47. selinux? ( sec-policy/selinux-dropbox )
  48. app-arch/bzip2
  49. dev-libs/popt
  50. net-misc/wget
  51. >=sys-devel/gcc-4.2.0
  52. sys-libs/zlib
  53. || (
  54. sys-libs/ncurses:5/5
  55. sys-libs/ncurses:0/5
  56. )"
  57. src_unpack() {
  58. unpack ${A}
  59. mkdir -p "${S}" || die
  60. mv "${WORKDIR}"/.dropbox-dist/* "${S}" || die
  61. mv "${S}"/dropbox-lnx.*-${PV}/* "${S}" || die
  62. rmdir "${S}"/dropbox-lnx.*-${PV}/ || die
  63. rmdir .dropbox-dist || die
  64. }
  65. src_prepare() {
  66. local target=(
  67. cryptography-1.0-py2.7-*.egg
  68. dropbox_sqlite_ext-0.0-py2.7.egg
  69. setuptools-20.3-py2.7.egg
  70. )
  71. eapply_user
  72. rm -vf libbz2* libpopt.so.0 libpng12.so.0 || die
  73. rm -vf libdrm.so.2 libffi.so.6 libGL.so.1 libX11* || die
  74. rm -vf libQt5* libicu* qt.conf || die
  75. rm -vrf wmctrl plugins/ || die
  76. if use X ; then
  77. mv images/hicolor/16x16/status "${T}" || die
  78. else
  79. rm -vrf PyQt5* *pyqt5* images || die
  80. fi
  81. if use librsync-bundled ; then
  82. patchelf --set-rpath '$ORIGIN' librsyncffi.compiled._librsyncffi.so* || die
  83. else
  84. rm -vf librsync.so.1 || die
  85. fi
  86. mv ${target[@]} "${T}" || die
  87. rm -rf *.egg library.zip || die
  88. (cd "${T}"; mv ${target[@]} "${S}") || die
  89. ln -s dropbox library.zip || die
  90. pax-mark cm dropbox
  91. mv README ACKNOWLEDGEMENTS "${T}" || die
  92. }
  93. src_install() {
  94. local targetdir="/opt/dropbox"
  95. insinto "${targetdir}"
  96. doins -r *
  97. fperms a+x "${targetdir}"/{dropbox,dropboxd}
  98. dosym "${targetdir}/dropboxd" "/opt/bin/dropbox"
  99. use X && doicon -s 16 -c status "${T}"/status
  100. make_desktop_entry "${PN}" "Dropbox"
  101. newinitd "${FILESDIR}"/dropbox.initd dropbox
  102. newconfd "${FILESDIR}"/dropbox.conf dropbox
  103. systemd_newunit "${FILESDIR}"/dropbox_at.service "dropbox@.service"
  104. dodoc "${T}"/{README,ACKNOWLEDGEMENTS}
  105. }
  106. pkg_preinst() {
  107. gnome2_icon_savelist
  108. }
  109. pkg_postinst() {
  110. gnome2_icon_cache_update
  111. }
  112. pkg_postrm() {
  113. gnome2_icon_cache_update
  114. }