Index: head/net/onedrive/Makefile =================================================================== --- head/net/onedrive/Makefile (revision 543627) +++ head/net/onedrive/Makefile (revision 543628) @@ -1,63 +1,46 @@ # $FreeBSD$ PORTNAME= onedrive DISTVERSIONPREFIX= v -DISTVERSION= 2.3.3 -PORTREVISION= 1 +DISTVERSION= 2.4.3 CATEGORIES= net MAINTAINER= hiroo.ono+freebsd@gmail.com COMMENT= OneDrive Free client LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libcurl.so:ftp/curl \ libinotify.so:devel/libinotify BUILD_DEPENDS= ldc2:lang/ldc RUN_DEPENDS= ${LOCALBASE}/sbin/logrotate:sysutils/logrotate -USES= gmake pkgconfig sqlite +USES= autoreconf gmake pkgconfig sqlite USE_GITHUB= yes GH_ACCOUNT= abraunegg +GNU_CONFIGURE= yes PKGCONFIG= pkgconf -MAKE_ARGS= DC=ldc2 -INSTALL_TARGET= install.noservice -OPTIONS_DEFINE= DOCS NOTIFY BASH ZSH -OPTIONS_DEFAULT= DOCS NOTIFY BASH ZSH +OPTIONS_DEFINE= NOTIFY COMPLETION +OPTIONS_DEFAULT= NOTIFY COMPLETION OPTIONS_SUB= yes -DOCFILES= README.md README.Office365.md config CHANGELOG.md - -NOTIFY_VARS= NOTIFICATIONS=1 +NOTIFY_CONFIGURE_ENABLE= notifications NOTIFY_USES= gnome -NOTIFY_USE= GNOME=glib20 +NOTIFY_USE= GNOME=glib20,gdkpixbuf2 NOTIFY_LIB_DEPENDS= libnotify.so:devel/libnotify -BASH_COMPLETION_DIR= ${LOCALBASE}/share/bash-completion/completions -ZSH_COMPLETION_DIR= ${LOCALBASE}/share/zsh/site-functions +COMPLETION_DESC= Install completion for BASH and ZSH +COMPLETION_CONFIGURE_ENABLE= completions +ONEDRIVE_LOGDIR= /var/log/${PORTNAME} + post-extract: ${CP} ${FILESDIR}/freebsd_inotify.d ${WRKSRC}/src -do-install-DOCS-on: -.for f in ${DOCFILES} - @${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 +post-install: + ${INSTALL} -d -m 0775 ${STAGEDIR}${ONEDRIVE_LOGDIR} .include Index: head/net/onedrive/distinfo =================================================================== --- head/net/onedrive/distinfo (revision 543627) +++ head/net/onedrive/distinfo (revision 543628) @@ -1,3 +1,3 @@ -TIMESTAMP = 1556052070 -SHA256 (abraunegg-onedrive-v2.3.3_GH0.tar.gz) = 9ee4ea4b3ea880f7624761d053bbb09a2465706685e9ed258c50925ff5e32377 -SIZE (abraunegg-onedrive-v2.3.3_GH0.tar.gz) = 599457 +TIMESTAMP = 1594652822 +SHA256 (abraunegg-onedrive-v2.4.3_GH0.tar.gz) = 4236f436b3658e360164d945a8bc5c9620539c1339ef9182e3d060d2e3b90b9b +SIZE (abraunegg-onedrive-v2.4.3_GH0.tar.gz) = 959963 Index: head/net/onedrive/files/patch-Makefile =================================================================== --- head/net/onedrive/files/patch-Makefile (revision 543627) +++ head/net/onedrive/files/patch-Makefile (nonexistent) @@ -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 Property changes on: head/net/onedrive/files/patch-Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/onedrive/files/freebsd_inotify.d =================================================================== --- head/net/onedrive/files/freebsd_inotify.d (revision 543627) +++ head/net/onedrive/files/freebsd_inotify.d (revision 543628) @@ -1,69 +1,70 @@ /** * D header file for libinotify (incomplete) */ module freebsd_inotify; import core.stdc.stdint; struct inotify_event { int wd; /* Watch descriptor. */ uint32_t mask; /* Watch mask. */ uint32_t cookie; /* Cookie to synchronize two events. */ uint32_t len; /* Length (including NULLs) of name. */ char[0] name; /* Name. */ @disable this(this); }; /* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */ enum IN_ACCESS = 0x00000001; /* File was accessed. */ enum IN_MODIFY = 0x00000002; /* File was modified. */ enum IN_ATTRIB = 0x00000004; /* Metadata changed. */ enum IN_CLOSE_WRITE = 0x00000008; /* Writtable file was closed. */ enum IN_CLOSE_NOWRITE = 0x00000010; /* Unwrittable file closed. */ enum IN_CLOSE = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE); /* Close. */ enum IN_OPEN = 0x00000020; /* File was opened. */ enum IN_MOVED_FROM = 0x00000040; /* File was moved from X. */ enum IN_MOVED_TO = 0x00000080; /* File was moved to Y. */ enum IN_MOVE = (IN_MOVED_FROM | IN_MOVED_TO); /* Moves. */ enum IN_CREATE = 0x00000100; /* Subfile was created. */ enum IN_DELETE = 0x00000200; /* Subfile was deleted. */ enum IN_DELETE_SELF = 0x00000400; /* Self was deleted. */ enum IN_MOVE_SELF = 0x00000800; /* Self was moved. */ /* Additional events and flags. Some of these flags are unsupported, but still should be present */ enum IN_UNMOUNT = 0x00002000; /* Backing fs was unmounted. */ enum IN_Q_OVERFLOW = 0x00004000; /* Event queued overflowed. */ enum IN_IGNORED = 0x00008000; /* File was ignored. */ enum IN_ONLYDIR = 0x01000000; /* Only watch the path if it is a directory. */ enum IN_DONT_FOLLOW = 0x02000000; /* Do not follow a sym link. */ enum IN_EXCL_UNLINK = 0x04000000; /* Exclude events on unlinked objects. */ enum IN_MASK_ADD = 0x20000000; /* Add to the mask of an already existing watch. */ enum IN_ISDIR = 0x40000000; /* Event occurred against dir. */ 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. */ extern (C) int inotify_init (); /* Create and initialize inotify-kqueue instance. */ extern (C) int inotify_init1 (int flags); /* Add watch of object NAME to inotify-kqueue instance FD. Notify about events specified by MASK. */ extern (C) int inotify_add_watch (int fd, const char *name, uint32_t mask); /* Remove the watch specified by WD from the inotify instance FD. */ extern (C) int inotify_rm_watch (int fd, int wd); /* Libinotify specific. Set inotify instance parameter. */ extern (C) int inotify_set_param (int fd, int param, intptr_t value); Index: head/net/onedrive/files/patch-Makefile.in =================================================================== --- head/net/onedrive/files/patch-Makefile.in (nonexistent) +++ head/net/onedrive/files/patch-Makefile.in (revision 543628) @@ -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 + + Property changes on: head/net/onedrive/files/patch-Makefile.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/onedrive/files/patch-configure.ac =================================================================== --- head/net/onedrive/files/patch-configure.ac (nonexistent) +++ head/net/onedrive/files/patch-configure.ac (revision 543628) @@ -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 Property changes on: head/net/onedrive/files/patch-configure.ac ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/onedrive/pkg-descr =================================================================== --- head/net/onedrive/pkg-descr (revision 543627) +++ head/net/onedrive/pkg-descr (revision 543628) @@ -1,15 +1,21 @@ -A complete tool to interact with OneDrive on Linux. -Built following the UNIX philosophy. +A free Microsoft OneDrive Client which supports OneDrive Personal, OneDrive +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: - State caching - Real-Time file monitoring with Inotify - Resumable uploads - Support OneDrive for Business (part of Office 365) - Shared folders (not Business) + * State caching + * Real-Time file monitoring with Inotify + * File uploat / download validation to ensure data integrity + * Resumable uploads + * Support OneDrive for Business (part of Office 365) + * Sharepoint / Office365 Shared libraries (refer to docs/Office365.md + to configure) What's missing: - While local changes are uploaded right away, remote changes are delayed - No GUI + * While local changes are uploaded right away, remote changes are delayed + until next sync when using --monitor + * No GUI -WWW: https://github.com/skilion/onedrive +WWW: https://github.com/abraunegg/onedrive Index: head/net/onedrive/pkg-message =================================================================== --- head/net/onedrive/pkg-message (nonexistent) +++ head/net/onedrive/pkg-message (revision 543628) @@ -0,0 +1,11 @@ +[ +{ + type: upgrade + maximum_version: "2.4.3" + message: <