Update the Makefile to comply with the DESTDIR/PREFIX convention
parent
eb00904fde
commit
eb8c309626
19
Makefile
19
Makefile
|
@ -1,19 +1,20 @@
|
||||||
|
PREFIX = /usr/local
|
||||||
|
|
||||||
.DEFAULT_GOAL := setup
|
.DEFAULT_GOAL := setup
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
sudo pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
|
|
||||||
install:
|
install:
|
||||||
sudo rm -rf /usr/share/onionr/
|
cp -rfp ./onionr $(DESTDIR)$(PREFIX)/share/onionr
|
||||||
sudo rm -f /usr/bin/onionr
|
echo '#!/bin/sh' > $(DESTDIR)$(PREFIX)/bin/onionr
|
||||||
sudo cp -rp ./onionr /usr/share/onionr
|
echo 'cd $(DESTDIR)$(PREFIX)/share/onionr' > $(DESTDIR)$(PREFIX)/bin/onionr
|
||||||
sudo sh -c "echo \"#!/bin/sh\ncd /usr/share/onionr/\n./onionr.py \\\"\\\$$@\\\"\" > /usr/bin/onionr"
|
echo './onionr \\\"\\\$$@\\\"\"' > $(DESTDIR)$(PREFIX)/bin/onionr
|
||||||
sudo chmod +x /usr/bin/onionr
|
chmod +x $(DESTDIR)$(PREFIX)/bin/onionr
|
||||||
sudo chown -R `whoami` /usr/share/onionr/
|
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
sudo rm -rf /usr/share/onionr
|
rm -rf $(DESTDIR)$(PREFIX)/share/onionr
|
||||||
sudo rm -f /usr/bin/onionr
|
rm -f $(DESTDIR)$(PREFIX)/bin/onionr
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@./RUN-LINUX.sh stop
|
@./RUN-LINUX.sh stop
|
||||||
|
|
Loading…
Reference in New Issue