]> git.itanic.dy.fi Git - maemo-mapper/blob - dpkg-build.sh
Fixed bug in POI export to GPX (closes #2216)
[maemo-mapper] / dpkg-build.sh
1 #!/bin/sh
2 #
3 # This little script builds an appropriately-versioned .deb file depending
4 # on your exact architecture (as defined in CFLAGS).
5 # On an N800 (-mcpu=arm1136jf-s), the version is suffixed with "-3".
6 # On a 770 (-mcpu=arm926ej-s), the version is suffixed with "-2".
7 # In all other cases, the version is suffixed with "-1".
8
9
10 CHANGELOG=`dirname $0`/debian/changelog
11
12 # Test whether we're running Chinook or a "legacy" Maemo.
13 MAEMO_VERSION=`pkg-config libosso --modversion | cut -d . -f 1`
14 if [ "x$MAEMO_VERSION" = "x1" ]
15 then
16     VERSION_SUFFIX=-os2006-os2007
17 else
18     VERSION_SUFFIX=-os2008
19 fi
20
21 # Test if this is the armel build (as opposed to the x86 build)
22 GCC_HOST_IS_ARMEL=`gcc --version | head -n 1 | grep arm`
23 if [ "x$GCC_HOST_IS_ARMEL" != "x" ]; then
24     DBP_EXTRA=-B
25 fi
26
27 sed -i "1,1s/(\([0-9.][0-9.]*\)[-a-zA-Z0-9]*)/(\1$VERSION_SUFFIX)/" $CHANGELOG
28
29 dpkg-buildpackage -rfakeroot -i $DBP_EXTRA
30
31 sed -i "1,1s/(\([0-9.][0-9.]*\)[-a-zA-Z0-9]*)/(\1)/" $CHANGELOG