Added an if statement for building the package from the tar.gz file (if svn is not present you can't get the revision number).
Changed the /lib directory by the variable %{_lib} which is needed for installing the files in the right directory for x64 architectures.