#!/bin/sh
# PURPOSE
-# package a combination of sfa+sface into a snow leopard dmg install disk
+# package a combination of sfa+sface into a dmg install disk
+# supports leopard and snow leopard
#
# REQUIREMENTS
# sface-skel-snow-leopard<arch>.dmg is the skeleton that has Qt and all the other third-party software
# 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
+# git: to retrieve code
+# rpm: to retrieve the version numbers in specfiles
# NOTES
# we initially leveraged the first similar packaging initially made by Baris Metin
if [ "$skelapp" != "$app" ] ; then
mv "$img_mnt/$skelapp" "$img_mnt/$app"
fi
+ # unmount the skeleton
+ hdiutil unmount "$skel_mnt"
+
#
resource_path=$app/Contents/Resources
bin_path=$app/Contents/MacOS
# retrieve sfa/sfa and sface/sface in the image
rm -rf "$img_mnt"/$resource_path/{sfa,sface}
git_retrieve $sfa_GITPATH sfa "$img_mnt"/$resource_path/
+ # retrieve version number from specfile
+ sfa_tag=$(rpm -q --specfile "$img_mnt"/$resource_path/sfa/sfa.spec --qf '%{version}-%{taglevel}')
+ make -C "$img_mnt"/$resource_path/sfa VERSIONTAG="${sfa_tag}" SCMURL="${sfa_GITPATH}" version
+
git_retrieve $sface_GITPATH sface "$img_mnt"/$resource_path/
+ # retrieve version number from specfile
+ sface_tag=$(rpm -q --specfile "$img_mnt"/$resource_path/sface/sface.spec --qf '%{version}-%{taglevel}')
+ make -C "$img_mnt"/$resource_path/sface VERSIONTAG="${sface_tag}" SCMURL="${sface_GITPATH}" version
+
# copy binaries from sface to the bin dir
for bin in sface.bin sface-run; do
# don't use the --file mode as this loses the executable bit
hdiutil convert -quiet -format UDZO -imagekey zlib-level=9 -o $img_dmg $img_raw_dmg
# clean up the raw image
rm -f $img_raw_dmg
- # unmount the skeleton
- hdiutil unmount "$skel_mnt"
echo "=================================================="
echo "Install image ready in $img_dmg"