diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 21b7ddff88..3d563f6783 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-09-11 11:30 UTC+0200 Przemyslaw Czerpak + * harbour/harbour.spec + * small fix in auto platform detection (thanks to Tomaz Zupan) + * harbour/make_tgz.sh + * added auto platform detection + 2003-09-11 01:00 UTC+0200 Tomaz Zupan * harbour/harbour.spec * swiched back to gtcrs diff --git a/harbour/harbour.spec b/harbour/harbour.spec index 4a9e4df0bf..155646ff27 100644 --- a/harbour/harbour.spec +++ b/harbour/harbour.spec @@ -13,13 +13,10 @@ ###################################################################### ## Definitions. ###################################################################### -%define is_not_mandrake %(test ! -e /etc/mandrake-release && echo 1 || echo 0) -%if %is_not_mandrake -%define platform %(release="`rpm -q --queryformat='.%{VERSION}' redhat-re -lease 2>/dev/null`" ; if test $? != 0 ; then release="" ; fi ; echo "$release") -%else -%define platform mdk +%define platform %(release=$(rpm -q --queryformat='.%{VERSION}' mandrake-release 2>/dev/null) && echo "mdk$release"|tr -d ".") +%if "%{platform}" == "" + %define platform %(release=$(rpm -q --queryformat='.%{VERSION}' redhat-release 2>/dev/null) && echo "rh$release"|tr -d ".") %endif %define name harbour diff --git a/harbour/make_tgz.sh b/harbour/make_tgz.sh index 97670cdddb..6ab0879d90 100644 --- a/harbour/make_tgz.sh +++ b/harbour/make_tgz.sh @@ -10,6 +10,13 @@ # See doc/license.txt for licensing terms. # --------------------------------------------------------------- +# please add your distro suffix if it not belong to the one recognized below +# and remember that order checking can be important +hb_platform=`rel=$(rpm -q --queryformat='.%{VERSION}' mandrake-release 2>/dev/null) && echo "mdk$rel"|tr -d "."` +[ "${hb_platform}" = "" ] && hb_platform=`rel=$(rpm -q --queryformat='.%{VERSION}' redhat-release 2>/dev/null) && echo "rh$rel"|tr -d "."` + +[ "${hb_platform}" = "" ] || hb_platform="-${hb_platform}" + name="harbour" hb_ver="0.42.0" hb_lnkso="yes" @@ -404,5 +411,5 @@ then done fi -tar -czvf ${name}-${hb_ver}.bin.tar.gz --owner=root --group=root -C "${HB_INST_PREF}" . +tar -czvf ${name}-${hb_ver}${hb_platform}.bin.tar.gz --owner=root --group=root -C "${HB_INST_PREF}" . rm -fR "${HB_INST_PREF}"