--- CMakeLists.txt.orig	2023-02-20 21:21:01 UTC
+++ CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.0.0)
 
 # Default CMAKE_INSTALL_PREFIX should be set before PROJECT()
-SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install dir prefix")
+SET(CMAKE_INSTALL_PREFIX "%%PREFIX%%" CACHE PATH "Install dir prefix")
 
 ####################################################################
 # Project specific information
@@ -21,12 +21,12 @@ Input tables themselves are in subpackages."
     )
 
 IF(CMAKE_SYSTEM_PROCESSOR MATCHES "64")
-    SET(LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib64" CACHE PATH "Library dir")
+    SET(LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Library dir")
 ELSE(CMAKE_SYSTEM_PROCESSOR MATCHES "64")
     SET(LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Library dir")
 ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "64")
 SET(LIBEXEC_DIR "${LIB_DIR}" CACHE PATH "LIBEXEC dir")
-SET(DATA_DIR "/usr/share")
+SET(DATA_DIR "%%PREFIX%%/share")
 
 ####################################################################
 # Building
@@ -36,6 +36,6 @@ ADD_SUBDIRECTORY(tables)
 ####################################################################
 # Installing
 #
-SET(PRJ_DOC_DIR "${DATA_DIR}/doc/ibus-table-chinese")
+SET(PRJ_DOC_DIR "%%DOCSDIR%%")
 INSTALL(FILES AUTHORS README ChangeLog COPYING DESTINATION ${PRJ_DOC_DIR})
 
