rpm: Fix build of non-snapshot versions

Also converted - to ~, since RPM nowadays understands that symbol
(same semantics as for DEB, that is, it is lexicographically
smaller than the empty string).

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6197/