--- /dev/null
+[general]
+profile = profile.55std
+#profile = profile.55emul
+#profile = profile.50std
+#profile = profile.50emul
+#profile = profile.40arm
+#profile = profile.40arm64
+#profile = profile.40emul
+#profile = profile.40emul64
+#profile = profile.McSolisArm
+#profile = profile.McSolisEmul
+#profile = profile.McZ4Arm
+#profile = profile.McZ4Emul
+#profile = profile.VdKantM
+#profile = profile.VdKantM_LITE
+#profile = profile.VdKantM2
+#profile = profile.VdKantM2_LITE
+#profile = profile.VdKantSU
+#profile = profile.Vdemulator32
+#profile = profile.DaFhubKantM
+#profile = profile.DaFhubEmul
+user =
+passwdx =
+
+############## Tizen 5.5 ##############
+[profile.55std]
+repos = repo.55base, repo.55std
+buildroot = ~/GBS-ROOT/55std
+
+[profile.55emul]
+repos = repo.55base, repo.55emul
+buildroot = ~/GBS-ROOT/55emul
+
+[repo.55base]
+#url=http://10.113.136.32/download/public_mirror/tizen/base/latest/repos/standard/packages/
+url=http://download.tizen.org/snapshots/tizen/base/latest/repos/standard/packages/
+
+[repo.55std]
+#url=http://10.113.136.32/download/public_mirror/tizen/unified/latest/repos/standard/packages/
+url=http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/
+
+[repo.55emul]
+#url=http://10.113.136.32/download/public_mirror/tizen/unified/latest/repos/emulator/packages/
+url=http://download.tizen.org/snapshots/tizen/unified/latest/repos/emulator/packages/
+
+
+############## Tizen 5.0 ##############
+[profile.50std]
+repos = repo.50base, repo.50std
+buildroot = ~/GBS-ROOT/50std
+
+[profile.50emul]
+repos = repo.50base, repo.50emul
+buildroot = ~/GBS-ROOT/50emul
+
+[repo.50base]
+#url=http://10.113.136.32/download/public_mirror/tizen/5.0-base/latest/repos/standard/packages/
+url=http://download.tizen.org/snapshots/tizen/5.0-base/latest/repos/standard/packages/
+
+[repo.50std]
+#url=http://10.113.136.32/download/public_mirror/tizen/5.0-unified/latest/repos/standard/packages/
+url=http://download.tizen.org/snapshots/tizen/5.0-unified/latest/repos/standard/packages/
+
+[repo.50std.local]
+url=file:/home/wansu/GBS-ROOT/50std/local/repos/tizen50std/armv7l/
+
+[repo.50emul]
+#url=http://10.113.136.32/download/public_mirror/tizen/5.0-unified/latest/repos/emulator/packages/
+url=http://download.tizen.org/snapshots/tizen/5.0-unified/latest/repos/emulator/packages/
+
+
+############## Tizen 4.0 ##############
+[profile.40arm]
+repos = repo.40base_arm, repo.40std
+buildroot = ~/GBS-ROOT/40arm
+
+[profile.40arm64]
+repos = repo.40base_arm64, repo.40std
+buildroot = ~/GBS-ROOT/40arm64
+
+[profile.40emul]
+repos = repo.40base_emul, repo.40emul
+buildroot = ~/GBS-ROOT/40emul
+
+[profile.40emul64]
+repos = repo.40base_emul64, repo.40emul
+buildroot = ~/GBS-ROOT/40emul64
+
+[repo.40base_arm]
+#url=http://10.113.136.32/download/public_mirror/tizen/4.0-base/latest/repos/arm/packages/
+url=http://download.tizen.org/snapshots/tizen/4.0-base/latest/repos/arm/packages/
+
+[repo.40base_arm64]
+#url=http://10.113.136.32/download/public_mirror/tizen/4.0-base/latest/repos/arm64/packages/
+url=http://download.tizen.org/snapshots/tizen/4.0-base/latest/repos/arm64/packages/
+
+[repo.40base_emul]
+#url=http://10.113.136.32/download/public_mirror/tizen/4.0-base/latest/repos/emulator32/packages/
+url=http://download.tizen.org/snapshots/tizen/4.0-base/latest/repos/emulator32/packages/
+
+[repo.40base_emul64]
+#url=http://10.113.136.32/download/public_mirror/tizen/4.0-base/latest/repos/emulator64/packages/
+url=http://download.tizen.org/snapshots/tizen/4.0-base/latest/repos/emulator64/packages/
+
+[repo.40std]
+#url=http://10.113.136.32/download/public_mirror/tizen/4.0-unified/latest/repos/standard/packages/
+url=http://download.tizen.org/snapshots/tizen/4.0-unified/latest/repos/standard/packages/
+
+[repo.40emul]
+#url=http://10.113.136.32/download/public_mirror/tizen/4.0-unified/latest/repos/emulator/packages/
+url=http://download.tizen.org/snapshots/tizen/4.0-unified/latest/repos/emulator/packages/
+
+
+############## Tizen 4.0 MCD ##############
+#McSolisArm
+[profile.McSolisArm]
+repos = repo.mc_solis_base_arm, repo.mc_solis_std
+buildroot = ~/GBS-ROOT/McSolisArm
+[repo.mc_solis_base_arm]
+url=http://165.213.149.200/download/snapshots/tizen/4.0-base-mcd-solis/latest/repos/arm/packages/
+[repo.mc_solis_std]
+url=http://165.213.149.200/download/snapshots/tizen/4.0-mcd-solis/latest/repos/standard/packages/
+
+#McSolisEmul
+[profile.McSolisEmul]
+repos = repo.mc_solis_base_emul, repo.mc_solis_emul
+buildroot = ~/GBS-ROOT/McSolisEmul
+[repo.mc_solis_base_emul]
+url=http://165.213.149.200/download/snapshots/tizen/4.0-base-mcd-solis/latest/repos/ia32/packages/
+[repo.mc_solis_emul]
+url=http://165.213.149.200/download/snapshots/tizen/4.0-mcd-solis/latest/repos/emulator/packages/
+
+[profile.McZ4Arm]
+repos = repo.mc_z4_base_arm, repo.mc_z4_std
+buildroot = ~/GBS-ROOT/McZ4
+[repo.mc_z4_base_arm]
+url=http://165.213.149.200/download/snapshots/tizen/4.0-base-mcd-z4/latest/repos/arm/packages/
+[repo.mc_z4_std]
+url=http://165.213.149.200/download/snapshots/tizen/4.0-mcd-z4/latest/repos/standard/packages/
+
+[profile.McZ4Emul]
+repos = repo.mc_z4_base_emul, repo.mc_z4_emul
+buildroot = ~/GBS-ROOT/McZ4
+[repo.mc_z4_base_emul]
+url=http://165.213.149.200/download/snapshots/tizen/4.0-base-mcd-z4/latest/repos/ia32/packages/
+[repo.mc_z4_emul]
+url=http://165.213.149.200/download/snapshots/tizen/4.0-mcd-z4/latest/repos/emulator/packages/
+
+############## Tizen 4.0 VD ##############
+# VdKantM
+[profile.VdKantM]
+repos = repo.product_KantM, repo.vd_base_standard
+buildroot = ~/GBS-ROOT/VdKantM
+[repo.product_KantM]
+url=http://168.219.244.109/products/tv/archive/2018/MAIN2018/KantM/latest/repos/product/armv7l/packages/
+
+# VdKantM_LITE
+[profile.VdKantM_LITE]
+repos = repo.product_KantM_LITE, repo.vd_base_standard
+buildroot = ~/GBS-ROOT/VdKantM_LITE
+[repo.product_KantM_LITE]
+url=http://168.219.244.109/products/tv/archive/2018/MAIN2018/KantM_LITE/latest/repos/product/armv7l/packages/
+
+# VdKantM2
+[profile.VdKantM2]
+repos = repo.product_KantM2, repo.vd_base_standard
+buildroot = ~/GBS-ROOT/VdKantM2
+[repo.product_KantM2]
+url=http://168.219.244.109/products/tv/archive/2018/MAIN2018/KantM2/latest/repos/product/armv7l/packages/
+
+# VdKantM2_LITE
+[profile.VdKantM2_LITE]
+repos = repo.product_KantM2_LITE, repo.vd_base_standard
+buildroot = ~/GBS-ROOT/VdKantM2_LITE
+[repo.product_KantM2_LITE]
+url=http://168.219.244.109/products/tv/archive/2018/MAIN2018/KantM2_LITE/latest/repos/product/armv7l/packages/
+
+# VdKantSU
+[profile.VdKantSU]
+repos = repo.product_KantSU, repo.vd_base_standard
+buildroot = ~/GBS-ROOT/VdKantSU
+[repo.product_KantSU]
+url=http://168.219.244.109/products/tv/archive/2018/MAIN2018/KantSU/latest/repos/product/armv7l/packages/
+
+# Vdemulator32
+[profile.Vdemulator32]
+repos = repo.product_emulator32, repo.vd_base_emulator32
+buildroot = ~/GBS-ROOT/Vdemulator32
+[repo.product_emulator32]
+url=http://168.219.244.109/products/tv/archive/2018/MAIN2018/emulator32/latest/repos/product/ia32/packages/
+
+[repo.vd_base_standard]
+url=http://168.219.244.109/tizen-rsa/tizen-4.0-base-main2018/standard/latest/repos/base/armv7l/packages/
+
+[repo.vd_base_emulator32]
+url=http://168.219.244.109/tizen-rsa/tizen-4.0-base-main2018/emulator32/latest/repos/base/ia32/packages/
+
+
+############## Tizen 4.0 DA ##############
+[profile.DaFhubKantM]
+repos = repo.40base_arm, repo.da_fhub_kant
+buildroot = ~/GBS-ROOT/DaFhubKantM
+[repo.da_fhub_kant]
+url=http://165.213.149.200/download/snapshots/tizen/4.0-da-fhub4/latest/repos/KANTM/packages/
+
+[profile.DaFhubEmul]
+repos = repo.40base_emul, repo.da_fhub_emul
+buildroot = ~/GBS-ROOT/DaFhubEmul
+[repo.da_fhub_emul]
+url=http://165.213.149.200/download/snapshots/tizen/4.0-da-fhub4/latest/repos/emulator/packages/
DBUS_SERVICE_DIR="/usr/share/dbus-1/system-services"
BUILD_ALL=false
+BUILD_ARM=false
+BUILD_PKG=false
+
+case "$1" in
+ "all"|"")
+ if [ "$1" = "all" ]; then
+ BUILD_ALL=true
+ fi
+ echo "*****************************"
+ echo " Target Binary arch is amd64 "
+ echo "*****************************"
+ export GOARCH=amd64
+ export CC="gcc"
+ ;;
+ "arm"|"tizen")
+ BUILD_ARM=true
+ if [ "$1" = "tizen" ]; then
+ BUILD_PKG=true
+ fi
+ echo "*****************************"
+ echo " Target Binary arch is armv7 "
+ echo "*****************************"
+ export GOARCH=arm GOARM=7
+ export CC="arm-linux-gnueabi-gcc"
+ ;;
+ *)
+ echo "build script"
+ echo "Usage:"
+ echo "---------------------------------------------------------"
+ echo " $0 : build Go executable binary for amd64 "
+ echo " $0 all : build C executable binary for amd64 "
+ echo " $0 arm : build Go object for arm"
+ echo " $0 tizen : build arm packages for Tizen"
+ echo "---------------------------------------------------------"
+ exit 0
+ ;;
+esac
-echo "*****************************"
-echo " Target Binary arch is amd64 "
-echo "*****************************"
-export GOARCH=amd64
export GOPATH=$GOPATH:$BASE_DIR:$BASE_DIR/vendor
ORG_VENDOR_DIR='vendor'
ln -s $BASE_DIR/$ORG_VENDOR_DIR $BASE_DIR/$CUR_VENDOR_DIR
fi
-if [ "$1" = "all" ]; then
- BUILD_ALL=true
-fi
-
-
function install_prerequisite() {
echo ""
echo "-----------------------------------"
make lint
}
+function build_package() {
+ echo ""
+ echo "------------------------------------------"
+ echo " Create Packages for Tizen from gbs build"
+ echo "------------------------------------------"
+
+ gbs -c ./.tizen.gbs.conf build -A armv7l --include-all
+
+ ### build through go toolchain
+ #gbs -c ./.tizen.gbs.conf build -A armv7l --include-all --define 'go_build ON'
+}
+
function register_service() {
echo ""
echo "-----------------------------------"
sudo systemctl status $SERVICE_FILE
}
-
-if [ "$BUILD_ALL" = true ]
-then
+if [ "$BUILD_ARM" = true ]; then
build_clean
- install_prerequisite
- build_test
build_object
- build_dbus
- build_binary
- lint_src_code
- register_service
+ if [ "$BUILD_PKG" = true ]; then
+ build_package
+ fi
else
- build_clean
- build_binary
+ if [ "$BUILD_ALL" = true ]
+ then
+ build_clean
+ install_prerequisite
+ build_test
+ build_object
+ build_dbus
+ build_binary
+ lint_src_code
+ register_service
+ else
+ build_clean
+ build_binary
+ fi
fi
cp %{SOURCE3} ./lib%{name}.manifest
cp %{SOURCE4} ./
cp %{SOURCE5} ./
-%ifarch armv7l
-cp %{SOURCE11} ./
-tar -zxf %{SOURCE11}
-rm -f %{_builddir}/%{name}-%{version}/go1.12.linux-armv7.tar.gz
+
+%if "%{go_build}" == "ON"
+ %ifarch armv7l
+ cp %{SOURCE11} ./
+ tar -zxf %{SOURCE11}
+ rm -f %{_builddir}/%{name}-%{version}/go1.12.linux-armv7.tar.gz
+ %endif
%endif
%build
-ORG_VENDOR_DIR='vendor'
-CUR_VENDOR_DIR='vendor/src'
-ln -s %{_builddir}/%{name}-%{version}/${ORG_VENDOR_DIR} %{_builddir}/%{name}-%{version}/${CUR_VENDOR_DIR}
-
-export GOARCH=arm GOARM=7
-export GOROOT=%{_builddir}/%{name}-%{version}/go
-export PATH=$PATH:%{_builddir}/%{name}-%{version}/go/bin/linux_arm
-export GOPATH=%{_builddir}/%{name}-%{version}:%{_builddir}/%{name}-%{version}/vendor
export BASE_DIR=.
-make clean
-make build-object %{?_smp_mflags}
+%if "%{go_build}" == "ON"
+ ORG_VENDOR_DIR='vendor'
+ CUR_VENDOR_DIR='vendor/src'
+ ln -s %{_builddir}/%{name}-%{version}/${ORG_VENDOR_DIR} %{_builddir}/%{name}-%{version}/${CUR_VENDOR_DIR}
+
+ export GOARCH=arm GOARM=7
+ export GOROOT=%{_builddir}/%{name}-%{version}/go
+ export PATH=$PATH:%{_builddir}/%{name}-%{version}/go/bin/linux_arm
+ export GOPATH=%{_builddir}/%{name}-%{version}:%{_builddir}/%{name}-%{version}/vendor
+
+ make clean
+ make build-object %{?_smp_mflags}
+%endif
+
make build-dbus-server %{?_smp_mflags}
make build-dbus-client %{?_smp_mflags}
export BASE_DIR=.
%make_install
+%post
+systemctl daemon-reload
+systemctl restart %{name}
+
%files
%manifest %{name}.manifest
%license LICENSE.Apache-2.0
--- /dev/null
+/* Code generated by cmd/cgo; DO NOT EDIT. */
+
+/* package interface */
+
+
+#line 1 "cgo-builtin-prolog"
+
+#include <stddef.h> /* for ptrdiff_t below */
+
+#ifndef GO_CGO_EXPORT_PROLOGUE_H
+#define GO_CGO_EXPORT_PROLOGUE_H
+
+typedef struct { const char *p; ptrdiff_t n; } _GoString_;
+
+#endif
+
+/* Start of preamble from import "C" comments. */
+
+
+
+
+/* End of preamble from import "C" comments. */
+
+
+/* Start of boilerplate cgo prologue. */
+#line 1 "cgo-gcc-export-header-prolog"
+
+#ifndef GO_CGO_PROLOGUE_H
+#define GO_CGO_PROLOGUE_H
+
+typedef signed char GoInt8;
+typedef unsigned char GoUint8;
+typedef short GoInt16;
+typedef unsigned short GoUint16;
+typedef int GoInt32;
+typedef unsigned int GoUint32;
+typedef long long GoInt64;
+typedef unsigned long long GoUint64;
+typedef GoInt32 GoInt;
+typedef GoUint32 GoUint;
+typedef __SIZE_TYPE__ GoUintptr;
+typedef float GoFloat32;
+typedef double GoFloat64;
+typedef float _Complex GoComplex64;
+typedef double _Complex GoComplex128;
+
+/*
+ static assertion to make sure the file is being used on architecture
+ at least with matching size of GoInt.
+*/
+typedef char _check_for_32_bit_pointer_matching_GoInt[sizeof(void*)==32/8 ? 1:-1];
+
+typedef _GoString_ GoString;
+typedef void *GoMap;
+typedef void *GoChan;
+typedef struct { void *t; void *v; } GoInterface;
+typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
+
+#endif
+
+/* End of boilerplate cgo prologue. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern int OrchestrationInit();
+
+extern int OrchestrationRequestService(char* p0, char* p1);
+
+extern int PrintLog(char* p0);
+
+#ifdef __cplusplus
+}
+#endif