--- CMakeLists.txt.orig	2025-06-08 19:16:44 UTC
+++ CMakeLists.txt
@@ -43,94 +43,10 @@ set(EXTERNAL_DIR ${CMAKE_CURRENT_BINARY_DIR}/external)
 
 set(EXTERNAL_DIR ${CMAKE_CURRENT_BINARY_DIR}/external)
 
-set(cjson_cmake_args
-    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-    -DBUILD_SHARED_AND_STATIC_LIBS=On
-    -DBUILD_SHARED_LIBS=Off
-    -DENABLE_CJSON_TEST=Off
-    -DENABLE_CJSON_UTILS=On
-    -DENABLE_TARGET_EXPORT=On
-    -DCMAKE_POLICY_VERSION_MINIMUM=3.5
-    -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-    -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-    -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-    -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-    -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-    -DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
-    -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-    -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
-)
-if(uppercase_CMAKE_SYSTEM_NAME MATCHES WINDOWS)
-    list(APPEND cjson_cmake_args -DWIN32=ON)
-endif()
+# cJSON and cJSONUtils installed from devel/libcjso
 
-ExternalProject_Add(cjson
-  GIT_REPOSITORY "https://github.com/DaveGamble/cJSON"
-  GIT_TAG "v1.7.18"
-  PREFIX "${EXTERNAL_DIR}/cJSON"
-  BUILD_IN_SOURCE 1
-  TEST_COMMAND ""
-  INSTALL_COMMAND ""
-  CMAKE_ARGS ${cjson_cmake_args}
-)
-ExternalProject_Get_Property(cjson source_dir)
-ExternalProject_Get_Property(cjson binary_dir)
-ExternalProject_Get_Property(cjson download_dir)
-set(CJSON_SOURCE_DIR "${source_dir}")
-set(CJSON_BINARY_DIR "${binary_dir}")
-set(CJSON_DOWNLOAD_DIR "${download_dir}")
-if (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
-    set(CJSON_STATIC_NAME "cjson.lib")
-else()
-    set(CJSON_STATIC_NAME "libcjson.a")
-endif()
-# Full path to the expected built static lib
-set(CJSON_STATIC_LIB "${CJSON_BINARY_DIR}/${CJSON_STATIC_NAME}")
+# libuv installed from devel/libuv
 
-set(LIBUV_TAG v1.51.0)
-set(EXTERNAL_DIR ${CMAKE_CURRENT_BINARY_DIR}/external)
-
-set(libuv_cmake_args
-  -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-  -DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}
-  -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-  -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-  -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-  -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-  -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-  -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-  -DLIBUV_BUILD_TESTS=OFF
-  -DLIBUV_BUILD_EXAMPLES=OFF
-  -DLIBUV_INSTALL=OFF
-  -DCMAKE_POSITION_INDEPENDENT_CODE=ON
-  -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
-)
-# Append UV_DISABLE_CLOCK_GETTIME only for Windows
-if(uppercase_CMAKE_SYSTEM_NAME MATCHES WINDOWS)
-  list(APPEND libuv_cmake_args -DWIN32=ON)
-endif()
-
-ExternalProject_Add(libuv_ep
-  GIT_REPOSITORY "https://github.com/libuv/libuv.git"
-  GIT_TAG "${LIBUV_TAG}"
-  PREFIX "${EXTERNAL_DIR}/libuv"
-  CMAKE_ARGS ${libuv_cmake_args}
-  INSTALL_COMMAND ""
-  TEST_COMMAND ""
-)
-ExternalProject_Get_Property(libuv_ep source_dir)
-ExternalProject_Get_Property(libuv_ep binary_dir)
-set(LIBUV_SOURCE_DIR "${source_dir}")
-set(LIBUV_BINARY_DIR "${binary_dir}")
-if (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
-    set(LIBUV_STATIC_NAME "uv.lib")
-else()
-    set(LIBUV_STATIC_NAME "libuv.a")
-endif()
-# Full path to the expected built static lib
-set(LIBUV_STATIC_LIB "${LIBUV_BINARY_DIR}/${LIBUV_STATIC_NAME}")
-
 # beectl
 set(BEECTL_SRCS
   src/beectl.c
@@ -189,8 +105,6 @@ set_property(TARGET beectl PROPERTY C_STANDARD 11) # C
 endif()
 
 set_property(TARGET beectl PROPERTY C_STANDARD 11) # C11
-add_dependencies(beectl cjson)
-add_dependencies(beectl libuv_ep)
 
 # The following would be better approach than including cJSON files in our
 # source list. But the build fails when cross-compiling, since
@@ -233,14 +147,14 @@ set(BEECTL_MANIFEST_TARGET_PATH "${CMAKE_INSTALL_PREFI
 
 message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
 set(BEECTL_MANIFEST_TARGET_PATH "${CMAKE_INSTALL_PREFIX}/bin/beectl")
-set(BEECTL_CHROME_MANIFEST_DIR "etc/opt/chrome/native-messaging-hosts")
+set(BEECTL_CHROME_MANIFEST_DIR "etc/chrome/native-messaging-hosts")
 set(BEECTL_CHROMIUM_MANIFEST_DIR "etc/chromium/native-messaging-hosts")
 
 if(uppercase_CMAKE_SYSTEM_NAME MATCHES LINUX AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(amd|x86_)64$")
     # Fedora 36 amd64 may have a separate /usr/lib64 dir different from /usr/lib.
     set(BEECTL_FIREFOX_MANIFEST_DIR "usr/lib64/mozilla/native-messaging-hosts")
 else()
-    set(BEECTL_FIREFOX_MANIFEST_DIR "usr/lib/mozilla/native-messaging-hosts")
+    set(BEECTL_FIREFOX_MANIFEST_DIR "lib/mozilla/native-messaging-hosts")
 endif()
 
 # RPM package properties
@@ -416,7 +330,7 @@ else(uppercase_CMAKE_SYSTEM_NAME MATCHES WINDOWS)
         COMPONENT config)
 else(uppercase_CMAKE_SYSTEM_NAME MATCHES WINDOWS)
     # Install host app
-    install(TARGETS beectl RUNTIME DESTINATION usr/local/bin COMPONENT applications)
+    install(TARGETS beectl RUNTIME DESTINATION bin COMPONENT applications)
 
     configure_file(
         chrome-com.ruslan_osmanov.bee.json.in
