Index: net/onedrive/Makefile =================================================================== --- net/onedrive/Makefile (nonexistent) +++ net/onedrive/Makefile (working copy) @@ -0,0 +1,44 @@ +# $FreeBSD$ + +PORTNAME= onedrive +DISTVERSIONPREFIX= v +DISTVERSION= 1.1.3 +CATEGORIES= net + +COMMENT= Microsoft OneDrive client + +LICENSE= GPLv3 + +BUILD_DEPENDS= ldmd2:lang/ldc +LIB_DEPENDS= libcurl.so:ftp/curl \ + libinotify.so:devel/libinotify + +USES= sqlite +USE_GITHUB= yes +GH_ACCOUNT= skilion + +OPTIONS_DEFAULT= LDC +OPTIONS_SINGLE= DLANG +OPTIONS_SINGLE_DLANG= DMD1 DMD2 LDC + +DMD1_DESC= Use lang/dmd1 as D compiler +DMD2_DESC= Use lang/dmd2 as D compiler +LDC_DESC= Use lang/ldc as D compiler + +DMD1_MAKE_ARGS= DC=dmd1 +DMD2_MAKE_ARGS= DC=dmd +LDC_MAKE_ARGS= DC=ldmd2 + +.include + +post-extract: + ${CP} ${FILESDIR}/freebsd_inotify.d ${WRKSRC}/src + ${CP} ${FILESDIR}/version ${WRKSRC} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/onedrive ${STAGEDIR}${PREFIX}/bin + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/config ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + +.include Property changes on: net/onedrive/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: net/onedrive/distinfo =================================================================== --- net/onedrive/distinfo (nonexistent) +++ net/onedrive/distinfo (working copy) @@ -0,0 +1,3 @@ +TIMESTAMP = 1552643961 +SHA256 (skilion-onedrive-v1.1.3_GH0.tar.gz) = fb12235a73919b3374b8f27785b834a690fba1c6e70c6e6f1f5da3e51eb471a0 +SIZE (skilion-onedrive-v1.1.3_GH0.tar.gz) = 35281 Property changes on: net/onedrive/distinfo ___________________________________________________________________ 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: net/onedrive/files/freebsd_inotify.d =================================================================== --- net/onedrive/files/freebsd_inotify.d (nonexistent) +++ net/onedrive/files/freebsd_inotify.d (working copy) @@ -0,0 +1,67 @@ +/** + * 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[] name; /* Name. */ +}; + + +/* 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. */ + + +/* 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); + Property changes on: net/onedrive/files/freebsd_inotify.d ___________________________________________________________________ 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: net/onedrive/files/patch-Makefile =================================================================== --- net/onedrive/files/patch-Makefile (nonexistent) +++ net/onedrive/files/patch-Makefile (working copy) @@ -0,0 +1,43 @@ +--- Makefile.orig 2018-09-09 20:14:01 UTC ++++ Makefile +@@ -1,5 +1,5 @@ + DC = dmd +-DFLAGS = -g -ofonedrive -O -L-lcurl -L-lsqlite3 -L-ldl -J. ++DFLAGS = -g -ofonedrive -O -L-lcurl -L-lsqlite3 -L-ldl -L-linotify -J. + PREFIX = /usr/local + + SOURCES = \ +@@ -14,26 +14,19 @@ SOURCES = \ + src/sqlite.d \ + src/sync.d \ + src/upload.d \ +- src/util.d ++ src/util.d \ ++ src/freebsd_inotify.d + +-all: onedrive onedrive.service ++all: onedrive + + clean: +- rm -f onedrive onedrive.o onedrive.service ++ rm -f onedrive onedrive.o + +-install: all +- install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive +- install -D -m 644 onedrive.service $(DESTDIR)/usr/lib/systemd/user/onedrive.service ++# install: all ++# install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive + + onedrive: version $(SOURCES) + $(DC) $(DFLAGS) $(SOURCES) + +-onedrive.service: +- sed "s|@PREFIX@|$(PREFIX)|g" onedrive.service.in > onedrive.service +- + uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/onedrive +- rm -f $(DESTDIR)/usr/lib/systemd/user/onedrive.service +- +-version: .git/HEAD .git/index +- echo $(shell git describe --tags) >version +\ No newline at end of file Property changes on: net/onedrive/files/patch-Makefile ___________________________________________________________________ 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: net/onedrive/files/patch-src_monitor.d =================================================================== --- net/onedrive/files/patch-src_monitor.d (nonexistent) +++ net/onedrive/files/patch-src_monitor.d (working copy) @@ -0,0 +1,15 @@ +--- src/monitor.d.orig 2019-03-16 11:55:35 UTC ++++ src/monitor.d +@@ -1,10 +1,11 @@ +-import core.sys.linux.sys.inotify; ++// import core.sys.linux.sys.inotify; + import core.stdc.errno; + import core.sys.posix.poll, core.sys.posix.unistd; + import std.exception, std.file, std.path, std.regex, std.stdio, std.string; + import config; + import selective; + import util; ++import freebsd_inotify; + static import log; + + // relevant inotify events Property changes on: net/onedrive/files/patch-src_monitor.d ___________________________________________________________________ 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: net/onedrive/files/version =================================================================== --- net/onedrive/files/version (nonexistent) +++ net/onedrive/files/version (working copy) @@ -0,0 +1 @@ +1.1.3 Property changes on: net/onedrive/files/version ___________________________________________________________________ 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: net/onedrive/pkg-descr =================================================================== --- net/onedrive/pkg-descr (nonexistent) +++ net/onedrive/pkg-descr (working copy) @@ -0,0 +1,15 @@ +A complete tool to interact with OneDrive on Linux. +Built following the UNIX philosophy. + +Features: + State caching + Real-Time file monitoring with Inotify + Resumable uploads + Support OneDrive for Business (part of Office 365) + Shared folders (not Business) + +What's missing: + While local changes are uploaded right away, remote changes are delayed + No GUI + +WWW: https://github.com/skilion/onedrive Property changes on: net/onedrive/pkg-descr ___________________________________________________________________ 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: net/onedrive/pkg-plist =================================================================== --- net/onedrive/pkg-plist (nonexistent) +++ net/onedrive/pkg-plist (working copy) @@ -0,0 +1,3 @@ +bin/onedrive +%%DOCSDIR%%/README.md +%%EXAMPLESDIR%%/config Property changes on: net/onedrive/pkg-plist ___________________________________________________________________ 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