To use the meshcommander.spec file to build a RPM package, you need:
An RPM based distro. I am using Fedora 43 here. If you are using Fedora older than version 18 or an Enterprise Linux (clone) older than major version 8, substitute dnf with yum.
The spec file from the project's Download section.
Create a user for RPM packaging, I will name it build here. It is strongly recommended to not use root for package building.
sudo adduser build
Install rpm-build and rpmdevtools. rpm-build is required to build RPM packages, rpmdevtools contains the tools we will use later to create the RPM build tree and to automatically download sources.
sudo dnf install rpm-build rpmdevtools
Install the spec file's build dependencies; unzip and msitools. unzip is required to unpack the icon pack. msitools is required to extract the files from the MeshCommander.msi.
sudo dnf install unzip msitools
Switch to the build user.
sudo su - build
Create a rpmbuild directory tree in the build user's home directory using rpmdev-setuptree.
rpmdev-setuptree
Copy/download the meshcommander.spec file to a place where the build user can access it. You may also want to make it writable to be able to edit it in the future. The usual place for spec files is ~/rpmbuild/SPECS, but placing it e.g. in ~ works, too, if you find this easier to maintain.
After you have set up your RPM build environment as described above, you may start building RPM packages:
Edit meshcommander.spec to match MeshCommander's current version.
Run spectool to automatically download both the MeshCommander MSI and the NW.js binary tarball.
spectool -g -f -R meshcommander.spec
The -g flag tells spectool to download the source files, -f tells it to force downloading (I recommend this although it is no longer required. This was a requirement in the past when MeshCommander was always released as MeshCommander.msi without a version number, thus needed to be replaced even if it already existed.), -R makes spectool place the downloaded files in ~/rpmbuild/SOURCES, where rpmbuild expects to find them.
Build the MeshCommander RPM package.
rpmbuild -bb meshcommander.spec
-bb is build binary. Alternatively you may want to use -ba instead to have rpmbuild also build a (no)source RPM file, which contains both the specfile and the downloaded source files, and may be used to build RPMs using rpmbuild --rebuild without further downloads.
The new RPM package file is placed in ~/rpmbuild/RPMS/x86_64. If your system is a desktop installation, you may now install it:
sudo dnf install /home/build/rpmbuild/RPMS/x86_64/meshcommander-0.9.7-2.x86_64.rpm
The version and release number may vary, use the ones from the spec file.