From 2fd0e000fe6206a113f1def04363e7412a2a5007 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 16 Jan 2019 14:55:20 +0100 Subject: Adds more details about the library migration - adds the controller binder definitions migration to binder functions definitions and instructions using a sed script to migrate the old functions definition. - adds requirement reminder to af-binder version >= FF - fix wrong git submodule name given as example - Use AGLVERSION variable to set the PROJECT_VERSION. AGLVERSION could then be overwriten using command-line. - Use ${libdir} instead of CMake variable to set the Libs pkg-config variable. Bug-AGL: SPEC-1689 Change-Id: If03f35bab9501fbcb97244836692301c36d6d74c Signed-off-by: Romain Forlot --- ctl-lib/CMakeLists.txt | 8 ++++++-- ctl-lib/appcontroller.pc.in | 30 ++++++++++++++++++++++++++++++ ctl-lib/ctl-utilities.pc.in | 7 +++---- 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 ctl-lib/appcontroller.pc.in (limited to 'ctl-lib') diff --git a/ctl-lib/CMakeLists.txt b/ctl-lib/CMakeLists.txt index 914e11c..278ebd0 100644 --- a/ctl-lib/CMakeLists.txt +++ b/ctl-lib/CMakeLists.txt @@ -15,7 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. ########################################################################### -set(TARGET_NAME "ctl-utilities") +set(TARGET_NAME "appcontroller") +set(LEGACY_NAME "ctl-utilities") +set(AGLVERSION 6.99 CACHE STRING "Current AGL Version") +set(PROJECT_VERSION ${AGLVERSION} CACHE STRING "Project version can override AGLVERSION") set(PROJECT_PRETTY_NAME "Controller") set(PROJECT_DESCRIPTION "controller") set(PROJECT_URL "https://gerrit.automotivelinux.org:29418/src/libappcontroller") @@ -24,7 +27,6 @@ set(PROJECT_AUTHOR_MAIL "fulup@iot.bzh") set(PROJECT_LICENSE "APL2.0") set(PROJECT_LANGUAGES "C") - if(DEFINED ENV{SDKTARGETSYSROOT}) file(STRINGS $ENV{SDKTARGETSYSROOT}/usr/include/linux/version.h LINUX_VERSION_CODE_LINE REGEX "LINUX_VERSION_CODE") set(BUILD_ENV_SYSROOT $ENV{SDKTARGETSYSROOT}) @@ -111,8 +113,10 @@ TARGET_INCLUDE_DIRECTORIES(${TARGET_NAME} ) CONFIGURE_FILE(${TARGET_NAME}.pc.in ${TARGET_NAME}.pc @ONLY) +CONFIGURE_FILE(${LEGACY_NAME}.pc.in ${LEGACY_NAME}.pc @ONLY) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}.pc + ${CMAKE_CURRENT_BINARY_DIR}/${LEGACY_NAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) diff --git a/ctl-lib/appcontroller.pc.in b/ctl-lib/appcontroller.pc.in new file mode 100644 index 0000000..5980576 --- /dev/null +++ b/ctl-lib/appcontroller.pc.in @@ -0,0 +1,30 @@ +## +## Copyright (C) 2016, 2017, 2018 "IoT.bzh" +## +## This file is part of afb-daemon project. +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## + +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: @TARGET_NAME@ +Description: @PROJECT_DESCRIPTION@ +Version: @PROJECT_VERSION@ +URL: @PROJECT_URL@ +Requires.private: afb-helpers +Libs: -L${libdir} -l@TARGET_NAME@ +Cflags: -I${includedir} diff --git a/ctl-lib/ctl-utilities.pc.in b/ctl-lib/ctl-utilities.pc.in index 845ab0d..0094b54 100644 --- a/ctl-lib/ctl-utilities.pc.in +++ b/ctl-lib/ctl-utilities.pc.in @@ -21,11 +21,10 @@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include -Name: @TARGET_NAME@ +Name: @LEGACY_NAME@ Description: @PROJECT_DESCRIPTION@ Version: @PROJECT_VERSION@ URL: @PROJECT_URL@ -Libs.private: -lafb-helpers -Libs: -L@CMAKE_INSTALL_LIBDIR@ -l@TARGET_NAME@ +Requires.private: afb-helpers +Libs: -L${libdir} -l@TARGET_NAME@ Cflags: -I${includedir} - -- cgit 1.2.3-korg