mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
net/onedrive: update to 2.4.3
PR: 245805 Submitted by: Hiroo Ono <hiroo.ono+freebsd@gmail.com> (maintainer)
This commit is contained in:
parent
0dc36c0e86
commit
d9ff33e30b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=543628
9 changed files with 124 additions and 91 deletions
|
@ -2,62 +2,45 @@
|
||||||
|
|
||||||
PORTNAME= onedrive
|
PORTNAME= onedrive
|
||||||
DISTVERSIONPREFIX= v
|
DISTVERSIONPREFIX= v
|
||||||
DISTVERSION= 2.3.3
|
DISTVERSION= 2.4.3
|
||||||
PORTREVISION= 1
|
|
||||||
CATEGORIES= net
|
CATEGORIES= net
|
||||||
|
|
||||||
MAINTAINER= hiroo.ono+freebsd@gmail.com
|
MAINTAINER= hiroo.ono+freebsd@gmail.com
|
||||||
COMMENT= OneDrive Free client
|
COMMENT= OneDrive Free client
|
||||||
|
|
||||||
LICENSE= GPLv3
|
LICENSE= GPLv3
|
||||||
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||||
|
|
||||||
LIB_DEPENDS= libcurl.so:ftp/curl \
|
LIB_DEPENDS= libcurl.so:ftp/curl \
|
||||||
libinotify.so:devel/libinotify
|
libinotify.so:devel/libinotify
|
||||||
BUILD_DEPENDS= ldc2:lang/ldc
|
BUILD_DEPENDS= ldc2:lang/ldc
|
||||||
RUN_DEPENDS= ${LOCALBASE}/sbin/logrotate:sysutils/logrotate
|
RUN_DEPENDS= ${LOCALBASE}/sbin/logrotate:sysutils/logrotate
|
||||||
|
|
||||||
USES= gmake pkgconfig sqlite
|
USES= autoreconf gmake pkgconfig sqlite
|
||||||
USE_GITHUB= yes
|
USE_GITHUB= yes
|
||||||
GH_ACCOUNT= abraunegg
|
GH_ACCOUNT= abraunegg
|
||||||
|
|
||||||
|
GNU_CONFIGURE= yes
|
||||||
PKGCONFIG= pkgconf
|
PKGCONFIG= pkgconf
|
||||||
MAKE_ARGS= DC=ldc2
|
|
||||||
INSTALL_TARGET= install.noservice
|
|
||||||
|
|
||||||
OPTIONS_DEFINE= DOCS NOTIFY BASH ZSH
|
OPTIONS_DEFINE= NOTIFY COMPLETION
|
||||||
OPTIONS_DEFAULT= DOCS NOTIFY BASH ZSH
|
OPTIONS_DEFAULT= NOTIFY COMPLETION
|
||||||
OPTIONS_SUB= yes
|
OPTIONS_SUB= yes
|
||||||
|
|
||||||
DOCFILES= README.md README.Office365.md config CHANGELOG.md
|
NOTIFY_CONFIGURE_ENABLE= notifications
|
||||||
|
|
||||||
NOTIFY_VARS= NOTIFICATIONS=1
|
|
||||||
NOTIFY_USES= gnome
|
NOTIFY_USES= gnome
|
||||||
NOTIFY_USE= GNOME=glib20
|
NOTIFY_USE= GNOME=glib20,gdkpixbuf2
|
||||||
NOTIFY_LIB_DEPENDS= libnotify.so:devel/libnotify
|
NOTIFY_LIB_DEPENDS= libnotify.so:devel/libnotify
|
||||||
|
|
||||||
BASH_COMPLETION_DIR= ${LOCALBASE}/share/bash-completion/completions
|
COMPLETION_DESC= Install completion for BASH and ZSH
|
||||||
ZSH_COMPLETION_DIR= ${LOCALBASE}/share/zsh/site-functions
|
COMPLETION_CONFIGURE_ENABLE= completions
|
||||||
|
|
||||||
|
ONEDRIVE_LOGDIR= /var/log/${PORTNAME}
|
||||||
|
|
||||||
post-extract:
|
post-extract:
|
||||||
${CP} ${FILESDIR}/freebsd_inotify.d ${WRKSRC}/src
|
${CP} ${FILESDIR}/freebsd_inotify.d ${WRKSRC}/src
|
||||||
|
|
||||||
do-install-DOCS-on:
|
post-install:
|
||||||
.for f in ${DOCFILES}
|
${INSTALL} -d -m 0775 ${STAGEDIR}${ONEDRIVE_LOGDIR}
|
||||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
||||||
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
|
|
||||||
.endfor
|
|
||||||
|
|
||||||
do-install-BASH-on:
|
|
||||||
@${MKDIR} ${STAGEDIR}${BASH_COMPLETION_DIR}
|
|
||||||
${INSTALL_DATA} ${WRKSRC}/completions/complete.bash \
|
|
||||||
${STAGEDIR}${BASH_COMPLETION_DIR}/onedrive
|
|
||||||
|
|
||||||
do-install-ZSH-on:
|
|
||||||
@${MKDIR} ${STAGEDIR}${ZSH_COMPLETION_DIR}
|
|
||||||
${INSTALL_DATA} ${WRKSRC}/completions/complete.zsh \
|
|
||||||
${STAGEDIR}${ZSH_COMPLETION_DIR}/_onedrive
|
|
||||||
|
|
||||||
post-install-DOCS-on:
|
|
||||||
${INSTALL_MAN} ${WRKSRC}/onedrive.1 ${STAGEDIR}${MANPREFIX}/man/man1
|
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
TIMESTAMP = 1556052070
|
TIMESTAMP = 1594652822
|
||||||
SHA256 (abraunegg-onedrive-v2.3.3_GH0.tar.gz) = 9ee4ea4b3ea880f7624761d053bbb09a2465706685e9ed258c50925ff5e32377
|
SHA256 (abraunegg-onedrive-v2.4.3_GH0.tar.gz) = 4236f436b3658e360164d945a8bc5c9620539c1339ef9182e3d060d2e3b90b9b
|
||||||
SIZE (abraunegg-onedrive-v2.3.3_GH0.tar.gz) = 599457
|
SIZE (abraunegg-onedrive-v2.4.3_GH0.tar.gz) = 959963
|
||||||
|
|
|
@ -50,6 +50,7 @@ enum IN_MASK_ADD = 0x20000000; /* Add to the mask of an already
|
||||||
enum IN_ISDIR = 0x40000000; /* Event occurred against dir. */
|
enum IN_ISDIR = 0x40000000; /* Event occurred against dir. */
|
||||||
enum IN_ONESHOT = 0x80000000; /* Only send event once. */
|
enum IN_ONESHOT = 0x80000000; /* Only send event once. */
|
||||||
|
|
||||||
|
enum IN_ALL_EVENTS = (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | IN_MOVE_SELF | IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF);
|
||||||
|
|
||||||
/* Create and initialize inotify-kqueue instance. */
|
/* Create and initialize inotify-kqueue instance. */
|
||||||
extern (C) int inotify_init ();
|
extern (C) int inotify_init ();
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
--- Makefile.orig 2019-04-16 02:18:26 UTC
|
|
||||||
+++ Makefile
|
|
||||||
@@ -7,8 +7,9 @@ gitversion := $(shell if [ -f .git/HEAD ] ; then echo
|
|
||||||
|
|
||||||
ifeq ($(pkgconfig),1)
|
|
||||||
LIBS = $(shell pkg-config --libs sqlite3 libcurl)
|
|
||||||
+LIBS += $(shell pkg-config --libs libinotify)
|
|
||||||
else
|
|
||||||
-LIBS = -lcurl -lsqlite3
|
|
||||||
+LIBS = -lcurl -lsqlite3 -linotify
|
|
||||||
endif
|
|
||||||
ifeq ($(notifications),1)
|
|
||||||
NOTIF_VERSIONS = -version=NoPragma -version=NoGdk -version=Notifications
|
|
||||||
@@ -74,7 +75,8 @@ SOURCES = \
|
|
||||||
src/sync.d \
|
|
||||||
src/upload.d \
|
|
||||||
src/util.d \
|
|
||||||
- src/progress.d
|
|
||||||
+ src/progress.d \
|
|
||||||
+ src/freebsd_inotify.d
|
|
||||||
|
|
||||||
ifeq ($(notifications),1)
|
|
||||||
SOURCES += src/notifications/notify.d src/notifications/dnotify.d
|
|
||||||
@@ -90,11 +92,12 @@ onedrive: version $(SOURCES)
|
|
||||||
|
|
||||||
install.noservice: onedrive onedrive.1
|
|
||||||
mkdir -p $(DESTDIR)/var/log/onedrive
|
|
||||||
- chown root.users $(DESTDIR)/var/log/onedrive
|
|
||||||
+ # chown root.users $(DESTDIR)/var/log/onedrive
|
|
||||||
chmod 0775 $(DESTDIR)/var/log/onedrive
|
|
||||||
- install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive
|
|
||||||
- install -D onedrive.1 $(DESTDIR)$(MANDIR)/onedrive.1
|
|
||||||
- install -D -m 644 logrotate/onedrive.logrotate $(DESTDIR)/etc/logrotate.d/onedrive
|
|
||||||
+ install onedrive $(DESTDIR)$(PREFIX)/bin/onedrive
|
|
||||||
+ # install -D onedrive.1 $(DESTDIR)$(MANDIR)/onedrive.1
|
|
||||||
+ install -d $(DESTDIR)$(PREFIX)/etc/logrotate.d
|
|
||||||
+ install -m 644 logrotate/onedrive.logrotate $(DESTDIR)$(PREFIX)/etc/logrotate.d/onedrive
|
|
||||||
|
|
||||||
install: all install.noservice
|
|
||||||
for i in $(DOCFILES) ; do install -D -m 644 $$i $(DESTDIR)$(DOCDIR)/$$i ; done
|
|
61
net/onedrive/files/patch-Makefile.in
Normal file
61
net/onedrive/files/patch-Makefile.in
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
--- Makefile.in.orig 2020-07-13 17:07:56 UTC
|
||||||
|
+++ Makefile.in
|
||||||
|
@@ -25,6 +25,7 @@ systemdsystemunitdir = @systemdsystemunitdir@
|
||||||
|
curl_LIBS = @curl_LIBS@
|
||||||
|
sqlite_LIBS = @sqlite_LIBS@
|
||||||
|
notify_LIBS = @notify_LIBS@
|
||||||
|
+inotify_LIBS = @inotify_LIBS@
|
||||||
|
COMPLETIONS = @COMPLETIONS@
|
||||||
|
BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@
|
||||||
|
ZSH_COMPLETION_DIR = @ZSH_COMPLETION_DIR@
|
||||||
|
@@ -54,7 +55,7 @@ endif
|
||||||
|
system_unit_files = contrib/systemd/onedrive@.service
|
||||||
|
user_unit_files = contrib/systemd/onedrive.service
|
||||||
|
|
||||||
|
-DOCFILES = README.md config LICENSE CHANGELOG.md docs/Docker.md docs/INSTALL.md docs/Office365.md docs/USAGE.md docs/BusinessSharedFolders.md
|
||||||
|
+DOCFILES = README.md config CHANGELOG.md docs/Office365.md docs/USAGE.md docs/BusinessSharedFolders.md
|
||||||
|
|
||||||
|
ifneq ("$(wildcard /etc/redhat-release)","")
|
||||||
|
RHEL = $(shell cat /etc/redhat-release | grep -E "(Red Hat Enterprise Linux Server|CentOS)" | wc -l)
|
||||||
|
@@ -66,6 +67,7 @@ endif
|
||||||
|
|
||||||
|
SOURCES = \
|
||||||
|
src/config.d \
|
||||||
|
+ src/freebsd_inotify.d \
|
||||||
|
src/itemdb.d \
|
||||||
|
src/log.d \
|
||||||
|
src/main.d \
|
||||||
|
@@ -101,14 +103,15 @@ onedrive: $(SOURCES)
|
||||||
|
else \
|
||||||
|
echo $(version) > version ; \
|
||||||
|
fi
|
||||||
|
- $(DC) $(DCFLAGS) $(addprefix -L,$(curl_LIBS)) $(addprefix -L,$(sqlite_LIBS)) $(addprefix -L,$(notify_LIBS)) -L-ldl $(SOURCES) -of$@
|
||||||
|
+ $(DC) $(DCFLAGS) $(addprefix -L,$(curl_LIBS)) $(addprefix -L,$(sqlite_LIBS)) $(addprefix -L,$(notify_LIBS)) $(addprefix -L,$(inotify_LIBS)) -L-ldl $(SOURCES) -of$@
|
||||||
|
|
||||||
|
install: all
|
||||||
|
- $(INSTALL) -D onedrive $(DESTDIR)$(bindir)/onedrive
|
||||||
|
- $(INSTALL) -D onedrive.1 $(DESTDIR)$(mandir)/man1/onedrive.1
|
||||||
|
- $(INSTALL) -D -m 644 contrib/logrotate/onedrive.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/onedrive
|
||||||
|
+ $(INSTALL) -s onedrive $(DESTDIR)$(bindir)/onedrive
|
||||||
|
+ $(INSTALL) onedrive.1 $(DESTDIR)$(mandir)/man1/onedrive.1
|
||||||
|
+ mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d
|
||||||
|
+ $(INSTALL) -m 644 contrib/logrotate/onedrive.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/onedrive
|
||||||
|
mkdir -p $(DESTDIR)$(docdir)
|
||||||
|
- $(INSTALL) -D -m 644 $(DOCFILES) $(DESTDIR)$(docdir)
|
||||||
|
+ $(INSTALL) -m 644 $(DOCFILES) $(DESTDIR)$(docdir)
|
||||||
|
ifeq ($(HAVE_SYSTEMD),yes)
|
||||||
|
$(INSTALL) -d -m 0755 $(DESTDIR)$(systemduserunitdir) $(DESTDIR)$(systemdsystemunitdir)
|
||||||
|
ifeq ($(RHEL),1)
|
||||||
|
@@ -125,8 +128,10 @@ ifeq ($(RHEL_VERSION),6)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(COMPLETIONS),yes)
|
||||||
|
- $(INSTALL) -D -m 644 contrib/completions/complete.zsh $(DESTDIR)$(ZSH_COMPLETION_DIR)/_onedrive
|
||||||
|
- $(INSTALL) -D -m 644 contrib/completions/complete.bash $(DESTDIR)$(BASH_COMPLETION_DIR)/onedrive
|
||||||
|
+ mkdir -p $(DESTDIR)$(ZSH_COMPLETION_DIR)
|
||||||
|
+ $(INSTALL) -m 644 contrib/completions/complete.zsh $(DESTDIR)$(ZSH_COMPLETION_DIR)/_onedrive
|
||||||
|
+ mkdir -p $(DESTDIR)$(BASH_COMPLETION_DIR)
|
||||||
|
+ $(INSTALL) -m 644 contrib/completions/complete.bash $(DESTDIR)$(BASH_COMPLETION_DIR)/onedrive
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
10
net/onedrive/files/patch-configure.ac
Normal file
10
net/onedrive/files/patch-configure.ac
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- configure.ac.orig 2020-04-21 17:07:18 UTC
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -144,6 +144,7 @@
|
||||||
|
dnl Check for required modules: curl and sqlite at the moment
|
||||||
|
PKG_CHECK_MODULES([curl],[libcurl])
|
||||||
|
PKG_CHECK_MODULES([sqlite],[sqlite3])
|
||||||
|
+PKG_CHECK_MODULES([inotify],[libinotify])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl systemd and unit file directories
|
|
@ -1,15 +1,21 @@
|
||||||
A complete tool to interact with OneDrive on Linux.
|
A free Microsoft OneDrive Client which supports OneDrive Personal, OneDrive
|
||||||
Built following the UNIX philosophy.
|
for Business, OneDrive for Office365 and Sharepoint.
|
||||||
|
This Powerful and highly configurable client can run on all major Linux
|
||||||
|
distributions, as a Docker container and on FreeBSD.
|
||||||
|
This client is a 'fork' of skilion client which was abandoned in 2018.
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
State caching
|
* State caching
|
||||||
Real-Time file monitoring with Inotify
|
* Real-Time file monitoring with Inotify
|
||||||
Resumable uploads
|
* File uploat / download validation to ensure data integrity
|
||||||
Support OneDrive for Business (part of Office 365)
|
* Resumable uploads
|
||||||
Shared folders (not Business)
|
* Support OneDrive for Business (part of Office 365)
|
||||||
|
* Sharepoint / Office365 Shared libraries (refer to docs/Office365.md
|
||||||
|
to configure)
|
||||||
|
|
||||||
What's missing:
|
What's missing:
|
||||||
While local changes are uploaded right away, remote changes are delayed
|
* While local changes are uploaded right away, remote changes are delayed
|
||||||
No GUI
|
until next sync when using --monitor
|
||||||
|
* No GUI
|
||||||
|
|
||||||
WWW: https://github.com/skilion/onedrive
|
WWW: https://github.com/abraunegg/onedrive
|
||||||
|
|
11
net/onedrive/pkg-message
Normal file
11
net/onedrive/pkg-message
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
type: upgrade
|
||||||
|
maximum_version: "2.4.3"
|
||||||
|
message: <<EOM
|
||||||
|
When upgrading from version 2.3.3, the onedrive client may fail to
|
||||||
|
synchronize. In this case, execute onedrive --logout to logout and
|
||||||
|
re-authenticate. For more detail, see USAGE.md.
|
||||||
|
EOM
|
||||||
|
}
|
||||||
|
]
|
|
@ -1,10 +1,11 @@
|
||||||
bin/onedrive
|
bin/onedrive
|
||||||
etc/logrotate.d/onedrive
|
etc/logrotate.d/onedrive
|
||||||
%%DOCS%%man/man1/onedrive.1.gz
|
man/man1/onedrive.1.gz
|
||||||
%%BASH%%share/bash-completion/completions/onedrive
|
%%COMPLETION%%etc/bash_completion.d/onedrive
|
||||||
%%ZSH%%share/zsh/site-functions/_onedrive
|
%%COMPLETION%%share/zsh/site-functions/_onedrive
|
||||||
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.md
|
%%DOCSDIR%%/CHANGELOG.md
|
||||||
%%PORTDOCS%%%%DOCSDIR%%/README.Office365.md
|
%%DOCSDIR%%/Office365.md
|
||||||
%%PORTDOCS%%%%DOCSDIR%%/README.md
|
%%DOCSDIR%%/README.md
|
||||||
%%PORTDOCS%%%%DOCSDIR%%/config
|
%%DOCSDIR%%/USAGE.md
|
||||||
|
%%DOCSDIR%%/config
|
||||||
@dir /var/log/onedrive
|
@dir /var/log/onedrive
|
||||||
|
|
Loading…
Add table
Reference in a new issue