]> err.no Git - mapper/blob - dpkg-build.sh
Get rid of generated files
[mapper] / dpkg-build.sh
1 #!/bin/sh
2 #
3 # This little script builds an appropriately-versioned .deb file depending
4 # on IT OS give.
5 #
6 # OS2006
7 #  For 770 (-mcpu=arm926ej-s), the version is suffixed with "-OS2006".
8 #
9 # OS2007
10 #  For N800 and 770 (-mcpu=arm1136jf-s), the version is suffixed with "-OS2007".
11
12 # OS2008
13 #  For N800 and N810, the version is suffixed with "-OS2008".
14
15 CHANGELOG=`dirname $0`/debian/changelog
16
17 case "$1" in
18     OS2008)
19     CFLAGS="-O2 -pipe -mcpu=arm1136jf-s"
20     VERSION_SUFFIX=-OS2008
21     DBP_EXTRA=-B
22     ;;
23     OS2007)
24     CFLAGS="-O2 -pipe -mcpu=arm926ej-s"
25     VERSION_SUFFIX=-OS2007
26     DBP_EXTRA=-B
27     ;;
28     OS2006)
29     CFLAGS="-O2 -pipe -mcpu=arm926ej-s"
30     VERSION_SUFFIX=-OS2006
31     DBP_EXTRA=-B
32     ;;
33     *)
34     echo "Give one of OS2006, OS2007 or OS2008 as parameter"
35     exit 1
36     ;;
37 esac
38
39 export CFLAGS
40
41 rm $CHANGELOG
42 head -n 1 $CHANGELOG.in | sed "s/)/$VERSION_SUFFIX)/" > $CHANGELOG
43 awk 'NR>1 {print}' $CHANGELOG.in >> $CHANGELOG
44
45 dpkg-buildpackage -rfakeroot -I.git $DBP_EXTRA