Allow setting of libexec location 99/21199/1
authorJosé Bollo <jose.bollo@iot.bzh>
Tue, 30 Apr 2019 08:00:35 +0000 (10:00 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 30 Apr 2019 08:00:35 +0000 (10:00 +0200)
The location of the framework binding could not
be tuned but is fixed.

The default location is good but it is important
to be able to tune that location. This at least
has the good effect that the location is set at
one point in the build system instead of at multiple
points as today.

Bug-AGL: SPEC-2367

Change-Id: Ib06fdff56d1828eacd0d1f82c2e1308d0b36fa5e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
CMakeLists.txt
conf/system/afm-system-daemon.service.in
src/CMakeLists.txt

index 76753b0..3d1ce1b 100644 (file)
@@ -41,6 +41,7 @@ set(SIMULATE_SMACK  OFF CACHE BOOL "if set, the smack environment is simulated")
 set(afm_name                "afm" CACHE STRING "Name for application framework user")
 set(afm_confdir             "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${afm_name}" CACHE STRING "Directory for configuration files")
 set(afm_datadir             "${CMAKE_INSTALL_FULL_DATADIR}/${afm_name}" CACHE STRING "Root directory for installions")
+set(afm_libexecdir          "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${afm_name}" CACHE STRING "Directory for installing internal binaries")
 set(afm_appdir              "${afm_datadir}/applications" CACHE STRING "Directory for installing applications")
 set(afm_icondir             "${afm_datadir}/icons" CACHE STRING "Directory for installing icons")
 set(afm_prefix              "urn:AGL:" CACHE STRING "Prefix for uniform resource name")
index f5227dd..fa83f11 100644 (file)
@@ -6,7 +6,7 @@ Requires=afm-system-setup.service
 #User=afm
 #Group=afm
 SyslogIdentifier=afm-system-daemon
-ExecStart=/usr/bin/afb-daemon --name=afm-system-daemon --no-httpd --no-ldpaths --binding=@CMAKE_INSTALL_FULL_LIBEXECDIR@/afm/afm-binding.so --ws-server=sd:afm-main
+ExecStart=/usr/bin/afb-daemon --name=afm-system-daemon --no-httpd --no-ldpaths --binding=@afm_libexecdir@/afm-binding.so --ws-server=sd:afm-main
 Restart=on-failure
 RestartSec=5
 CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_MAC_OVERRIDE
index 79da722..8f081ee 100644 (file)
@@ -180,7 +180,7 @@ if(libsystemd_FOUND AND AFB_FOUND)
                PREFIX ""
                LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/afm-binding.export-map"
        )
-       install(TARGETS afm-binding LIBRARY DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/afm)
+       install(TARGETS afm-binding LIBRARY DESTINATION ${afm_libexecdir})
 
        add_executable(afm-user-session afm-user-session.c)
        install(TARGETS afm-user-session DESTINATION ${CMAKE_INSTALL_BINDIR}