From 65e190675310d749767f346617fcc03c2c297e02 Mon Sep 17 00:00:00 2001 From: Pranav Jerry Date: Tue, 5 Oct 2021 15:04:19 +0530 Subject: [PATCH] added Makefile rule to build rpm And updated README with the details. There is probably something missing in the Fedora installation section --- Makefile | 5 ++++- README.md | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2a5ac76..3ccfaf7 100644 --- a/Makefile +++ b/Makefile @@ -25,10 +25,13 @@ uninstall: @echo "make uninstall will not remove anything in /etc/naxalnet" && \ echo "Do 'sudo make purge' to remove it." +rpm: + $(PYTHON) setup.py bdist_rpm --requires python3-dasbus,python3-systemd,iwd,systemd-networkd + # 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__ + rm -rf build *.egg-info **/__pycache__ dist diff --git a/README.md b/README.md index 8478590..e28294b 100644 --- a/README.md +++ b/README.md @@ -91,11 +91,24 @@ Now follow the instructions in the naxalnet is not packaged for Fedora, so it should be installed manually. naxalnet requires atleast systemd v248 which is only -available on **Fedora 34 and above**. Install the dependencies: +available on **Fedora 34 and above**. Install the build dependencies: ```sh # systemd-resolved may be required for rawhide -sudo dnf install systemd-networkd iwd python3-dasbus python3-setuptools python3-systemd +sudo dnf install python3-setuptools make + +``` + +Now clone the repo, build and install and you are ready to go. + +```sh +# Clone the repo +git clone https://git.disroot.org/pranav/naxalnet.git +cd naxalnet +# Create an installable rpm from the source code +make rpm +# Now install it. +sudo dnf install dist/naxalnet-$(python3 -m setup --version)-1.noarch.rpm ``` Now head over to the [next section][install-manual] to install naxalnet.