summaryrefslogtreecommitdiffstats
path: root/buildpkg.sh
blob: facb5f305222fca2bb116042ba9245abd6f284e4 (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
#!/bin/bash

# A script to generate the source tar.gz to be
# uploaded to Maemo build bot.
# It is important to note the copy of the shared directory
# to the demo directory. We have to do it in order to
# provide the whole source needed, so the build bot
# can generate the .deb packages.

# This small hack is necessary until the contents
# of shared/ aren't distributed as another package.

if [ $# -eq 0 ]; then
    echo "Usage: buildpkg DEMO"
    exit 1
fi

DEMO_DIR=$1

cp -r shared $DEMO_DIR
cd $DEMO_DIR
sed -i 's/\.\.\/shared/shared/g' shared/shared.pri $DEMO_DIR.pro
if [ -e shared2.pri ]; then
    sed -i 's/\.\.\/shared/shared/g' shared2.pri
fi
mad dpkg-buildpackage -rfakeroot
rm -fr build/ debian/qtmobiledemo-$DEMO_DIR/ shared/