Modify .spec to build tool and install files
authorSangYoun Kwak <sy.kwak@samsung.com>
Mon, 8 Apr 2024 12:31:41 +0000 (21:31 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Mon, 8 Apr 2024 12:31:41 +0000 (21:31 +0900)
In the process of making hal-backend, 'postlinker' is used(refer script
rootstrap_gen_1.0.sh), so CMakeLists.txt is added to build postlinker
executable in the ARM environment.

copy_required_files.sh script is added to read .xml and copy required
files. Currently, it is a dummy script.

Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
CMakeLists.txt [new file with mode: 0644]
copy_required_files.sh [new file with mode: 0755]
packaging/hal-rootstrap.spec
script/CMakeLists.txt [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7c8c360
--- /dev/null
@@ -0,0 +1 @@
+ADD_SUBDIRECTORY(script)
diff --git a/copy_required_files.sh b/copy_required_files.sh
new file mode 100755 (executable)
index 0000000..96f78d1
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/bash
+
+COPY_DEST=$1
+POSTLINKER="./script/postlinker"
+
+touch "${COPY_DEST}/dummy"
index 336383c5c543845b1a1cf15ce498da6cfa085e11..0eee8300833b5021c009b168d3f5422e1409dc3d 100644 (file)
@@ -388,3 +388,18 @@ BuildRequires:     zlib-devel
 
 %description
 Package for rootstrap of hal
+
+%prep
+%setup -q
+%cmake
+
+%build
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+mkdir %{buildroot}
+./copy_required_files.sh %{buildroot}
+
+%files
+/dummy
diff --git a/script/CMakeLists.txt b/script/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9ff50c8
--- /dev/null
@@ -0,0 +1,3 @@
+PROJECT(postlinker C)
+ADD_EXECUTABLE(${PROJECT_NAME} postlinker.c)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /)