Lines 1-43
Link Here
|
1 |
--- Makefile.orig 2018-09-09 20:14:01 UTC |
1 |
--- Makefile.orig 2019-04-16 02:18:26 UTC |
2 |
+++ Makefile |
2 |
+++ Makefile |
3 |
@@ -1,5 +1,5 @@ |
3 |
@@ -7,8 +7,9 @@ gitversion := $(shell if [ -f .git/HEAD ] ; then echo |
4 |
DC = dmd |
|
|
5 |
-DFLAGS = -g -ofonedrive -O -L-lcurl -L-lsqlite3 -L-ldl -J. |
6 |
+DFLAGS = -g -ofonedrive -O -L-lcurl -L-lsqlite3 -L-ldl -L-linotify -J. |
7 |
PREFIX = /usr/local |
8 |
|
4 |
|
9 |
SOURCES = \ |
5 |
ifeq ($(pkgconfig),1) |
10 |
@@ -14,26 +14,19 @@ SOURCES = \ |
6 |
LIBS = $(shell pkg-config --libs sqlite3 libcurl) |
11 |
src/sqlite.d \ |
7 |
+LIBS += $(shell pkg-config --libs libinotify) |
|
|
8 |
else |
9 |
-LIBS = -lcurl -lsqlite3 |
10 |
+LIBS = -lcurl -lsqlite3 -linotify |
11 |
endif |
12 |
ifeq ($(notifications),1) |
13 |
NOTIF_VERSIONS = -version=NoPragma -version=NoGdk -version=Notifications |
14 |
@@ -74,7 +75,8 @@ SOURCES = \ |
12 |
src/sync.d \ |
15 |
src/sync.d \ |
13 |
src/upload.d \ |
16 |
src/upload.d \ |
14 |
- src/util.d |
17 |
src/util.d \ |
15 |
+ src/util.d \ |
18 |
- src/progress.d |
|
|
19 |
+ src/progress.d \ |
16 |
+ src/freebsd_inotify.d |
20 |
+ src/freebsd_inotify.d |
17 |
|
21 |
|
18 |
-all: onedrive onedrive.service |
22 |
ifeq ($(notifications),1) |
19 |
+all: onedrive |
23 |
SOURCES += src/notifications/notify.d src/notifications/dnotify.d |
|
|
24 |
@@ -90,11 +92,12 @@ onedrive: version $(SOURCES) |
20 |
|
25 |
|
21 |
clean: |
26 |
install.noservice: onedrive onedrive.1 |
22 |
- rm -f onedrive onedrive.o onedrive.service |
27 |
mkdir -p $(DESTDIR)/var/log/onedrive |
23 |
+ rm -f onedrive onedrive.o |
28 |
- chown root.users $(DESTDIR)/var/log/onedrive |
24 |
|
29 |
+ # chown root.users $(DESTDIR)/var/log/onedrive |
25 |
-install: all |
30 |
chmod 0775 $(DESTDIR)/var/log/onedrive |
26 |
- install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive |
31 |
- install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive |
27 |
- install -D -m 644 onedrive.service $(DESTDIR)/usr/lib/systemd/user/onedrive.service |
32 |
- install -D onedrive.1 $(DESTDIR)$(MANDIR)/onedrive.1 |
28 |
+# install: all |
33 |
- install -D -m 644 logrotate/onedrive.logrotate $(DESTDIR)/etc/logrotate.d/onedrive |
29 |
+# install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive |
34 |
+ install onedrive $(DESTDIR)$(PREFIX)/bin/onedrive |
|
|
35 |
+ # install -D onedrive.1 $(DESTDIR)$(MANDIR)/onedrive.1 |
36 |
+ install -d $(DESTDIR)$(PREFIX)/etc/logrotate.d |
37 |
+ install -m 644 logrotate/onedrive.logrotate $(DESTDIR)$(PREFIX)/etc/logrotate.d/onedrive |
30 |
|
38 |
|
31 |
onedrive: version $(SOURCES) |
39 |
install: all install.noservice |
32 |
$(DC) $(DFLAGS) $(SOURCES) |
40 |
for i in $(DOCFILES) ; do install -D -m 644 $$i $(DESTDIR)$(DOCDIR)/$$i ; done |
33 |
|
|
|
34 |
-onedrive.service: |
35 |
- sed "s|@PREFIX@|$(PREFIX)|g" onedrive.service.in > onedrive.service |
36 |
- |
37 |
uninstall: |
38 |
rm -f $(DESTDIR)$(PREFIX)/bin/onedrive |
39 |
- rm -f $(DESTDIR)/usr/lib/systemd/user/onedrive.service |
40 |
- |
41 |
-version: .git/HEAD .git/index |
42 |
- echo $(shell git describe --tags) >version |
43 |
\ No newline at end of file |