mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 04:57:53 +00:00
Make install/uninstall for Linux
This commit is contained in:
parent
9161eebc68
commit
afda5e684b
@ -32,6 +32,7 @@ endif
|
||||
INCLUDES?=
|
||||
DEFS?=
|
||||
LDLIBS?=
|
||||
DESTDIR?=
|
||||
|
||||
include objects.mk
|
||||
|
||||
@ -146,4 +147,33 @@ debug: FORCE
|
||||
make ZT_DEBUG=1 one
|
||||
make ZT_DEBUG=1 selftest
|
||||
|
||||
install: FORCE
|
||||
mkdir -p $(DESTDIR)/usr/sbin
|
||||
rm -f $(DESTDIR)/usr/sbin/zerotier-one
|
||||
cp -f zerotier-one $(DESTDIR)/usr/sbin/zerotier-one
|
||||
mkdir -p $(DESTDIR)/usr/bin
|
||||
rm -f $(DESTDIR)/usr/bin/zerotier-cli
|
||||
rm -f $(DESTDIR)/usr/bin/zerotier-idtool
|
||||
ln -s $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/usr/bin/zerotier-cli
|
||||
ln -s $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/usr/bin/zerotier-idtool
|
||||
mkdir -p $(DESTDIR)/var/lib/zerotier-one
|
||||
rm -f $(DESTDIR)/var/lib/zerotier-one/zerotier-one
|
||||
rm -f $(DESTDIR)/var/lib/zerotier-one/zerotier-cli
|
||||
rm -f $(DESTDIR)/var/lib/zerotier-one/zerotier-idtool
|
||||
ln -s $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/var/lib/zerotier-one/zerotier-one
|
||||
ln -s $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/var/lib/zerotier-one/zerotier-cli
|
||||
ln -s $(DESTDIR)/usr/sbin/zerotier-one $(DESTDIR)/var/lib/zerotier-one/zerotier-idtool
|
||||
|
||||
uninstall: FORCE
|
||||
rm -f $(DESTDIR)/var/lib/zerotier-one/zerotier-one
|
||||
rm -f $(DESTDIR)/var/lib/zerotier-one/zerotier-cli
|
||||
rm -f $(DESTDIR)/var/lib/zerotier-one/zerotier-idtool
|
||||
rm -f $(DESTDIR)/usr/bin/zerotier-cli
|
||||
rm -f $(DESTDIR)/usr/bin/zerotier-idtool
|
||||
rm -f $(DESTDIR)/usr/sbin/zerotier-one
|
||||
rm -rf $(DESTDIR)/var/lib/zerotier-one/iddb.d
|
||||
rm -rf $(DESTDIR)/var/lib/zerotier-one/updates.d
|
||||
rm -rf $(DESTDIR)/var/lib/zerotier-one/networks.d
|
||||
rm -f $(DESTDIR)/var/lib/zerotier-one/zerotier-one.port
|
||||
|
||||
FORCE:
|
||||
|
Loading…
Reference in New Issue
Block a user