Commit 25e18198 authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI

Fix build of HiRedis for Debian

parent 9684a659
......@@ -22,18 +22,12 @@
set(EP_flexisip_GIT_REPOSITORY "gitosis@git.linphone.org:flexisip")
set(EP_flexisip_GIT_TAG_LATEST "master")
set(EP_flexisip_GIT_TAG "69cbfa193f92ea42a7df93fa0217b7cf62ee78c3")
set(EP_flexisip_GIT_TAG "722907bff011184ca30e84960e12faaf10057556")
set(EP_flexisip_DEPENDENCIES EP_ortp EP_sofiasip )
list(APPEND EP_flexisip_DEPENDENCIES EP_libodbmysql)
if(PLATFORM STREQUAL "Debian")
# debian 7 ships with an old hiredis version, we use the 0.11 API so we need
# to compile from source
list(APPEND EP_flexisip_DEPENDENCIES EP_hiredis)
endif()
set(EP_flexisip_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_flexisip_BUILD_METHOD "autotools")
set(EP_flexisip_USE_AUTOGEN "yes")
......@@ -52,6 +46,7 @@ else()
message(STATUS "Flexisip to be built with system ODBC")
endif()
list(APPEND EP_flexisip_CONFIGURE_OPTIONS "--disable-transcoder" "--enable-redis" )
set(EP_flexisip_SPEC_FILE "flexisip.spec")
\ No newline at end of file
set(hiredis_filename "v0.11.0.tar.gz")
set(EP_hiredis_URL "https://github.com/redis/hiredis/archive/${hiredis_filename}")
set(EP_hiredis_URL_HASH "SHA1=694b6d7a6e4ea7fb20902619e9a2423c014b37c1")
#set(EP_hiredis_URL "https://github.com/redis/hiredis/archive/${hiredis_filename}")
#set(EP_hiredis_URL_HASH "SHA1=694b6d7a6e4ea7fb20902619e9a2423c014b37c1")
set(EP_hiredis_BUILD_METHOD "rpm")
set(EP_hiredis_GIT_REPOSITORY "https://github.com/redis/hiredis.git")
set(EP_hiredis_GIT_TAG "0fff0f182b96b4ffeee8379f29ed5129c3f72cf7")
set(EP_hiredis_SPEC_FILE "hiredis.spec" )
set(EP_hiredis_CONFIG_H_FILE "${CMAKE_CURRENT_SOURCE_DIR}/builders/hiredis/${EP_hiredis_SPEC_FILE}" )
#create source dir and copy the tar.gz inside
set(EP_hiredis_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "${LINPHONE_BUILDER_WORK_DIR}/rpmbuild/SOURCES/")
set(EP_hiredis_PATCH_COMMAND ${EP_hiredis_PATCH_COMMAND} "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${LINPHONE_BUILDER_WORK_DIR}/Download/EP_hiredis/${hiredis_filename}" "${LINPHONE_BUILDER_WORK_DIR}/rpmbuild/SOURCES/")
set(EP_hiredis_PATCH_COMMAND ${EP_hiredis_PATCH_COMMAND} "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" ${EP_hiredis_CONFIG_H_FILE} "<BINARY_DIR>")
# the spec file goes into the build directory
set(EP_hiredis_PATCH_COMMAND "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" ${EP_hiredis_CONFIG_H_FILE} "<BINARY_DIR>")
# Current versions of CMake cannot download over HTTPS.. we have a speficic step that uses wget to get the archive instead of
# using CMake's own downkoad facility.
set(EP_hiredis_CONFIGURE_COMMAND_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/builders/hiredis/configure.sh.cmake)
......@@ -57,7 +57,12 @@ FOREACH(PROGNAME rpmbuild bison)
ENDFOREACH()
FOREACH(LIBNAME hiredis ssl mysqlclient mysqlclient_r)
set(FLEXISIP_LIBDEPS ssl mysqlclient_r mysqlclient)
if(PLATFORM STREQUAL "Debian")
list(APPEND FLEXISIP_LIBDEPS hiredis)
endif()
FOREACH(LIBNAME ${FLEXISIP_LIBDEPS})
CHECK_LIBRARY(${LIBNAME})
ENDFOREACH()
......@@ -168,6 +173,12 @@ if(PLATFORM STREQUAL "Debian")
list(APPEND EP_flexisip_CONFIGURE_OPTIONS "--with-boost-libdir=/usr/${CMAKE_INSTALL_LIBDIR}")
set(EP_flexisip_RPMBUILD_OPTIONS "${EP_flexisip_RPMBUILD_OPTIONS} --define 'boostlibdir /usr/${CMAKE_INSTALL_LIBDIR}'")
# redis for debian 7 will be installed in the prefix, but we have to pass it through a special flag to the RPM build, since there
# is no pkgconfig
list(APPEND EP_flexisip_DEPENDENCIES EP_hiredis)
list(APPEND EP_flexisip_CONFIGURE_OPTIONS "--with-redis=${CMAKE_INSTALL_PREFIX}")
set(EP_flexisip_RPMBUILD_OPTIONS "${EP_flexisip_RPMBUILD_OPTIONS} --define 'hiredisdir ${RPM_INSTALL_PREFIX}'")
endif()
CHECK_PROGRAM(alien)
CHECK_PROGRAM(fakeroot)
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment