mirror of
https://git.disroot.org/pranav/pybatmesh.git
synced 2025-01-09 08:23:58 +05:30
Pranav Jerry
61a96ea3b3
Made messages printed in Makefile more understandable. Removed full path of naxalnet from the systemd service. Now you can start naxalnet even if it is installed in /usr/local/bin, if systemd allows (I have not tested it). Many comments were made to respect the 80 chars per line rule. And, of course, added some political commentary to insult the global superpower (superpower in terms of money, military and something else I forgot). And removed MANIFEST.in, which probably haven't changed anything.
35 lines
1.1 KiB
Makefile
35 lines
1.1 KiB
Makefile
# 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.
|
|
|
|
PYTHON := python3
|
|
PIP := pip3
|
|
|
|
# This can be changed when creating a package for your POSIX distribution
|
|
DESTDIR:= /
|
|
|
|
all: build
|
|
|
|
# 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
|
|
$(PYTHON) setup.py build
|
|
|
|
install:
|
|
$(PYTHON) setup.py install --root="$(DESTDIR)" --optimize=1 --skip-build
|
|
|
|
uninstall:
|
|
$(PIP) uninstall -y naxalnet
|
|
rm -rf /usr/share/naxalnet /usr/lib/systemd/system/naxalnet.service
|
|
@echo "make uninstall will not remove anything in /etc/naxalnet" && \
|
|
echo "Do 'sudo make purge' to remove it."
|
|
|
|
# Remove config files, like apt purge. Purge should first do what
|
|
# uninstall does, so we add uninstall as a dependency to this rule.
|
|
purge: uninstall
|
|
rm -rf /etc/naxalnet
|
|
|
|
clean:
|
|
rm -rf build naxalnet.egg-info **/__pycache__
|