Change build script to build in one directory rather than common/headed 96/320196/1 accepted/tizen/9.0/unified/20250314.155124
authorSangYoun Kwak <sy.kwak@samsung.com>
Mon, 24 Feb 2025 11:00:31 +0000 (20:00 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Tue, 25 Feb 2025 06:48:23 +0000 (15:48 +0900)
hal-rootstrap package was separated as common and headed, since there
were packages which require

Among the hal-backend packages built using hal-rootstrap, there were
some packages that linked unused libraries.
To prevent this, hal-rootstrap was divided into two common/headed
packages.

This phenomenon was due to libtool and it is fixed, there is no reason
to keep two common/headed hal-rootstrap packages.

Change-Id: I8c657ec2ecf3b10d20fe20c6334cbf90979e83c0
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
CMakeLists.txt
generate_rootstrap.sh
packaging/hal-rootstrap-headed.pc.in [deleted file]
packaging/hal-rootstrap.pc.in
packaging/hal-rootstrap.spec

index 2ec8d1fb4b88f477db2dd64139edbe37dfd0046d..db44fc816bc1970b015f5efc781aca99e60d97d2 100644 (file)
@@ -1,7 +1,6 @@
 PROJECT(hal-rootstrap)
 
 SET(HAL_ROOTSTRAP "${PROJECT_NAME}")
-SET(HAL_ROOTSTRAP_HEADED "${PROJECT_NAME}-headed")
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(EXEC_PREFIX "${PREFIX}/bin")
@@ -14,10 +13,4 @@ CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${HAL_ROOTSTRAP}.pc.in
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${HAL_ROOTSTRAP}.pc
        DESTINATION ${LIBDIR}/pkgconfig)
 
-CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${HAL_ROOTSTRAP_HEADED}.pc.in
-       ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${HAL_ROOTSTRAP_HEADED}.pc
-       @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${HAL_ROOTSTRAP_HEADED}.pc
-       DESTINATION ${LIBDIR}/pkgconfig)
-
 ADD_SUBDIRECTORY(script)
index 751dad90a5d98abff1200ef51aa3c09530292744..1e7911ed2dec1d0838e033106c479781f0dcf01a 100755 (executable)
@@ -105,10 +105,8 @@ function generate_rootstrap_riscv64 {
 
 function generate_rootstrap {
        local arch=$1
-       local rootstrap_type=$2
-       local include_internal=$3
+       local include_internal=$2
        local include_internal_option=''
-       local rootstrap_resource_dir="./rs_resource"
 
        if [[ ${include_internal} == 1 ]]; then
                include_internal_option="--include-internal"
@@ -116,8 +114,8 @@ function generate_rootstrap {
                include_internal_option=""
        fi
 
-       rm -rf "${rootstrap_resource_dir}"
-       cp -r "/tmp/rs_resource/${ROOTSTRAP_TYPE}" "${rootstrap_resource_dir}"
+       rm -rf "./rs_resource"
+       cp -r "/tmp/rs_resource" "."
 
        case "${arch}" in
                "arm")
@@ -148,15 +146,14 @@ function generate_rootstrap {
 }
 
 ARCH=$1
-ROOTSTRAP_TYPE=$2
-COPY_DEST=$3
-INCLUDE_INTERNAL=$4
+COPY_DEST=$2
+INCLUDE_INTERNAL=$3
 
-if [[ -z "${ARCH}" ]] || [[ -z "${ROOTSTRAP_TYPE}" ]] || [[ -z "${COPY_DEST}" ]] || [[ -z "${INCLUDE_INTERNAL}" ]]; then
-       echo "3 parameters are required: <architecture> <rootstrap type> <generate destination> <include internal>"
+if [[ -z "${ARCH}" ]] || [[ -z "${COPY_DEST}" ]] || [[ -z "${INCLUDE_INTERNAL}" ]]; then
+       echo "3 parameters are required: <architecture> <generate destination> <include internal>"
        echo "<include internal>: 0(do not include internal), 1(include internal)"
        exit 1
 fi
 
 prepare_generation "${COPY_DEST}"
-generate_rootstrap "${ARCH}" "${ROOTSTRAP_TYPE}" "${INCLUDE_INTERNAL}"
+generate_rootstrap "${ARCH}" "${INCLUDE_INTERNAL}"
diff --git a/packaging/hal-rootstrap-headed.pc.in b/packaging/hal-rootstrap-headed.pc.in
deleted file mode 100644 (file)
index 6dfcc06..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Package Information for pkg-config
-
-package_name=hal-rootstrap
-prefix=/opt/data/hal-rootstrap@PREFIX@
-exec_prefix=/opt/data/hal-rootstrap@EXEC_PREFIX@
-hal_rootstrap_dir_symbol=hal_rootstrap_dir
-hal_rootstrap_dir=/opt/data/hal-rootstrap/headed
-hal_rootstrap_libdir=${hal_rootstrap_dir}@LIBDIR@
-hal_rootstrap_include_dir=${hal_rootstrap_dir}@INCLUDEDIR@
-
-Name: ${package_name}
-Description: ${package_name} interface
-Version: @VERSION@
-
-Requires:
-
-Libs: -L${hal_rootstrap_dir}
-Cflags: -I${hal_rootstrap_dir}
-CXXflags: -I${hal_rootstrap_dir}
index b6f06a18d56e36868175afb35321792b38217d2a..f07a215c5ca92bb1dde422e590aeb06a3ea23c27 100644 (file)
@@ -4,7 +4,7 @@ package_name=hal-rootstrap
 prefix=/opt/data/hal-rootstrap@PREFIX@
 exec_prefix=/opt/data/hal-rootstrap@EXEC_PREFIX@
 hal_rootstrap_dir_symbol=hal_rootstrap_dir
-hal_rootstrap_dir=/opt/data/hal-rootstrap/common
+hal_rootstrap_dir=/opt/data/hal-rootstrap
 hal_rootstrap_libdir=${hal_rootstrap_dir}@LIBDIR@
 hal_rootstrap_include_dir=${hal_rootstrap_dir}@INCLUDEDIR@
 
index 1ce874008fc42512517da3a9053a91b1d5f5ffaa..dd0d79fd022df111bb3719a5ddf65ff0b969893b 100644 (file)
@@ -1,10 +1,6 @@
 %define name                           hal-rootstrap
 %define devel_name                     hal-rootstrap-devel
-%define hal_rootstrap_install_path     /opt/data/hal-rootstrap/common
-
-%define headed_name                            hal-rootstrap-headed
-%define headed_devel_name                      hal-rootstrap-headed-devel
-%define hal_rootstrap_headed_install_path      /opt/data/hal-rootstrap/headed
+%define hal_rootstrap_install_path     /opt/data/hal-rootstrap
 
 %if "%{_with_da_profile}" == "1"
 %define WITH_DA 1
@@ -58,23 +54,6 @@ Requires:    %{name} = %{version}-%{release}
 %description -n        %{devel_name}
 %{name} Interface for product vendor developer
 
-### hal-rootstrap-headed
-%package -n    %{headed_name}
-Summary:       Package for rootstrap of hal, for headed image
-AutoReqProv:   no
-
-%description -n        %{headed_name}
-Package for rootstrap of hal, for headed image
-
-### hal-rootstrap-headed-devel
-%package -n    %{headed_devel_name}
-Summary:       %{headed_name} interface
-Group:         Development/Libraries
-Requires:      %{headed_name} = %{version}-%{release}
-
-%description -n        %{headed_devel_name}
-${headed_name} Interface for product vendor developer
-
 %prep
 %setup -q
 %cmake . -DCMAKE_LIBDIR_PREFIX=%{_libdir}
@@ -88,17 +67,11 @@ mkdir %{buildroot}
 mkdir -p %{buildroot}%{_libdir}/pkgconfig/
 
 # hal-rootstrap
-./generate_rootstrap.sh "%{_arch}" "common" "%{buildroot}%{hal_rootstrap_install_path}" "%{INCLUDE_INTERNAL}"
+./generate_rootstrap.sh "%{_arch}" "%{buildroot}%{hal_rootstrap_install_path}" "%{INCLUDE_INTERNAL}"
 cp packaging/hal-rootstrap.pc %{buildroot}%{_libdir}/pkgconfig/
 ./modify_pc.py "%{buildroot}%{_libdir}/pkgconfig/hal-rootstrap.pc" "%{buildroot}%{hal_rootstrap_install_path}/%{_libdir}/pkgconfig"
 rm -f "%{buildroot}%{hal_rootstrap_install_path}/%{_libdir}/pkgconfig/*.pc"
 
-# hal-rootstrap-headed
-./generate_rootstrap.sh "%{_arch}" "headed" "%{buildroot}%{hal_rootstrap_headed_install_path}" "%{INCLUDE_INTERNAL}"
-cp packaging/hal-rootstrap-headed.pc %{buildroot}%{_libdir}/pkgconfig/
-./modify_pc.py "%{buildroot}%{_libdir}/pkgconfig/hal-rootstrap-headed.pc" "%{buildroot}%{hal_rootstrap_headed_install_path}/%{_libdir}/pkgconfig"
-rm -f "%{buildroot}%{hal_rootstrap_headed_install_path}/%{_libdir}/pkgconfig/*.pc"
-
 %files
 %{hal_rootstrap_install_path}
 %exclude %dir %{hal_rootstrap_install_path}/%{_includedir}
@@ -107,12 +80,3 @@ rm -f "%{buildroot}%{hal_rootstrap_headed_install_path}/%{_libdir}/pkgconfig/*.p
 %defattr(-,root,root,-)
 %{hal_rootstrap_install_path}/%{_includedir}
 %{_libdir}/pkgconfig/hal-rootstrap.pc
-
-%files -n %{headed_name}
-%{hal_rootstrap_headed_install_path}
-%exclude %dir %{hal_rootstrap_headed_install_path}/%{_includedir}
-
-%files -n %{headed_devel_name}
-%defattr(-,root,root,-)
-%{hal_rootstrap_headed_install_path}/%{_includedir}
-%{_libdir}/pkgconfig/hal-rootstrap-headed.pc