I have run rpmbuild but I have not gotten any usefull files.
Because the spec file doesn't do nothing yet ;-p
I also have noticed some people mentioning some rpmrc file. Should I create one?
You don't have to create (=copy from default) a ~/.rpmrc. You may want to build RPM's as unprivileged user to keep from poisoning your buildsystem. Set up your own ~/.rpmmacros. It deals with setting your local RPM root (%_topdir ~/somedir) under which you'll have the source, build, temp dirs, etc, etc. For details see the excellent IBM developerWorks: Building without root, patching software, and distributing RPMs
. Other docs to read would be the RPM HOWTO
and any distribution-specific RPM docs.
So, how would I mention the files in the files section?
Basically what you do first is unpack the tarball (in this case a zipfile so watch your source directive), read the README or INSTALL files, run configure with appropriate args, run make and "make -n install" to see where it all goes to.
0. Download and unpack bibledave and in the bibledave_v0.6.6 dir there's no default configure(.in) (and or Makefile) but a file called "run.sh" which executes the game (python main.py) and when done deletes any compiled files (rm *.pyc -f).
1. Also all files and dirs are used in the current structure so you can't have it installed in /usr/share/games or /usr/games/bin but in /usr/share/games/bibledave or /usr/games/bin/bibledave
2. with a symlink from say /usr/local/bin/bibledave to /usr/share/games/bibledave/run.sh.
3. Decide on which dir and make the run.sh a proper Bash script:
rm *.pyc -f
4. Before installing we need to remove the CVS entries, batch files, etc. cd into where you unpacked bibledave and:
find . -type d -name CVS|xargs -iD rm -rf 'D'
find . -type f -iname \*.bat -o -iname \*.ico -o -iname \*.nsi|xargs -iF rm -f 'F'
5. Make a files listing:
find . | xargs -iX stat -c "attr(%a,root,root) %n" X|sed -e "s/^a/%\0/g" -e "s/) \./) \/usr\/share\/games\/bibledave/g" > spec_files
and add the contents of spec_files to your spec file.
6. There's some more stuff but I guess it's time to finish off with a spec file, as always, YMMV(VM). Since LQ has a post limit I'll try and post in below. Edit:
the spec file is too large. It will be available at this URI
for aprox seven days from now
Please note: the build process and spec file described with all the kludges and workarounds are definately NONSTANDARD. Do not use this unless you are forced to. Also it's better to use well-packaged source tarballs ( bug your maintainers about packaging standards).