blob: 635eeb52b2e8d13fa821ef0726218086c0dd0d9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Free Client for OneDrive on Linux"
HOMEPAGE="https://github.com/skilion/onedrive"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="
>=dev-db/sqlite-3.7.15:3
net-misc/curl
libnotify? ( x11-libs/libnotify )
"
DEPEND="
${RDEPEND}
virtual/pkgconfig
"
SRC_URI="https://codeload.github.com/abraunegg/onedrive/tar.gz/v${PV} -> ${P}.tar.gz"
DLANG_VERSION_RANGE="2.079-"
DLANG_PACKAGE_TYPE="single"
IUSE="debug libnotify"
inherit dlang systemd bash-completion-r1
src_prepare() {
mkdir .git
touch .git/HEAD .git/index
echo "v${PV}" > version
default_src_prepare
}
d_src_configure() {
# LDC is supported without wrapper
if [[ "${DLANG_VENDOR}" == "LDC" ]]; then
export DC=${DC}
export DCFLAGS=${DCFLAGS}
else
export DC=${DMD}
export DCFLAGS=${DMDFLAGS}
fi
econf --disable-version-check --enable-completions $(use_enable debug) $(use_enable libnotify notifications) \
--with-zsh-completion-dir=/usr/share/zsh/site-functions --with-bash-completion-dir="$(get_bashcompdir)" \
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
--with-systemduserunitdir="$(systemd_get_userunitdir)"
}
src_install() {
emake DESTDIR="${D}" docdir=/usr/share/doc/${PF} install
# log directory
keepdir /var/log/onedrive
fperms 775 /var/log/onedrive
fowners root:users /var/log/onedrive
# init script
dobin contrib/init.d/onedrive_service.sh
newinitd contrib/init.d/onedrive.init onedrive
}
pkg_postinst() {
elog "OneDrive Free Client needs to be authorized to access your data before the"
elog "first use. To do so, run onedrive in a terminal for the user in question and"
elog "follow the steps on screen."
elog
ewarn "The 'skilion' version contains a significant number of defect's in how the"
ewarn "local sync state is managed. When upgrading from the 'skilion' version to this"
ewarn "version, it is advisable to stop any service / onedrive process from running"
ewarn "and then remove your configuration directory (~/.config/onedrive/)."
}
|