From: SangYoun Kwak Date: Tue, 23 Apr 2024 02:32:20 +0000 (+0900) Subject: Modify bsdiff to be built during gbs build X-Git-Tag: accepted/tizen/unified/20240502.044710~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=652c9a8e4c96fb93d006574aba8c23ad34c9f93b;p=platform%2Fcore%2Fsystem%2Fupgrade-tools.git Modify bsdiff to be built during gbs build Since bsdiff(executable name is ss_bsdiff) is required to make delta image, CMakeLists.txt and .spec files are modified to make it to be built during the gbs build. ss_bsdiff is installed under /upgrade-tools/mk_delta/common/bin. Change-Id: I58b52b85282bac775e03ac1222081d1f4dcb9732 Signed-off-by: SangYoun Kwak --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fd12d3e..028b5fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1 +1,3 @@ PROJECT(upgrade-tools) + +ADD_SUBDIRECTORY(bsdiff) diff --git a/bsdiff/CMakeLists.txt b/bsdiff/CMakeLists.txt index fb65ea5..66d45f8 100644 --- a/bsdiff/CMakeLists.txt +++ b/bsdiff/CMakeLists.txt @@ -17,4 +17,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") ADD_EXECUTABLE(ss_bsdiff ${ss_bsdiff_SRCS}) TARGET_LINK_LIBRARIES(ss_bsdiff ${${PROJECT_NAME}_pkgs_LDFLAGS} "-g" "-pthread") -INSTALL(TARGETS ss_bsdiff DESTINATION bin) +INSTALL(TARGETS ss_bsdiff DESTINATION ${INSTALL_PATH}) diff --git a/packaging/upgrade-tools.spec b/packaging/upgrade-tools.spec index cd8f80e..ae513cf 100644 --- a/packaging/upgrade-tools.spec +++ b/packaging/upgrade-tools.spec @@ -1,3 +1,7 @@ +%define install_path /%{name} +%define mk_delta_install_path %{install_path}/mk_delta +%define bin_install_path %{mk_delta_install_path}/common/bin + Name: upgrade-tools Version: 0.1.0 Release: 0 @@ -7,23 +11,25 @@ Group: System/Tools Source0: %{name}-%{version}.tar.gz BuildRequires: cmake -BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(libbrotlienc) +BuildRequires: pkgconfig(libdivsufsort) %description Tools for upgrade %prep %setup -q -%cmake . +%cmake . -DINSTALL_PATH=%{bin_install_path} %build make %{?jobs:-j%jobs} %install rm -rf %{buildroot} -mkdir -p %{buildroot}/upgrade-tools/mk_delta -cp -r ./scripts %{buildroot}/upgrade-tools/. -cp -r ./mk_delta/common %{buildroot}/upgrade-tools/mk_delta/. +mkdir -p %{buildroot}/%{bin_install_path} +cp -r ./scripts %{buildroot}/%{install_path} +cp -r ./mk_delta/common %{buildroot}/%{mk_delta_install_path}/. +%make_install %files -/upgrade-tools/* +%{install_path}/*