In the repo hierarchy there is the “source” directory which has a pile of xxx.src.rpm files. I’m unsure how fully ‘program source’ they are or using them.
We know many 3rd party apps and distros have the source code available in compressed tars or such and you get those and extract them to wherever you want, then there is a ‘./configure’ file included to begin the compile routine.
Suse uses the rpm suffix and you need to use rpm on command line which extracts them to a directory under /usr/src.
What I see there are some suffix .pl, .sh and .patch files a few others and at least one xxx.tar.bz2, no configure. If I extract that bz2 file I see what really is the expected source code with a configure file - usually. I pulled down a number of src.rpms some not having a configure.
Right, I looked through the rpm, rpmbuild mans but am unsure what exact routine to follow.
For one app, with the included bz2 file extracted I got hold of the matching version source from the actual developer website. The resultant pre-compile directories/files of each were identical.
I did the ‘configure/make/install’ routine for both and probably got the same working app result. I mean the app worked and the binaries identical. This suggests I could just use the bz2 file content alone from any Suse src.rpm I get.
Question: Is this a reasonable conclusion?
Further reading suggests that I really need to use ‘rpmbuild’ with some options resulting in either: a source tree with applied patches (those .patch files??), actually installed or a final rpm.
This is the confusing area, concerning rpmbuild. I tried doing the prepare a source tree bit but I got error messages that I needed a pile of xxx-devel libraries. I’m not wanting to “build an rpm” file as such or play at developing apps from source.
Question: I redid the prep plus nodeps (rpmbuild --nodeps -bp) and this gave a no-error source with configure which compiled fine, so is this nodep method ok or…?
How come I can do a “normal” compile routine from a source and not get errors about devel libs?
I’ll try to compress my confusion on how to properly use the src.rpm files:
It seems I need to use ‘rpm’ to install a src.rpm to the /usr/src area. Then I need to use ‘rpmbuild’ to get the source tree with a ‘configure’ for starting the compile but this can give me depend errors which I don’t get using the content of the .bz2 from the src.rpm.
Clarification on method appreciated