1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
7 inherit eutils gnome2-utils pax-utils systemd python-single-r1
9 DESCRIPTION="Dropbox daemon (pretends to be GUI-less)"
10 HOMEPAGE="http://dropbox.com/"
12 x86? ( https://dl.dropboxusercontent.com/u/17/dropbox-lnx.x86-${PV}.tar.gz )
13 amd64? ( https://dl.dropboxusercontent.com/u/17/dropbox-lnx.x86_64-${PV}.tar.gz )"
15 LICENSE="CC-BY-ND-3.0 FTL MIT LGPL-2 openssl dropbox"
17 KEYWORDS="~amd64 ~x86 ~x86-linux"
18 IUSE="+librsync-bundled selinux X"
19 RESTRICT="mirror strip"
22 QA_EXECSTACK="opt/dropbox/dropbox"
24 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
26 DEPEND="librsync-bundled? ( dev-util/patchelf )"
28 # Be sure to have GLIBCXX_3.4.9, #393125
29 # USE=X require wxGTK's dependencies. system-library cannot be used due to
30 # missing symbol (CtlColorEvent). #443686
31 RDEPEND="${PYTHON_DEPS}
36 dev-qt/qtdeclarative:5
37 dev-qt/qtgui:5[-gles2,xcb]
38 dev-qt/qtopengl:5[-gles2]
40 dev-qt/qtprintsupport:5[-gles2]
42 dev-qt/qtwidgets:5[-gles2]
52 x11-themes/hicolor-icon-theme
54 !librsync-bundled? ( <net-libs/librsync-2 )
55 selinux? ( sec-policy/selinux-dropbox )
68 mkdir -p "${S}" || die
69 mv "${WORKDIR}"/.dropbox-dist/* "${S}" || die
70 mv "${S}"/dropbox-lnx.*-${PV}/* "${S}" || die
71 rmdir "${S}"/dropbox-lnx.*-${PV}/ || die
72 rmdir .dropbox-dist || die
78 rm -vf libbz2* libpopt.so.0 libpng12.so.0 || die
79 rm -vf libdrm.so.2 libffi.so.6 libGL.so.1 libX11* || die
80 rm -vf libQt5* libicu* qt.conf || die
81 rm -vrf wmctrl plugins/ || die
83 mv images/hicolor/16x16/status "${T}" || die
85 rm -vrf PyQt5* *pyqt5* images || die
87 if use librsync-bundled ; then
88 patchelf --set-rpath '$ORIGIN' librsyncffi.compiled._librsyncffi.so* || die
90 rm -vf librsync.so.1 || die
92 rm -rf *.egg library.zip || die
93 ln -s dropbox library.zip || die
95 mv README ACKNOWLEDGEMENTS "${T}" || die
99 local targetdir="/opt/dropbox"
101 insinto "${targetdir}"
103 fperms a+x "${targetdir}"/{dropbox,dropboxd}
104 dosym "${targetdir}/dropboxd" "/opt/bin/dropbox"
106 use X && doicon -s 16 -c status "${T}"/status
108 make_desktop_entry "${PN}" "Dropbox"
110 newinitd "${FILESDIR}"/dropbox.initd dropbox
111 newconfd "${FILESDIR}"/dropbox.conf dropbox
112 systemd_newunit "${FILESDIR}"/dropbox_at.service-r1 "dropbox@.service"
114 dodoc "${T}"/{README,ACKNOWLEDGEMENTS}
122 gnome2_icon_cache_update
126 gnome2_icon_cache_update