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})
+%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
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}/*