From: Thierry Parmentelat Date: Mon, 23 May 2011 12:44:49 +0000 (+0200) Subject: fix X-Git-Tag: sface-0.1-10~2 X-Git-Url: http://git.onelab.eu/?p=sface.git;a=commitdiff_plain;h=fe03c7062da272bc1a21e24698974d7b7fc05f2a fix --- diff --git a/macos/build-dmg.sh b/macos/build-dmg.sh index 4991570..9069dcb 100755 --- a/macos/build-dmg.sh +++ b/macos/build-dmg.sh @@ -156,11 +156,23 @@ Also make sure to trash the current one before retrying" # retrieve version number, and run make version sfa_spec=$temp/sfa/sfa.spec - sfa_tag=$(rpm -q --specfile $sfa_spec --qf '%{version}-%{taglevel}') + # 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_tag=$(rpm -q --specfile $sface_spec --qf '%{version}-%{taglevel}') + 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} + echo Before running make -C $temp/sface VERSIONTAG="${sface_tag}" SCMURL="${sface_GITPATH}" version + head -100 $temp/sface/sface/version.py{,.in} make -C $temp/sface VERSIONTAG="${sface_tag}" SCMURL="${sface_GITPATH}" version + echo AFTER + head -100 $temp/sface/sface/version.py{,.in} # copy sfa/ and sface/ subdirs in image rm -rf "$img_mnt"/$resource_path/{sfa,sface} @@ -175,16 +187,13 @@ Also make sure to trash the current one before retrying" ### install background and app icons # clean up any 'background' dir if exists rm -rf "$img_mnt"/{,.}background + mkdir -p "$img_mnt"/.background "$img_mnt"/$resource_path cp $temp/sface/macos/graphic-install-background.png "$img_mnt"/.background/background.png cp $temp/sface/macos/graphic-sfa.icns "$img_mnt"/$resource_path/appIcon.icns # the volume icons won't work - who cares # cp $temp/sface/macos/graphic-vol-sface.icns "$img_mnt"/.background/volumeIcon.icns # cp $temp/sface/macos/graphic-vol-sface.png "$img_mnt"/.background/volumeIcon.png - # instantiate version - sed -e "s,@VERSIONTAG@,$sfa_release,g" -e "s,@SCMURL@,${sfa_GITPATH},g" \ - "$img_mnt"/$resource_path/sfa/util/version.py.in > "$img_mnt"/$resource_path/sfa/util/version.py - # clean up just in case find "$img_mnt" -name '*pyc' | xargs rm -f find "$img_mnt" -name '*~' | xargs rm -f