aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Horodniceanu <a.horodniceanu@proton.me>2024-03-09 20:21:26 +0200
committerAndrei Horodniceanu <a.horodniceanu@proton.me>2024-04-14 01:47:31 +0300
commit75b3199f36a6afae6162ee4eb54716ed9fd1e09d (patch)
treee27dc1b1701ba7060b10d6cbe92ff9d14931e960
parentdev-util/dscanner: port to dlang-single.eclass (diff)
downloaddlang-75b3199f36a6afae6162ee4eb54716ed9fd1e09d.tar.gz
dlang-75b3199f36a6afae6162ee4eb54716ed9fd1e09d.tar.bz2
dlang-75b3199f36a6afae6162ee4eb54716ed9fd1e09d.zip
net-misc/onedrive: port to dlang-single.eclass
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
-rw-r--r--net-misc/onedrive/onedrive-2.4.25-r1.ebuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/net-misc/onedrive/onedrive-2.4.25-r1.ebuild b/net-misc/onedrive/onedrive-2.4.25-r1.ebuild
new file mode 100644
index 0000000..668b493
--- /dev/null
+++ b/net-misc/onedrive/onedrive-2.4.25-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Free Client for OneDrive on Linux"
+HOMEPAGE="https://abraunegg.github.io/"
+LICENSE="GPL-3"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+SRC_URI="https://codeload.github.com/abraunegg/onedrive/tar.gz/v${PV} -> ${P}.tar.gz"
+IUSE="debug libnotify"
+
+DLANG_COMPAT=( dmd-2_{106..107} ldc2-1_{35..36} )
+
+inherit dlang-single systemd bash-completion-r1
+
+REQUIRED_USE=${DLANG_REQUIRED_USE}
+RDEPEND="
+ ${DLANG_DEPS}
+ >=dev-db/sqlite-3.7.15:3
+ net-misc/curl
+ libnotify? ( x11-libs/libnotify )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+BDEPEND=${DLANG_DEPS}
+
+src_configure() {
+ DCFLAGS="${DCFLAGS} ${DLANG_LDFLAGS}" 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-fish-completion-dir=/usr/share/fish/completions \
+ --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 "When upgrading from 2.3 you are required to reauthorise your client."
+ ewarn "This is due to changing the client identifier to assist with resolving"
+ ewarn "the correct handling of 429 error responses (activityLimitReached)"
+}