added Makefile rule to build rpm

And updated README with the details. There is probably something missing
in the Fedora installation section
This commit is contained in:
Pranav Jerry 2021-10-05 15:04:19 +05:30
parent 6acd7084f2
commit 65e1906753
No known key found for this signature in database
GPG Key ID: F1DCDC4FED0A0C5B
2 changed files with 19 additions and 3 deletions

View File

@ -25,10 +25,13 @@ uninstall:
@echo "make uninstall will not remove anything in /etc/naxalnet" && \ @echo "make uninstall will not remove anything in /etc/naxalnet" && \
echo "Do 'sudo make purge' to remove it." 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 # Remove config files, like apt purge. Purge should first do what
# uninstall does, so we add uninstall as a dependency to this rule. # uninstall does, so we add uninstall as a dependency to this rule.
purge: uninstall purge: uninstall
rm -rf /etc/naxalnet rm -rf /etc/naxalnet
clean: clean:
rm -rf build naxalnet.egg-info **/__pycache__ rm -rf build *.egg-info **/__pycache__ dist

View File

@ -91,11 +91,24 @@ Now follow the instructions in the
naxalnet is not packaged for Fedora, so it should be installed naxalnet is not packaged for Fedora, so it should be installed
manually. naxalnet requires atleast systemd v248 which is only 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 ```sh
# systemd-resolved may be required for rawhide # 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. Now head over to the [next section][install-manual] to install naxalnet.