Commit b8e06084 authored by Ghislain MARY's avatar Ghislain MARY

No longer download rootca.pem during build.

parent afa459d1
Pipeline #418 failed with stage
in 0 seconds
...@@ -51,7 +51,6 @@ option(ENABLE_DOC "Enable API documentation generation." NO) ...@@ -51,7 +51,6 @@ option(ENABLE_DOC "Enable API documentation generation." NO)
option(ENABLE_JAVADOC "Add a target to generate documentation for Java API" NO) option(ENABLE_JAVADOC "Add a target to generate documentation for Java API" NO)
option(ENABLE_LDAP "Enable LDAP support." NO) option(ENABLE_LDAP "Enable LDAP support." NO)
option(ENABLE_RELATIVE_PREFIX "Find resources relatively to the installation directory." NO) option(ENABLE_RELATIVE_PREFIX "Find resources relatively to the installation directory." NO)
option(ENABLE_ROOTCA_DOWNLOAD "Download rootca.pem at build time." YES)
option(ENABLE_SQLITE_STORAGE "Turn on compilation sqlite storage, for messages, contacts, history" YES) option(ENABLE_SQLITE_STORAGE "Turn on compilation sqlite storage, for messages, contacts, history" YES)
option(ENABLE_STRICT "Build with strict compile options." YES) option(ENABLE_STRICT "Build with strict compile options." YES)
option(ENABLE_TOOLS "Turn on or off compilation of tools." YES) option(ENABLE_TOOLS "Turn on or off compilation of tools." YES)
......
...@@ -2,4 +2,3 @@ Makefile ...@@ -2,4 +2,3 @@ Makefile
Makefile.in Makefile.in
*.raw *.raw
linphone.pc linphone.pc
rootca.pem
...@@ -20,27 +20,10 @@ ...@@ -20,27 +20,10 @@
# #
############################################################################ ############################################################################
if(ENABLE_ROOTCA_DOWNLOAD) install(FILES rootca.pem
if(APPLE) DESTINATION ${PACKAGE_DATA_DIR}/linphone
find_program(OPENSSL_PROGRAM openssl) PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
execute_process( )
COMMAND ${OPENSSL_PROGRAM} version -d
OUTPUT_VARIABLE OPENSSL_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REGEX REPLACE "OPENSSLDIR: \"(.*)\"" "\\1" HTTPS_CA_DIR "${OPENSSL_VERSION}")
endif()
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/rootca.pem PROPERTIES GENERATED TRUE)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem
COMMAND ${CMAKE_COMMAND} -DHTTPS_CA_DIR=${HTTPS_CA_DIR} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/rootca.cmake)
add_custom_target(rootca ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem
DESTINATION ${PACKAGE_DATA_DIR}/linphone
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
endif()
set(GRAMMAR_FILES set(GRAMMAR_FILES
cpim_grammar cpim_grammar
......
############################################################################
# rootca.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
if(HTTPS_CA_DIR)
set(ENV{HTTPS_CA_DIR} "${HTTPS_CA_DIR}")
endif()
execute_process(
COMMAND ${CMAKE_COMMAND} -E remove "fresh-rootca.pem"
WORKING_DIRECTORY ${OUTPUT_DIR}
)
execute_process(
COMMAND "${SOURCE_DIR}/../scripts/mk-ca-bundle.pl" "-u" "fresh-rootca.pem"
WORKING_DIRECTORY ${OUTPUT_DIR}
)
if(EXISTS "${OUTPUT_DIR}/fresh-rootca.pem")
file(RENAME "${OUTPUT_DIR}/fresh-rootca.pem" "${OUTPUT_DIR}/rootca.pem")
else()
file(COPY "${SOURCE_DIR}/archived-rootca.pem" DESTINATION "${OUTPUT_DIR}")
file(RENAME "${OUTPUT_DIR}/archived-rootca.pem" "${OUTPUT_DIR}/rootca.pem")
endif()
This source diff could not be displayed because it is too large. You can view the blob instead.
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