mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
net/onedrive: upgrade 1.1.3 -> 2.3.3
- MASTERSITE moved PR: 237545 Submitted by: Hiroo Ono <hiroo.ono+freebsd@gmail.com> (maintainer) Relnotes: https://github.com/abraunegg/onedrive/releases https://github.com/abraunegg/onedrive/blob/master/CHANGELOG.md
This commit is contained in:
parent
9643d28d53
commit
fd6e9a388e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=500320
@ -2,35 +2,62 @@
|
||||
|
||||
PORTNAME= onedrive
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 1.1.3
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 2.3.3
|
||||
CATEGORIES= net
|
||||
|
||||
MAINTAINER= hiroo.ono+freebsd@gmail.com
|
||||
COMMENT= Microsoft OneDrive client
|
||||
COMMENT= OneDrive Free client
|
||||
|
||||
LICENSE= GPLv3
|
||||
|
||||
LIB_DEPENDS= libcurl.so:ftp/curl \
|
||||
libinotify.so:devel/libinotify
|
||||
BUILD_DEPENDS= ldc2:lang/ldc
|
||||
RUN_DEPENDS= ${LOCALBASE}/sbin/logrotate:sysutils/logrotate
|
||||
|
||||
USES= sqlite
|
||||
USES= gmake pkgconfig sqlite
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= skilion
|
||||
GH_ACCOUNT= abraunegg
|
||||
|
||||
MAKE_ARGS= DC=ldc2
|
||||
DFLAGS+= -g
|
||||
PKGCONFIG= pkgconf
|
||||
MAKE_ARGS= DC=ldc2
|
||||
INSTALL_TARGET= install.noservice
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
OPTIONS_DEFINE= DOCS NOTIFY BASH ZSH
|
||||
OPTIONS_DEFAULT= DOCS NOTIFY BASH ZSH
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
DOCFILES= README.md README.Office365.md config CHANGELOG.md
|
||||
|
||||
NOTIFY_VARS= NOTIFICATIONS=1
|
||||
NOTIFY_USES= gnome
|
||||
NOTIFY_USE= GNOME=glib20
|
||||
NOTIFY_LIB_DEPENDS= libnotify.so:devel/libnotify
|
||||
|
||||
BASH_COMPLETION_DIR= ${LOCALBASE}/share/bash-completion/completions
|
||||
ZSH_COMPLETION_DIR= ${LOCALBASE}/share/zsh/site-functions
|
||||
|
||||
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}
|
||||
do-install-DOCS-on:
|
||||
.for f in ${DOCFILES}
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
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>
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1552643961
|
||||
SHA256 (skilion-onedrive-v1.1.3_GH0.tar.gz) = fb12235a73919b3374b8f27785b834a690fba1c6e70c6e6f1f5da3e51eb471a0
|
||||
SIZE (skilion-onedrive-v1.1.3_GH0.tar.gz) = 35281
|
||||
TIMESTAMP = 1556052070
|
||||
SHA256 (abraunegg-onedrive-v2.3.3_GH0.tar.gz) = 9ee4ea4b3ea880f7624761d053bbb09a2465706685e9ed258c50925ff5e32377
|
||||
SIZE (abraunegg-onedrive-v2.3.3_GH0.tar.gz) = 599457
|
||||
|
@ -1,43 +1,40 @@
|
||||
--- Makefile.orig 2018-09-09 20:14:01 UTC
|
||||
--- Makefile.orig 2019-04-16 02:18:26 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
|
||||
@@ -7,8 +7,9 @@ gitversion := $(shell if [ -f .git/HEAD ] ; then echo
|
||||
|
||||
SOURCES = \
|
||||
@@ -14,26 +14,19 @@ SOURCES = \
|
||||
src/sqlite.d \
|
||||
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/util.d \
|
||||
src/util.d \
|
||||
- src/progress.d
|
||||
+ src/progress.d \
|
||||
+ src/freebsd_inotify.d
|
||||
|
||||
-all: onedrive onedrive.service
|
||||
+all: onedrive
|
||||
ifeq ($(notifications),1)
|
||||
SOURCES += src/notifications/notify.d src/notifications/dnotify.d
|
||||
@@ -90,11 +92,12 @@ onedrive: version $(SOURCES)
|
||||
|
||||
clean:
|
||||
- rm -f onedrive onedrive.o onedrive.service
|
||||
+ rm -f onedrive onedrive.o
|
||||
|
||||
-install: all
|
||||
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 -m 644 onedrive.service $(DESTDIR)/usr/lib/systemd/user/onedrive.service
|
||||
+# install: all
|
||||
+# 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
|
||||
|
||||
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
|
||||
install: all install.noservice
|
||||
for i in $(DOCFILES) ; do install -D -m 644 $$i $(DESTDIR)$(DOCDIR)/$$i ; done
|
||||
|
@ -1,15 +1,9 @@
|
||||
--- src/monitor.d.orig 2019-03-16 11:55:35 UTC
|
||||
--- src/monitor.d.orig 2019-04-24 07:47:09 UTC
|
||||
+++ src/monitor.d
|
||||
@@ -1,10 +1,11 @@
|
||||
@@ -1,4 +1,5 @@
|
||||
-import core.sys.linux.sys.inotify;
|
||||
+// import core.sys.linux.sys.inotify;
|
||||
+import freebsd_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
|
||||
|
23
net/onedrive/files/patch-src_progress.d
Normal file
23
net/onedrive/files/patch-src_progress.d
Normal file
@ -0,0 +1,23 @@
|
||||
--- src/progress.d.orig 2019-04-16 02:18:26 UTC
|
||||
+++ src/progress.d
|
||||
@@ -7,6 +7,20 @@ import std.datetime;
|
||||
import core.sys.posix.unistd;
|
||||
import core.sys.posix.sys.ioctl;
|
||||
|
||||
+// core.sys.posix.sys.ioccom;
|
||||
+enum uint IOCPARM_MASK = 0x1fff; // parameter length, at most 13 bits
|
||||
+enum uint IOC_OUT = 0x40000000; // copy parameters back
|
||||
+
|
||||
+uint _IOC(T=typeof(null))(uint inorout, uint group, uint num, size_t len)
|
||||
+{
|
||||
+ return (inorout | ((len & IOCPARM_MASK) << 16) | (group << 8) | num);
|
||||
+}
|
||||
+uint _IOR(T)(char g, int n)
|
||||
+{
|
||||
+ return _IOC!(T)(IOC_OUT, cast(uint)g, cast(uint)n, T.sizeof);
|
||||
+}
|
||||
+enum uint TIOCGWINSZ = _IOR!(winsize)('t', 104);
|
||||
+
|
||||
class Progress
|
||||
{
|
||||
private:
|
@ -1 +0,0 @@
|
||||
1.1.3
|
@ -1,3 +1,10 @@
|
||||
bin/onedrive
|
||||
%%DOCSDIR%%/README.md
|
||||
%%EXAMPLESDIR%%/config
|
||||
etc/logrotate.d/onedrive
|
||||
%%DOCS%%man/man1/onedrive.1.gz
|
||||
%%BASH%%share/bash-completion/completions/onedrive
|
||||
%%ZSH%%share/zsh/site-functions/_onedrive
|
||||
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.md
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.Office365.md
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.md
|
||||
%%PORTDOCS%%%%DOCSDIR%%/config
|
||||
@dir /var/log/onedrive
|
||||
|
Loading…
Reference in New Issue
Block a user