Add some files for DIBS 39/176539/7
authorJunghoon Park <jh9216.park@samsung.com>
Fri, 20 Apr 2018 02:09:55 +0000 (11:09 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Wed, 11 Jul 2018 04:48:43 +0000 (04:48 +0000)
Change-Id: I322946ddc53c9d08230848eb455fd23b386faf1a
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
package/build.linux [new file with mode: 0755]
package/build.macos-64 [new file with mode: 0755]
package/build.windows [new file with mode: 0644]
package/pkginfo.manifest [new file with mode: 0644]
package/tidlc-run.bat [new file with mode: 0755]
package/tidlc.install.darwin [new file with mode: 0755]
package/tidlc.install.linux [new file with mode: 0755]
package/tidlc.remove.darwin [new file with mode: 0755]
package/tidlc.remove.linux [new file with mode: 0755]
package/tidlc.remove.windows [new file with mode: 0644]

diff --git a/package/build.linux b/package/build.linux
new file mode 100755 (executable)
index 0000000..66ed036
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash
+# clean
+clean()
+{
+       echo "=========================================CLEAN============================================"
+       cd ${SRCDIR}
+       bash -c "./build.sh clean"
+}
+
+# build
+build()
+{
+       echo "=========================================BUILD============================================"
+       cd ${SRCDIR}
+       bash -c "./build.sh build"
+}
+
+# install
+install()
+{
+       pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+       for pkgname_and_platform in ${pkgname_and_platform_list}
+       do
+               echo "=========================================INSTALL============================================"
+               pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+               package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+               platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+
+               if [ "x${TARGET_OS}" = "x${platform}" ]
+               then
+
+                       INSTALL_DIR=${SRCDIR}/package/${package_name}.package.${platform}
+
+                       mkdir -p ${INSTALL_DIR}/data/tools
+                       cp ${SRCDIR}/build/idlc/tidlc ${INSTALL_DIR}/data/tools/
+
+               fi
+       done
+}
+
+[ "$1" = "clean" ] && clean
+[ "$1" = "build" ] && build
+[ "$1" = "install" ] && install
diff --git a/package/build.macos-64 b/package/build.macos-64
new file mode 100755 (executable)
index 0000000..1fef8c4
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+# clean
+clean()
+{
+       echo "=========================================CLEAN============================================"
+       cd ${SRCDIR}
+       bash -c "./build.sh clean"
+}
+
+# build
+build()
+{
+       echo "=========================================BUILD============================================"
+       cd ${SRCDIR}
+       bash -c "./build.sh build"
+}
+
+# install
+install()
+{
+       echo "=========================================INSTALL============================================"
+       INSTALL_DIR=${SRCDIR}/package/tidlc.package.macos-64
+       mkdir -p ${INSTALL_DIR}/data/tools
+       cp ${SRCDIR}/build/idlc/tidlc ${INSTALL_DIR}/data/tools/
+}
+
+[ "$1" = "clean" ] && clean
+[ "$1" = "build" ] && build
+[ "$1" = "install" ] && install
+exit 0
diff --git a/package/build.windows b/package/build.windows
new file mode 100644 (file)
index 0000000..edb7d1b
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/bash
+# clean
+clean()
+{
+        echo "=========================================CLEAN============================================"
+        cd ${SRCDIR}
+        bash -c "./build.sh clean"
+}
+
+# build
+build()
+{
+        echo "=========================================BUILD============================================"
+        cd ${SRCDIR}
+        bash -c "./build.sh build"
+}
+
+# install
+install()
+{
+        echo "=========================================INSTALL============================================"
+        INSTALL_DIR=${SRCDIR}/package/tidlc.package.${TARGET_OS}
+
+        mkdir -p ${INSTALL_DIR}/data/tools
+        cp ${SRCDIR}/build/idlc/tidlc ${INSTALL_DIR}/data/tools/
+        cp ${SRCDIR}/package/tidlc-run.bat ${INSTALL_DIR}/data/tools/
+}
+
+[ "$1" = "clean" ] && clean
+[ "$1" = "build" ] && build
+[ "$1" = "install" ] && install
+exit 0
diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest
new file mode 100644 (file)
index 0000000..fc97d4a
--- /dev/null
@@ -0,0 +1,28 @@
+Version:1.0.10
+Source:tidlc
+Maintainer:JungHoon Park <jh9216.park@samsung.com>, Hwankyu Jhun <h.jhun@samsung.com>, Inkyun Kil <inkyun.kil@samsung.com>
+
+Package:tidlc
+OS:ubuntu-32
+Build-host-os:ubuntu-32
+Description:Compiler for making stub or proxy code block from TIDL file
+
+Package:tidlc
+OS:windows-32
+Build-host-os:windows-32
+Description:Compiler for making stub or proxy code block from TIDL file
+
+Package:tidlc
+OS:ubuntu-64
+Build-host-os:ubuntu-64
+Description:Compiler for making stub or proxy code block from TIDL file
+
+Package:tidlc
+OS:windows-64
+Build-host-os:windows-64
+Description:Compiler for making stub or proxy code block from TIDL file
+
+Package:tidlc
+OS:macos-64
+Build-host-os:macos-64
+Description:Compiler for making stub or proxy code block from TIDL file
diff --git a/package/tidlc-run.bat b/package/tidlc-run.bat
new file mode 100755 (executable)
index 0000000..974a364
--- /dev/null
@@ -0,0 +1,19 @@
+@echo off
+set SCRIPT=%0
+
+:: delims is a TAB followed by a space
+set KEY=TIZEN_SDK_INSTALLED_PATH
+
+REM find sdk path
+set rkey="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
+set rval="Local AppData"
+FOR /f "tokens=3*" %%a IN ('reg query %rkey% /v %rval%') DO (
+    set sdk_conf_path=%%b
+)
+
+REM find cli path
+FOR /f "tokens=1,2 delims==" %%i IN ('type "%sdk_conf_path%\tizen-sdk-data\tizensdkpath"') DO IF %%i==%KEY% (set SDK_PATH=%%j)
+set TOOLS_HOME=%SDK_PATH%\tools
+
+set EXEC=%TOOLS_HOME%\tidlc.exe %*
+%EXEC%
diff --git a/package/tidlc.install.darwin b/package/tidlc.install.darwin
new file mode 100755 (executable)
index 0000000..e280e0e
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash -x
+
+s=`cat ${HOME}/.bashrc | grep -n "## Tizen SDK configuration" | cut -f1 -d":"`
+
+if [ "x${s}" = "x" ] ; then
+    cat >> ${HOME}/.bashrc << END
+## Tizen SDK configuration
+# This is generated by Tizen SDK. Please do not modify by yourself.
+export PATH=\$PATH:${INSTALLED_PATH}/tools
+## End Tizen SDK configuration
+END
+fi
+
+source ${HOME}/.bashrc
+
+exit 0
diff --git a/package/tidlc.install.linux b/package/tidlc.install.linux
new file mode 100755 (executable)
index 0000000..e280e0e
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash -x
+
+s=`cat ${HOME}/.bashrc | grep -n "## Tizen SDK configuration" | cut -f1 -d":"`
+
+if [ "x${s}" = "x" ] ; then
+    cat >> ${HOME}/.bashrc << END
+## Tizen SDK configuration
+# This is generated by Tizen SDK. Please do not modify by yourself.
+export PATH=\$PATH:${INSTALLED_PATH}/tools
+## End Tizen SDK configuration
+END
+fi
+
+source ${HOME}/.bashrc
+
+exit 0
diff --git a/package/tidlc.remove.darwin b/package/tidlc.remove.darwin
new file mode 100755 (executable)
index 0000000..13ed7c6
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+rm ${INSTALLED_PATH}/tidlc
+s=`cat ${HOME}/.bashrc | grep -n "## Tizen SDK configuration" | cut -f1 -d":"`
+
+if [ "x${s}" = "x" ] ; then
+       exit 1
+fi
+
+if [ ${s} -ge 0 ] ; then
+       e=`cat ${HOME}/.bashrc | grep -n "## End Tizen SDK configuration" | cut -f1 -d":"`
+       if [ $e -ge $s ] ; then
+               cp ${HOME}/.bashrc ${HOME}/.bashrc.tizen
+               sed "${s},${e}d" ${HOME}/.bashrc > ${HOME}/.bashrc.swap
+               mv ${HOME}/.bashrc.swap ${HOME}/.bashrc
+               source ${HOME}/.bashrc
+       fi
+fi
+
+exit 0
diff --git a/package/tidlc.remove.linux b/package/tidlc.remove.linux
new file mode 100755 (executable)
index 0000000..13ed7c6
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+rm ${INSTALLED_PATH}/tidlc
+s=`cat ${HOME}/.bashrc | grep -n "## Tizen SDK configuration" | cut -f1 -d":"`
+
+if [ "x${s}" = "x" ] ; then
+       exit 1
+fi
+
+if [ ${s} -ge 0 ] ; then
+       e=`cat ${HOME}/.bashrc | grep -n "## End Tizen SDK configuration" | cut -f1 -d":"`
+       if [ $e -ge $s ] ; then
+               cp ${HOME}/.bashrc ${HOME}/.bashrc.tizen
+               sed "${s},${e}d" ${HOME}/.bashrc > ${HOME}/.bashrc.swap
+               mv ${HOME}/.bashrc.swap ${HOME}/.bashrc
+               source ${HOME}/.bashrc
+       fi
+fi
+
+exit 0
diff --git a/package/tidlc.remove.windows b/package/tidlc.remove.windows
new file mode 100644 (file)
index 0000000..953968a
--- /dev/null
@@ -0,0 +1,5 @@
+@echo off
+
+set execute_path=tools
+del %INSTALLED_PATH%\%execute_path%\tidlc.exe
+exit 0