aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-01-16 14:55:20 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-01-24 10:41:40 +0100
commit2fd0e000fe6206a113f1def04363e7412a2a5007 (patch)
treed813a613dfc2d8953792694b5274e65b9b71d957 /ctl-lib
parent8f7623339beb1ba07a41a016fa0a1507da92a03e (diff)
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 <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib')
-rw-r--r--ctl-lib/CMakeLists.txt8
-rw-r--r--ctl-lib/appcontroller.pc.in30
-rw-r--r--ctl-lib/ctl-utilities.pc.in7
3 files changed, 39 insertions, 6 deletions
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}
-