2021-10-02 14:13:53 +05:30
|
|
|
# This makefile uses setup.py under the hood. In debian, and therefore
|
|
|
|
# ubuntu, and in fedora, python and pip are symlinks to python2 and pip2,
|
|
|
|
# not python3. So we have to specify python as python3 by default.
|
|
|
|
|
2021-08-01 16:58:48 +05:30
|
|
|
PYTHON := python3
|
2021-08-14 22:00:07 +05:30
|
|
|
PIP := pip3
|
2021-10-02 14:13:53 +05:30
|
|
|
|
|
|
|
# This can be changed when creating a package for your POSIX distribution
|
2021-08-01 16:58:48 +05:30
|
|
|
DESTDIR:= /
|
|
|
|
|
2021-07-21 15:36:11 +05:30
|
|
|
all: build
|
2021-05-10 15:15:42 +05:30
|
|
|
|
2021-10-02 14:13:53 +05:30
|
|
|
# Build only when naxalnet/__init__.py changes. We assume here that anyone
|
|
|
|
# creating a new commit will first update the __version__ in
|
|
|
|
# naxalnet/__init__.py
|
|
|
|
build: naxalnet/__init__.py
|
2021-08-01 16:58:48 +05:30
|
|
|
$(PYTHON) setup.py build
|
2021-06-04 22:27:54 +05:30
|
|
|
|
2021-09-29 08:37:59 +05:30
|
|
|
install:
|
2021-08-01 16:58:48 +05:30
|
|
|
$(PYTHON) setup.py install --root="$(DESTDIR)" --optimize=1 --skip-build
|
2021-07-26 12:44:24 +05:30
|
|
|
|
2021-08-14 22:00:07 +05:30
|
|
|
uninstall:
|
2021-08-18 17:33:46 +05:30
|
|
|
$(PIP) uninstall -y naxalnet
|
2021-08-14 22:00:07 +05:30
|
|
|
rm -rf /usr/share/naxalnet /usr/lib/systemd/system/naxalnet.service
|
2021-10-02 14:13:53 +05:30
|
|
|
@echo "make uninstall will not remove anything in /etc/naxalnet" && \
|
2021-08-18 17:33:46 +05:30
|
|
|
echo "Do 'sudo make purge' to remove it."
|
2021-08-14 22:00:07 +05:30
|
|
|
|
2021-10-02 14:13:53 +05:30
|
|
|
# Remove config files, like apt purge. Purge should first do what
|
|
|
|
# uninstall does, so we add uninstall as a dependency to this rule.
|
2021-08-19 12:03:20 +05:30
|
|
|
purge: uninstall
|
2021-08-18 17:33:46 +05:30
|
|
|
rm -rf /etc/naxalnet
|
2021-08-14 22:00:07 +05:30
|
|
|
|
2021-07-26 12:44:24 +05:30
|
|
|
clean:
|
2021-08-16 18:56:17 +05:30
|
|
|
rm -rf build naxalnet.egg-info **/__pycache__
|