add gbs build support for Tizen accepted/tizen_unified accepted/tizen_unified_x tizen accepted/tizen/unified/20250310.024602 accepted/tizen/unified/x/20250310.042801
authorInki Dae <inki.dae@samsung.com>
Mon, 23 Dec 2024 04:44:01 +0000 (13:44 +0900)
committerInki Dae <inki.dae@samsung.com>
Fri, 7 Mar 2025 07:05:24 +0000 (16:05 +0900)
Change-Id: Ib2db790c314c260550de339c426ef7782749e6a6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 files changed:
CMakeLists.txt
HailoRT.pc.in [new file with mode: 0644]
LICENSE.MIT [new file with mode: 0644]
hailo-rt.manifest [new file with mode: 0644]
packaging/cli11-src.tar.gz [new file with mode: 0644]
packaging/dotwriter-src.tar.gz [new file with mode: 0644]
packaging/eigen-src.tar.gz [new file with mode: 0644]
packaging/hailo-rt.spec [new file with mode: 0644]
packaging/json-src.tar.gz [new file with mode: 0644]
packaging/protobuf-src.tar.gz [new file with mode: 0644]
packaging/readerwriterqueue-src.tar.gz [new file with mode: 0644]
packaging/spdlog-src.tar.gz [new file with mode: 0644]

index 16ebff31b46650d84ac4fdd487750f197b49205c..f35d851d811ab8cc1313073a960a8ccd82b1cdce 100644 (file)
@@ -1,5 +1,10 @@
 cmake_minimum_required(VERSION 3.0.0)
 
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
 find_program(CCACHE_PROGRAM ccache)
 find_program(CLACHE_PROGRAM clcache)
 
@@ -64,3 +69,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 
 # Add subdirectories
 add_subdirectory(hailort)
+
+configure_file(${PROJECT_NAME}.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc @ONLY)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
\ No newline at end of file
diff --git a/HailoRT.pc.in b/HailoRT.pc.in
new file mode 100644 (file)
index 0000000..d8029ed
--- /dev/null
@@ -0,0 +1,14 @@
+
+# Package Information for pkg-config
+
+prefix=@PREFIX@
+exec_prefix=/usr
+libdir=@LIB_INSTALL_DIR@
+includedir=/usr/include/hailo
+
+Name: @PC_NAME@
+Description: @PACKAGE_DESCRIPTION@
+Version: @VERSION@
+Requires: @PC_REQUIRED@
+Libs: -L${libdir} @PC_LDFLAGS@
+Cflags: -I${includedir} -I/usr/include
diff --git a/LICENSE.MIT b/LICENSE.MIT
new file mode 100644 (file)
index 0000000..7c16bb2
--- /dev/null
@@ -0,0 +1,7 @@
+Copyright (c) 2024 Samsung Electronics Co., Ltd. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/hailo-rt.manifest b/hailo-rt.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
diff --git a/packaging/cli11-src.tar.gz b/packaging/cli11-src.tar.gz
new file mode 100644 (file)
index 0000000..2512211
Binary files /dev/null and b/packaging/cli11-src.tar.gz differ
diff --git a/packaging/dotwriter-src.tar.gz b/packaging/dotwriter-src.tar.gz
new file mode 100644 (file)
index 0000000..2014d41
Binary files /dev/null and b/packaging/dotwriter-src.tar.gz differ
diff --git a/packaging/eigen-src.tar.gz b/packaging/eigen-src.tar.gz
new file mode 100644 (file)
index 0000000..06c855a
Binary files /dev/null and b/packaging/eigen-src.tar.gz differ
diff --git a/packaging/hailo-rt.spec b/packaging/hailo-rt.spec
new file mode 100644 (file)
index 0000000..5a61288
--- /dev/null
@@ -0,0 +1,96 @@
+Name:       hailo-rt
+Summary:    Hailo runtime
+Version:    0.1
+Release:    0
+Group:      Multimedia/Libraries
+License:    MIT, LGPL 2.1
+ExclusiveArch: %{arm} aarch64
+Source0:    %{name}-%{version}.tar.gz
+Source100: protobuf-src.tar.gz
+Source101: spdlog-src.tar.gz
+Source102: eigen-src.tar.gz
+Source103: cli11-src.tar.gz
+Source104: json-src.tar.gz
+Source105: dotwriter-src.tar.gz
+Source106: readerwriterqueue-src.tar.gz
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires: cmake
+%define _unpackaged_files_terminate_build 0
+
+%description
+HailoRT is a lightweight, production-grade runtime library that runs on the host processor and provides a robust user-space library (the HailoRT Library) with intuitive APIs in C/C++ for optimized performance
+
+%package devel
+Summary:    Header and library files for HailoRT
+Group:      Multimedia/Framework
+Requires:   %{name}
+
+%description devel
+HailoRT (Dev)
+
+%prep
+%setup -q
+%setup -q -T -D -a 100
+%setup -q -T -D -a 101
+%setup -q -T -D -a 102
+%setup -q -T -D -a 103
+%setup -q -T -D -a 104
+%setup -q -T -D -a 105
+%setup -q -T -D -a 106
+
+mkdir -p hailort/external
+mv protobuf-src hailort/external/
+mv spdlog-src hailort/external/
+mv eigen-src hailort/external/
+mv cli11-src hailort/external/
+mv json-src hailort/external/
+mv dotwriter-src hailort/external/
+mv readerwriterqueue-src hailort/external/
+
+%build
+%if 0%{?sec_build_binary_debug_enable}
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
+export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+%endif
+
+cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DHAILO_BUILD_EXAMPLES=1 -DHAILO_OFFLINE_COMPILATION=ON
+
+cd build
+make %{?jobs:-j%jobs}
+
+%install
+
+cd build
+%make_install
+
+%define LIB_DIR %(uname -m | grep -q '^arm' && echo lib || echo lib64)
+
+mkdir -p %{buildroot}%{_includedir}/hailort
+mkdir -p %{buildroot}%{_libdir}
+mkdir -p %{buildroot}%{_libdir}/pkgconfig
+mkdir -p %{buildroot}%{_bindir}
+
+strip %{buildroot}/usr/local/%{LIB_DIR}/libhailort.so.4.18.0
+strip %{buildroot}/usr/local/bin/hailortcli
+
+cp -a %{buildroot}/usr/local/include/* %{buildroot}%{_includedir}/
+cp -a %{buildroot}/pkgconfig/HailoRT.pc %{buildroot}%{_libdir}/pkgconfig/
+cp -a %{buildroot}/usr/local/%{LIB_DIR}/* %{buildroot}%{_libdir}/
+cp -a %{buildroot}/usr/local/bin/* %{buildroot}%{_bindir}/
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%manifest %{name}.manifest
+%license LICENSE.MIT
+%defattr(-,root,root,-)
+%{_libdir}/libhailort.so.4.18.0
+%{_libdir}/libhailort.so
+%{_bindir}/*
+
+%files devel
+%{_libdir}/pkgconfig/*.pc
+%{_includedir}/hailo/*
diff --git a/packaging/json-src.tar.gz b/packaging/json-src.tar.gz
new file mode 100644 (file)
index 0000000..2b5ece3
Binary files /dev/null and b/packaging/json-src.tar.gz differ
diff --git a/packaging/protobuf-src.tar.gz b/packaging/protobuf-src.tar.gz
new file mode 100644 (file)
index 0000000..624b455
Binary files /dev/null and b/packaging/protobuf-src.tar.gz differ
diff --git a/packaging/readerwriterqueue-src.tar.gz b/packaging/readerwriterqueue-src.tar.gz
new file mode 100644 (file)
index 0000000..71d705b
Binary files /dev/null and b/packaging/readerwriterqueue-src.tar.gz differ
diff --git a/packaging/spdlog-src.tar.gz b/packaging/spdlog-src.tar.gz
new file mode 100644 (file)
index 0000000..eb07a68
Binary files /dev/null and b/packaging/spdlog-src.tar.gz differ