Moving some templating from spec to makefile