+ # retrieve sfa and sface full repos in a temp dir
+ temp=$(mktemp -d -t sface-dmg)
+
+ git_retrieve $sfa_GITPATH $temp/sfa
+ git_retrieve $sface_GITPATH $temp/sface
+
+ # retrieve version number, and run make version
+ sfa_spec=$temp/sfa/sfa.spec
+ # use newlines and keep only the first line, for multiple packages
+ sfa_version=$(rpm -q --specfile $sfa_spec --qf '%{version}\n' | head -1)
+ # cannot extract taglevel, issues lots of 'error: incorrect format: unknown tag'
+ # turns out release is the same in our case as we haven't computed header.spec
+ sfa_release=$(rpm -q --specfile $sfa_spec --qf '%{release}\n' | head -1 | cut -d. -f1)
+ sfa_tag=${sfa_version}-${sfa_release}
+ make -C $temp/sfa VERSIONTAG="${sfa_tag}" SCMURL="${sfa_GITPATH}" version
+
+ sface_spec=$temp/sface/sface.spec
+ sface_version=$(rpm -q --specfile $sface_spec --qf '%{version}\n' | head -1)
+ sface_release=$(rpm -q --specfile $sface_spec --qf '%{release}\n' | head -1 | cut -d. -f1)
+ sface_tag=${sface_version}-${sface_release}
+ make -C $temp/sface VERSIONTAG="${sface_tag}" SCMURL="${sface_GITPATH}" version
+
+ # copy sfa/ and sface/ subdirs in image