From: Kaj-Michael Lang Date: Thu, 18 Oct 2007 09:08:45 +0000 (+0300) Subject: Take IT OS version as parameter X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21dc0f01bd881e2fbea78416c3a24c5b92237643;p=mapper Take IT OS version as parameter --- diff --git a/dpkg-build.sh b/dpkg-build.sh index e4d5a85..ef4f7b2 100755 --- a/dpkg-build.sh +++ b/dpkg-build.sh @@ -1,26 +1,36 @@ #!/bin/sh # # This little script builds an appropriately-versioned .deb file depending -# on your exact architecture (as defined in CFLAGS). -# On an N800 (-mcpu=arm1136jf-s), the version is suffixed with "-3". -# On a 770 (-mcpu=arm926ej-s), the version is suffixed with "-2". -# In all other cases, the version is suffixed with "-1". +# on IT OS give. +# +# OS2006 +# For 770 (-mcpu=arm926ej-s), the version is suffixed with "-1". +# +# OS2007 +# For N800 (-mcpu=arm1136jf-s), the version is suffixed with "-2". # +# OS2008 +# For N800 and N810, the version is suffixed with "-3". CHANGELOG=`dirname $0`/debian/changelog -case $CFLAGS in - *-mcpu=arm1136jf-s*) +case "$1" in + OS2008) + CFLAGS="-O2 -pipe -mcpu=arm1136jf-s" VERSION_SUFFIX=-3 DBP_EXTRA=-B ;; - *-mcpu=arm926ej-s*) + OS2007) + CFLAGS="-O2 -pipe -mcpu=arm926ej-s" VERSION_SUFFIX=-2 DBP_EXTRA=-B ;; - *) + OS2006) + CFLAGS="-O2 -pipe -mcpu=arm926ej-s" VERSION_SUFFIX=-1 DBP_EXTRA= + *) + echo "Give one of OS2006, OS2007 or OS2008 as parameter" esac head -n 1 $CHANGELOG | sed "s/)/$VERSION_SUFFIX)/" > $CHANGELOG.new @@ -28,6 +38,6 @@ awk 'NR>1 {print}' $CHANGELOG >> $CHANGELOG.new mv $CHANGELOG $CHANGELOG.old mv $CHANGELOG.new $CHANGELOG -dpkg-buildpackage -rfakeroot -I.svn $DBP_EXTRA +dpkg-buildpackage -rfakeroot -I.git $DBP_EXTRA mv $CHANGELOG.old $CHANGELOG