I just want to create an RPM file to distribute my Linux binary \"foobar\", with only a couple of dependencies. It has a config file, /etc/foobar.conf and should be installe
RPMs are usually built from source, not the binaries.
You need to write the spec file that covers how to configure and compile your application; also, which files to include in your RPM.
A quick glance at the manual shows that most of what you need is covered in Chapter 8 -- also, as most RPM-based distributions have sources available, there's literally a zillion of examples of different approaches you could look at.