Rebuilding an existing src.rpm is probably the easiest. I would definitely not go the way of configure, make, make install because (a) that doesn't scale, (b) doesn't provide for easy removal / upgrading of the package and (c) is not atomic.
Building an RPM is not so hard. There used to be a pretty good beginners tutorial at Linux.com, before they destroyed the site. You can try this one, but it's a lot of text, not easy to digest. Still, it's better than nothing.
I'll give you a few pointers, out of the back of my head:
- setup an .rpmmacros file in ~
- create ~/rpmbuild/{RPMS,SRPMS,SPECS,BUILD,BUILDROOT,SOURCES}
- drop the source tarball in ~/rpmbuild/SOURCES
- drop the the spec file(s) in ~/rpmbuild/SPECS
- run rpmbuild -bp YOURSPEC in ~/rpmbuild/SPECS (runs prepare phase)
- run rpmbuild -bc YOURSPEC in ~/rpmbuild/SPECS (above and runs compile phase)
- run rpmbuild -bb YOURSPEC in ~/rpmbuild/SPECS (above and builds actual package)
If everything worked out, your RPM will have appeared in ~/rpmbuild/RPMS/${arch}.
I tend to use 5, 6 and 7 separately when creating new RPM's, because I like to inspect the ouput in detail. You might want to go for 7 immediately if you have a vendor provided specfile.
I usually have something like this in my .rpmmacros.
%_topdir /home/YOURNAME/rpmbuild
%packager YOUR NAME <YOUR@EMA.IL>
%_tmppath /tmp
As for the syntax of the specfile: it is not that hard. There exists a very detailed, be it very old, reference work called 'Maximum RPM'. Everything you want to know is in there.
To do this in a distro-independent* fashion you can use ldconfig with grep, like this:
ldconfig -p | grep libjpeg
If libjpeg is not installed, there will be no output. If it is installed, you will get a line for each version available.
Replace libjpeg by any library you want, and you have a generic, distro-independent* way of checking for library availability.
If for some reason the path to ldconfig is not set, you can try to invoke it using its full path, usually /sbin/ldconfig
.
**99% of the times*
Best Answer
For SLES11 SP1, the key command is
zypper
"se" is the short version of 'search'. Also more standard
rpm -q tightvnc
works as well.For zypper the "info" command will give you details about the package, including versions.