94 lines
2.5 KiB
Bash
94 lines
2.5 KiB
Bash
# Copyright 2018 Julian Ospald <hasufell@posteo.de>
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
require gtk-icon-cache desktop-utils
|
|
require systemd-service openrc-service [ openrc_confd_files=[ "${FILES}"/openrc/confd ] ]
|
|
|
|
SUMMARY="Dropbox daemon (pretends to be GUI-less)"
|
|
HOMEPAGE="https://www.dropbox.com/"
|
|
DOWNLOADS="
|
|
platform:x86? ( https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.x86-${PV}.tar.gz )
|
|
platform:amd64? ( https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.x86_64-${PV}.tar.gz )
|
|
"
|
|
|
|
LICENCES="CC-Attribution-NoDerivs-3.0 FTL MIT LGPL-2 openssl dropbox"
|
|
SLOT="0"
|
|
PLATFORMS="~amd64 ~x86"
|
|
MYOPTIONS="
|
|
platform:
|
|
amd64
|
|
x86
|
|
( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
|
|
"
|
|
RESTRICT="mirror strip"
|
|
|
|
DEPENDENCIES="
|
|
build:
|
|
dev-util/patchelf
|
|
run:
|
|
app-arch/bzip2
|
|
dev-lang/python:*[>=3]
|
|
dev-libs/glib:2
|
|
dev-libs/popt
|
|
media-libs/fontconfig
|
|
media-libs/freetype:2
|
|
net-misc/wget
|
|
sys-libs/ncurses[compat-libs]
|
|
sys-libs/zlib
|
|
x11-libs/libSM
|
|
x11-libs/libX11
|
|
x11-libs/libXinerama
|
|
x11-libs/libXxf86vm
|
|
x11-libs/pango[X]
|
|
x11-libs/qtbase:5
|
|
x11-libs/qtdeclarative:5
|
|
x11-libs/qtwebkit:5
|
|
x11-misc/wmctrl
|
|
x11-themes/hicolor-icon-theme
|
|
providers:ijg-jpeg? ( media-libs/jpeg:= )
|
|
providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
|
|
"
|
|
|
|
BUGS_TO="hasufell@posteo"
|
|
|
|
pkg_setup() {
|
|
exdirectory --allow /opt
|
|
}
|
|
|
|
src_unpack() {
|
|
default
|
|
edo mkdir "${WORK}"
|
|
edo mv "${WORKBASE}"/.dropbox-dist/* "${WORK}"/
|
|
edo mv "${WORK}"/dropbox-lnx.*-${PV}/* "${WORK}"
|
|
edo rmdir "${WORK}"/dropbox-lnx.*-${PV}/
|
|
edo rmdir .dropbox-dist
|
|
}
|
|
|
|
src_prepare() {
|
|
# remove some bundled stuff
|
|
edo rm -v libGL.so.1 libX11* libdrm.so.2 libffi.so.6 libpopt.so.0 wmctrl
|
|
|
|
edo patchelf --set-rpath '$ORIGIN' librsyncffi.compiled._librsyncffi*.so
|
|
}
|
|
|
|
src_install() {
|
|
local installdir="/opt/dropbox"
|
|
|
|
insinto "${installdir}"
|
|
doins -r *
|
|
chmod a+x "${IMAGE}${installdir}"/{dropbox,dropbox_py3,dropboxd}
|
|
dodir /usr/$(exhost --target)/bin
|
|
dosym "../../../${installdir}/dropboxd" "/usr/$(exhost --target)/bin/dropbox"
|
|
|
|
insinto /usr/share/icons/hicolor/16x16/status
|
|
doins images/hicolor/16x16/status/*
|
|
|
|
install_desktop_entry "Name=Dropbox"
|
|
|
|
install_systemd_files
|
|
install_openrc_files
|
|
|
|
dodoc README ACKNOWLEDGEMENTS
|
|
}
|
|
|