From 4e2f96d2a9e59a87cad91b89f00971768567ee90 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 16 Feb 2020 16:19:26 +0000
Subject: Fix install paths


diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca47ebf..86e2f22 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,10 @@ set(WITH_LASTFM            NO  CACHE BOOL "Enable scrobbling to LastFM")
 set(WITH_DEBUG             YES CACHE BOOL "Enables debug logging")
 set(WITH_TESTS             NO  CACHE BOOL "Build unit tests")
 
+set(CMAKE_INSTALL_BINDIR=bin)
+set(CMAKE_INSTALL_DATADIR=share/gerbera)
+set(CMAKE_INSTALL_MANDIR=share/man/man1)
+
 # For building packages without depending on the old system libupnp
 set(STATIC_LIBUPNP 0 CACHE BOOL "Link to libupnp statically")
 
@@ -570,15 +574,15 @@ if(WITH_TESTS)
     add_subdirectory(test)
 endif()
 
-INSTALL(TARGETS gerbera DESTINATION bin)
-INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/scripts/js DESTINATION share/gerbera)
-INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/web DESTINATION share/gerbera)
+INSTALL(TARGETS gerbera DESTINATION ${CMAKE_INSTALL_BINDIR})
+INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/scripts/js DESTINATION ${CMAKE_INSTALL_DATADIR})
+INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/web DESTINATION ${CMAKE_INSTALL_DATADIR})
 INSTALL(FILES
         src/database/mysql/mysql.sql
         src/database/mysql/mysql-upgrade.xml
         src/database/sqlite3/sqlite3.sql
         src/database/sqlite3/sqlite3-upgrade.xml
-        DESTINATION share/gerbera)
-INSTALL(FILES ${PROJECT_SOURCE_DIR}/doc/gerbera.1 DESTINATION share/man/man1)
+        DESTINATION ${CMAKE_INSTALL_DATADIR})
+INSTALL(FILES ${PROJECT_SOURCE_DIR}/doc/gerbera.1 DESTINATION ${CMAKE_INSTALL_MANDIR})
 
 include(packaging)
-- 
2.30.2


From 7fa85709cae3aa97ed3270b814ba33d5368b83e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Mon, 22 Feb 2021 20:07:46 +0100
Subject: DATA PATH fix


diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86e2f22..9ac86c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -294,7 +294,7 @@ endif()
 message(STATUS "Gerbera Version: ${GERBERA_VERSION}")
 target_compile_definitions(libgerbera PUBLIC GERBERA_VERSION="${GERBERA_VERSION}")
 
-target_compile_definitions(gerbera PRIVATE PACKAGE_DATADIR="${CMAKE_INSTALL_PREFIX}/share/gerbera")
+target_compile_definitions(gerbera PRIVATE PACKAGE_DATADIR="${CMAKE_INSTALL_DATADIR}")
 
 if (WITH_DEBUG)
     target_compile_definitions(libgerbera PUBLIC TOMBDEBUG)
-- 
2.30.2

