fix issues with specfile template and static packages

generated code didn't work out of the box, now it should