X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=macos%2Fbuild-dmg.sh;h=803b3d54cc4d7231a25efa90ac3f56e4de707930;hp=4991570d6552bafaa5cdb3b5432493bcb732c826;hb=72a68345ab000d78887522170303ee2131c4f024;hpb=7cfc30797cf0cfdc503d43d90cba60954107517d diff --git a/macos/build-dmg.sh b/macos/build-dmg.sh index 4991570..803b3d5 100755 --- a/macos/build-dmg.sh +++ b/macos/build-dmg.sh @@ -156,10 +156,18 @@ 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} make -C $temp/sface VERSIONTAG="${sface_tag}" SCMURL="${sface_GITPATH}" version # copy sfa/ and sface/ subdirs in image @@ -175,16 +183,15 @@ 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/sface/images 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 + cp $temp/sface/macos/graphic-sfa.png "$img_mnt"/$resource_path/sface/images + cp $temp/sface/macos/graphic-sfa64.png "$img_mnt"/$resource_path/sface/images # 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