# the script expects the taglevels for both sfa and sface,
# in order to retrieve the corresponding code and to label the resulting package properly
# alternatively, a build-dir and tags file can be used instead
-# Should have the folowing tools installed
+# Should have the following tools installed
# git: to retrieve code
# rpm: to retrieve the version numbers in specfiles
# 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
### 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