Fix gbs build error
authorSangyoon Jang <jeremy.jang@samsung.com>
Tue, 21 Jan 2025 00:48:20 +0000 (09:48 +0900)
committer장상윤/Tizen Platform Lab(SR)/삼성전자 <jeremy.jang@samsung.com>
Tue, 21 Jan 2025 02:09:14 +0000 (11:09 +0900)
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
build.sh
packaging/tizen-action-framework.spec
tidl/prebuild.sh [new file with mode: 0644]

index 98d32da5a618a52e02fd4436139e46943b97a839..98183bfaf517ebfff301625077b9425f2ff9ca87 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -1,14 +1,8 @@
 #!/bin/bash
 
 # generate tidl code
-tidlc -p -l C++ -i tidl/tizen_actions.tidl -o tizen_action_service_proxy && mv tizen_action_service_proxy.* api/src/
-tidlc -s -l C++ -i tidl/tizen_actions.tidl -o tizen_action_service_stub && mv tizen_action_service_stub.* service/src/
-
-if [ $? -ne 0 ]; then
-    echo "*** Failed to generate TIDL code ***"
-    exit 1
-fi
+/bin/bash tidl/prebuild.sh
 
 # build service app
 cd service
-sh build.sh
\ No newline at end of file
+/bin/bash build.sh
index d65d0dd32cfe0802ccd9e1af0a8239849b5ff427..2464c3c438e44ce30f10ab134472eda32cfda9a4 100644 (file)
@@ -7,6 +7,7 @@ License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 Source1001: %{name}.manifest
 BuildRequires:  cmake
+BuildRequires:  tidl
 BuildRequires:  pkgconfig(bundle)
 BuildRequires:  pkgconfig(capi-appfw-app-common)
 BuildRequires:  pkgconfig(dlog)
@@ -36,6 +37,7 @@ Tizen Action Framework Tools.
 %prep
 %setup -q
 cp %{SOURCE1001} .
+/bin/bash ./tidl/prebuild.sh
 
 %build
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
diff --git a/tidl/prebuild.sh b/tidl/prebuild.sh
new file mode 100644 (file)
index 0000000..76cfdfc
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+tidlc -p -l C++ -i $SCRIPT_DIR/tizen_actions.tidl -o tizen_action_service_proxy
+tidlc -s -l C++ -i $SCRIPT_DIR/tizen_actions.tidl -o tizen_action_service_stub
+
+if [ $? -ne 0 ]; then
+    echo "*** Failed to generate TIDL code ***"
+    exit 1
+fi
+
+mv tizen_action_service_proxy.* $SCRIPT_DIR/../api/src/
+mv tizen_action_service_stub.* $SCRIPT_DIR/../service/src/