...
git clone https://github.com/stfc/xrootd.git -b <your_branch>
cd xrootd/packaging
./makesrpm.sh --version <version no.(e.g. 5.5.4-00 5)> --define "_with_python3 1" --define "_with_tests 1" --define "_with_scitokens 1" -D "dist .el7el<os version(7/8/9)>"
cd to the output directory (said in the last ~5 lines of the output)
mkdir RPMS
rpmbuild --rebuild --define "_rpmdir RPMS/" --define "_with_python3 1" --define "_with_scitokens 1" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" -D "dist .el7" *.src.rpm
...