$OpenBSD$
--- CMakeLists.txt.orig	Fri Jan 15 13:56:57 2016
+++ CMakeLists.txt	Fri Apr 22 00:14:13 2016
@@ -100,7 +100,7 @@ if(UNIX)
 	# Don't put this into CMAKE_CXX_FLAGS because otherwise it is cached,
 	# and when the path is changed both the old and new definition appears
 	# in the list of flags.
-	add_definitions("-DOC_SYSTEM_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/share/games/openclonk\"")
+	add_definitions("-DOC_SYSTEM_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/share/openclonk\"")
 endif()
 
 if(APPLE)
@@ -1057,7 +1057,7 @@ if(HAVE_PTHREAD)
 	target_link_libraries(libmisc pthread)
 endif()
 if(UNIX AND NOT APPLE)
-	target_link_libraries(libmisc rt)
+	target_link_libraries(libmisc)
 endif()
 
 add_library(libc4script
@@ -1163,6 +1163,7 @@ target_link_libraries(openclonk-server
 	${UPNP_LIBRARIES}
 	libc4script
 	libmisc
+	termcap
 )
 if(USE_COCOA)
 	target_link_libraries(openclonk-server "-framework Cocoa")
@@ -1461,7 +1462,7 @@ foreach(group ${OC_C4GROUPS})
 			DEPENDS "${native_c4group}"
 			VERBATIM
 		)
-		install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION share/games/openclonk)
+		install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION share/openclonk)
 	endif()
 endforeach()
 
@@ -1471,11 +1472,9 @@ if (NOT APPLE)
 	
 	# Install new files
 	install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openclonk.desktop DESTINATION share/applications)
-	# Update the MIME cache -- this makes the clonk:// protocol handler actually work
-	install(CODE "execute_process(COMMAND update-desktop-database)")
 
 	# Install binaries
-	install(TARGETS openclonk DESTINATION games)
+	install(TARGETS openclonk DESTINATION bin)
 	install(TARGETS c4group DESTINATION bin)
 else()
 	install(TARGETS openclonk
