mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-13 11:16:44 +02:00
added DESTDIR and PREFIX
This commit is contained in:
parent
c2815d6498
commit
83a958df59
26
Makefile
26
Makefile
|
@ -1,6 +1,5 @@
|
|||
DC = dmd
|
||||
DFLAGS = -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl
|
||||
DESTDIR = /usr/local/bin
|
||||
PREFIX = /usr/local
|
||||
|
||||
SOURCES = \
|
||||
src/config.d \
|
||||
|
@ -16,22 +15,27 @@ SOURCES = \
|
|||
src/upload.d \
|
||||
src/util.d
|
||||
|
||||
all: onedrive onedrive.service
|
||||
|
||||
onedrive: $(SOURCES)
|
||||
$(DC) -O -release -inline -boundscheck=off $(DFLAGS) $(SOURCES)
|
||||
dmd -g -inline -O -release $(DFLAGS) $(SOURCES)
|
||||
|
||||
onedrive.service:
|
||||
sed "s|@PREFIX@|$(PREFIX)|g" onedrive.service.in > onedrive.service
|
||||
|
||||
debug: $(SOURCES)
|
||||
$(DC) -debug -g -gs $(DFLAGS) $(SOURCES)
|
||||
dmd -debug -g -gs $(DFLAGS) $(SOURCES)
|
||||
|
||||
unittest: $(SOURCES)
|
||||
$(DC) -unittest -debug -g -gs $(DFLAGS) $(SOURCES)
|
||||
dmd -debug -g -gs -unittest $(DFLAGS) $(SOURCES)
|
||||
|
||||
clean:
|
||||
rm -f onedrive.o onedrive
|
||||
rm -f onedrive onedrive.o onedrive.service
|
||||
|
||||
install: onedrive onedrive.service
|
||||
install onedrive $(DESTDIR)/onedrive
|
||||
install -m 644 onedrive.service /usr/lib/systemd/user
|
||||
install: all
|
||||
install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive
|
||||
install -D -m 644 onedrive.service $(DESTDIR)/usr/lib/systemd/user
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)/onedrive
|
||||
rm -f /usr/lib/systemd/user/onedrive.service
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/onedrive
|
||||
rm -f $(DESTDIR)/usr/lib/systemd/user/onedrive.service
|
||||
|
|
|
@ -3,7 +3,7 @@ Description=OneDrive Free Client
|
|||
Documentation=https://github.com/skilion/onedrive
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/onedrive -m
|
||||
ExecStart=@PREFIX@/bin/onedrive -m
|
||||
Restart=no
|
||||
|
||||
[Install]
|
Loading…
Reference in a new issue