The libopenssl1-1.0.1g-0.16.1.rpm package installs into /usr/lib64 so you end up with both the old and newer versions of OpenSSL. The RPM is not relocatable, so I cannot simply change the install prefix.

/usr/lib64/libssl.so.0.9.8
/usr/lib64/libssl.so.1.0.0


This is fine, but I'd like to have 1.0.1g in a completely different location. I grabbed the source RPM hoping I could build 1.0.1g and have it install in another directory, but I'm not having much luck. I've tried things like this:

Code:
$ rpmbuild --rebuild --define '_prefix /tmp/opt/suse' --define '_libdir /tmp/opt/suse/lib64' --define '_openssldir /tmp/opt/suse/etc' --define '_mandir /tmp/opt/suse/share/man' --define '_includedir /tmp/opt/suse/include' --define '_docdir /tmp/opt/suse/share/doc' --define '_bindir /tmp/opt/suse/bin' openssl1-1.0.1g-0.16.1.src.rpm
This results in RPM build errors. What is the proper way of rebuilding this source RPM so that the installation RPMs can be installed in a different directory?