What approch is used to build packages from source?

Hi, for those who are packagers and build from source, what’s your approach to build a package from source if no documentation of the build process exists for example, I want to build this from source GitHub - nozwock/packet: A Quick Share client for Linux, but i don’t know what packages are needed to build a native rpm

Do you go through the source code or what?

First I would try to ask the developer if there exists a rpm package. If not ask him for advice. Probably it is meant to use just as flatpak?

tbh, i’m just doing it for fun, i managed to build it, but after installing packages i don’t know what they’re required for, i followed meson’s output

what i want to learn, is how are packagers making these .spec files, how do they configure build/run-time dependencies

i saw a pkg-build of the app in arch’s aur and i got curious of how they managed to do something like this u know

Maybe take a look at the meson and cargo files in the repository. You could also look at the flatpak manifest.