summaryrefslogtreecommitdiff
path: root/package/build.ubuntu-64
blob: 40856e033437f0d1cf74ca4779c884d6b55d4c66 (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
#!/bin/sh -xe
# clean
clean()
{
	prepare

	cd $SRCDIR/tizen/
	if test -e "Makefile"
	then
		./emulator_configure.sh
		make clean
	fi
	rm -rf $SRCDIR/*.zip
	rm -rf $SRCDIR/*.tar.gz
}

# check build environment
prepare()
{
    if [ "$JAVA_HOME" = "" ]
    then
        echo "Make sure that you have installed JDK"
        echo "and then set installed JDK/bin path into JAVA_HOME"
        echo "as a system environment variable on your PC!!"
        exit 1
    fi
}

# build
build()
{
	cd $SRCDIR/tizen/
#	./emulator_configure.sh
	make all_dibs
}

# install
install()
{
	BIN_DIR=$SRCDIR/package/emulator-qemu-x86.package.${TARGET_OS}/data/tools
	mkdir -p $BIN_DIR

	cd $SRCDIR/tizen
	make install_dibs
	mv emulator $BIN_DIR
}

[ "$1" = "clean" ] && clean
[ "$1" = "build" ] && build
[ "$1" = "install" ] && install

echo "success"