[copr] master: Refactor adding build and adding copr into template. Based on patch from Pingou - thanks. (80c7b9c)