diff options
Diffstat (limited to 'net/onedrive/files')
-rw-r--r-- | net/onedrive/files/freebsd_inotify.d | 1 | ||||
-rw-r--r-- | net/onedrive/files/patch-Makefile | 40 | ||||
-rw-r--r-- | net/onedrive/files/patch-Makefile.in | 61 | ||||
-rw-r--r-- | net/onedrive/files/patch-configure.ac | 10 |
4 files changed, 72 insertions, 40 deletions
diff --git a/net/onedrive/files/freebsd_inotify.d b/net/onedrive/files/freebsd_inotify.d index 4892e990e7fb..54a4df019a6f 100644 --- a/net/onedrive/files/freebsd_inotify.d +++ b/net/onedrive/files/freebsd_inotify.d @@ -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_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 (); diff --git a/net/onedrive/files/patch-Makefile b/net/onedrive/files/patch-Makefile deleted file mode 100644 index 602fd1ec2c4b..000000000000 --- a/net/onedrive/files/patch-Makefile +++ /dev/null @@ -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 diff --git a/net/onedrive/files/patch-Makefile.in b/net/onedrive/files/patch-Makefile.in new file mode 100644 index 000000000000..5f1612d59c24 --- /dev/null +++ b/net/onedrive/files/patch-Makefile.in @@ -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 + + diff --git a/net/onedrive/files/patch-configure.ac b/net/onedrive/files/patch-configure.ac new file mode 100644 index 000000000000..660394844511 --- /dev/null +++ b/net/onedrive/files/patch-configure.ac @@ -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 |