Update to last version, add configure.addopts
[maemo-efl] / scripts / e17 / proto / python-efl / build-python-efl-examples-maemo-deb.sh
1 #!/bin/bash
2
3 PRELEASE="indt3"
4 PNAME="python-efl-core-demo"
5 PVER="0.1.1_$PRELEASE"
6 SECTION="user/accessories"
7
8 DESC="Enlightenment Foundation Libraries Core - Python Bindings Demos"
9 LONG_DESC="\
10  This package demonstrate use of python-efl-core
11  .
12  Homepage: http://www.enlightenment.org/
13 "
14 BDEPENDS=""
15 DEPENDS="python-efl-core (>= 0.1.1_indt3)"
16
17 ARCH="$(arch)"
18 DESTDIR="/tmp/$PNAME-$ARCH"
19
20 die() {
21         echo "ERROR: $@"
22         exit 1
23 }
24
25 if [ x"$NODESTDIR" != x1 ]; then
26     rm -fr $DESTDIR
27     mkdir -p $DESTDIR
28 fi
29
30 LOG_PREFIX="$(basename $0)"
31
32 CWD=$PWD
33
34 EXAMPLES_DIR="$DESTDIR/usr/share/python-efl-core-demo/examples/"
35 MENU_DIR="$DESTDIR/usr/share/applications/hildon"
36
37 mkdir -p "$EXAMPLES_DIR"
38 mkdir -p "$MENU_DIR"
39
40 cat > "$MENU_DIR/01-app_launcher.desktop" <<EOF
41 [Desktop Entry]
42 Encoding=UTF-8
43 Version=1.0
44 Type=Application
45 Name=Edje App Launcher Demo
46 Exec=/usr/share/python-efl-core-demo/examples/01-app_launcher.py
47 EOF
48
49 cd python-edje/examples/evas-demo/01-app_launcher/
50 cp 01-app_launcher.py $EXAMPLES_DIR
51 chmod +x $EXAMPLES_DIR/01-app_launcher.py
52 #edje_cc 01-app_launcher.edc || die "Failed to compile theme 01-app_launcher"
53 cp 01-app_launcher.edj $EXAMPLES_DIR
54
55 cd $CWD
56
57 cat > "$MENU_DIR/02-vkbd.desktop" <<EOF
58 [Desktop Entry]
59 Encoding=UTF-8
60 Version=1.0
61 Type=Application
62 Name=Edje Virtual Keyboard
63 Exec=/usr/share/python-efl-core-demo/examples/02-vkbd.py
64 EOF
65
66 cd python-edje/examples/evas-demo/02-vkbd/
67 cp 02-vkbd.py $EXAMPLES_DIR
68 chmod +x $EXAMPLES_DIR/02-vkbd.py
69 #edje_cc 02-vkbd.edc || die "Failed to compile theme 02-vkbd"
70 cp 02-vkbd.edj $EXAMPLES_DIR
71
72 cd $CWD
73
74
75 if [ x"$NODESTDIR" != x1 ]; then
76     cd $DESTDIR
77     tar czf $DESTDIR.tar.gz .
78     cd $CWD
79 fi
80
81 SIZE=$(du -sc $DESTDIR | grep total | sed s/total//)
82
83 ##
84 ## Package
85 ##
86 PDIR="${DESTDIR}-deb"
87 mkdir -p $PDIR
88 cd $PDIR
89 cat > control <<EOF
90 Package: $PNAME
91 Version: $PVER
92 Section: $SECTION
93 Priority: optional
94 Architecture: armel
95 Installed-Size: $SIZE
96 Maintainer: Gustavo Sverzut Barbieri <gustavo.barbieri@openbossa.org>
97 Build-Depends: $BDEPENDS
98 Depends: $DEPENDS
99 Description: $DESC
100 $LONG_DESC
101 EOF
102 echo 2.0 > debian-binary
103 tar czf control.tar.gz control
104 (cd $DESTDIR; tar czf $PDIR/data.tar.gz .)
105 rm -f ${PNAME}_${PVER}.deb
106 ar q ${PNAME}_${PVER}_armel.deb debian-binary control.tar.gz data.tar.gz
107 echo $PWD/${PNAME}_${PVER}_armel.deb