packaging: build: support subst more than once in line

Change-Id: Ie91ea6bb2765825c022ba699ddf1d7660298265f
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>