common_deps = []
+libdir_path = '$ORIGIN/../lib'
+message('libdir_path[' + libdir_path + ']')
+
message('================ common options ================')
conf_data.set('ESPP_SERVICE_VERSION', espp_service_version)
+#common
option('sock-path', type: 'string', value: '/tmp/espp_service.sock', description: 'ESPP service socket path')
option('dlog', type: 'boolean', value: true, description: 'Use dlog')
-option('service-app', type: 'boolean', value: true, description: 'Daemon is launched as Tizen service app')
+
+#daemon
+option('_bindir', type: 'string', value: '/usr/bin', yield: true, description: 'ESPP service daemon install dir')
+option('service-app', type: 'boolean', value: true, yield: true, description: 'ESPP service daemon is launched as Tizen service app')
%setup -q -n %{name}-%{version}
cp %{SOURCE1} %{SOURCE2} .
+%define _bin_dir %{_bindir}
+
%build
meson setup --auto-features=disabled \
--prefix=/usr \
%else
-Dservice-app=false \
%endif
+ -D_bindir=%{_bin_dir} \
build
ninja -C build
%files
%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{_bindir}/espp-service
+%{_bin_dir}/espp-service
%{_unitdir}/espp-service.service
%license LICENSE.APLv2
USER_LIBS = esplusplayer
# Linker Flags
-USER_LFLAGS = -Xlinker --allow-shlib-undefined -Xlinker -rpath='/usr/lib'
+USER_LFLAGS = -Xlinker --allow-shlib-undefined -Xlinker -rpath='$$ORIGIN/../lib'
# User Library Path
USER_LIB_DIRS = ./libs
daemon_deps = common_deps
message('================ daemon options ================')
-
+message('bindir: '+ get_option('_bindir'))
if get_option('service-app')
message('service-app option is enabled, set USE_SERVICE_APP')
conf_data.set('USE_SERVICE_APP', true)
include_directories : [configinc],
dependencies : daemon_deps,
install: true,
+ install_dir: get_option('_bindir'),
+ install_rpath: libdir_path,
pie : true,
)