summaryrefslogtreecommitdiff
path: root/make_navit
blob: 1f2594bd64b8629de3ad014accaef560a9d5de00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/bin/bash
set -vx

# Install steps from  http://wiki.maemo.org/Documentation/Maemo_5_Final_SDK_Installation#Installing_Maemo_5_SDK_using_Text-based_Installer

sudo sh -c 'echo "deb http://scratchbox.org/debian/ hathor main" >> /etc/apt/sources.list.d/scratchbox.list'
sudo apt-get update
sudo apt-get install scratchbox-core scratchbox-devkit-apt-https scratchbox-devkit-autotools-legacy scratchbox-devkit-debian-squeeze scratchbox-devkit-doctools scratchbox-devkit-git scratchbox-devkit-perl scratchbox-devkit-python-legacy scratchbox-devkit-qemu scratchbox-devkit-svn scratchbox-libs scratchbox-toolchain-cs2007q3-glibc2.5-arm7 scratchbox-toolchain-cs2007q3-glibc2.5-i486 scratchbox-toolchain-host-gcc


wget http://repository.maemo.org/stable/5.0/maemo-sdk-install_5.0.sh
sed -i -e 's/etch/squeeze/g' maemo-sdk-install_5.0.sh
sudo /scratchbox/sbin/sbox_adduser ubuntu
# bash maemo-sdk-install_5.0.sh
cat > /scratchbox/users/ubuntu/home/ubuntu/setup.sh << EOF
apt-get install devscripts
sb-conf select FREMANTLE_ARMEL
echo "deb http://repository.maemo.org/ fremantle/4bc37c7c77ebe90177c050b805a8dc79 nokia-binaries" >> /etc/apt/sources.list
apt-get update
fakeroot apt-get install -y --force-yes nokia-binaries nokia-apps
EOF

/scratchbox/login bash ~/setup.sh

# check for ssh-key
#if ! ssh-add -l|grep bb:05; then
#  echo "Make sure to have a valid ssh key in ssh agent, otherwise the upload might break"
#  exit 99
#fi

#cleanup and checkout navit
echo "preparing build..."
if bash ./build-scripts/prepare-build > prepare-build.log 2> prepare-build.err; then
  echo ...succeded
else
  echo ...failed
  exit 1
fi

# copy clean sources aside for armel build later
rm -rf navit.save
cp -ra navit navit.save

# Update changelog
cd navit
VERSION=`svnversion`
if [ -n "$ITERATION" ]; then
  VERSION=$VERSION.$ITERATION
fi

cd ..
echo "update changelog..."
if /scratchbox/login -d navit/navit ../../build-scripts/updateChangelog $VERSION  2>&1; then
  echo ...succeded
else
  echo ...failed
  exit 2
fi


# Save debian dir
mv debian debian.`date +%Y%m%d%H%M`
cp -ra navit/debian debian

#build x86 target
echo "building x86..."
if /scratchbox/login -d navit/navit ../../build-scripts/builddeb FREMANTLE_X86 > builddeb_x86.log.log 2>&1; then
  echo ...succeded
else
  echo ...failed
  exit 3
fi

# Upload x86 builds to bokomoko
#if dput bokomoko.de navit_0.2.0+dfsg.1-1maemo1~${VERSION}_i386.changes; then
#  echo ...succeded
#else
#  echo ...failed
#  exit 4
#fi

#save navit-data, since it does not build on armel
cp navit_0.5.0+dfsg.1-1maemo1~${VERSION}_i386.changes tmp
cp navit-data_0.5.0+dfsg.1-1maemo1~${VERSION}_all.deb tmp



# get clean sources again now ARMEL build
rm -rf navit
mv navit.save navit
cp -ra debian navit

#build armel target
if /scratchbox/login -d navit/navit ../../build-scripts/builddeb FREMANTLE_ARMEL > builddeb_arm.log.log 2>&1; then
  echo ...succeded
else
  echo ...failed
  exit 5
fi

# copy back navit-data from X86 build
cp tmp/navit-data_0.5.0+dfsg.1-1maemo1~${VERSION}_all.deb .

# update armel changes file
#if /scratchbox/login -d navit-svn/navit ../../navit-build-scripts/updateChanges ${VERSION}; then
#  echo ...succeded
#else
#  echo ...failed
#  exit 6
#fi

# Upload armel build to bokomoko
#if dput bokomoko.de navit_0.2.0+dfsg.1-1maemo1~${VERSION}_armel.changes; then
#  echo ...succeded
#else
#  echo ...failed
#  exit 7
#fi