From 3701efcdbc08bdf6ca4d1ac9dc47f2f23102956b Mon Sep 17 00:00:00 2001 From: Youngjae Shin Date: Wed, 25 Sep 2024 16:41:45 +0900 Subject: [PATCH] add contacts and geofence dependency removal option Change-Id: I7f77a2d33ec161577f36599b61c353070c60f1a1 --- CMakeLists.txt | 6 ++++-- packaging/context-job-scheduler.spec | 10 ++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a85b76..0925ba6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +CMAKE_MINIMUM_REQUIRED(VERSION 3.14) PROJECT(context-job-scheduler) INCLUDE(GNUInstallDirs) @@ -32,4 +32,6 @@ ADD_SUBDIRECTORY(src/client-dummy) ADD_SUBDIRECTORY(src/server-dummy) ADD_SUBDIRECTORY(src/client) ADD_SUBDIRECTORY(src/server) -ADD_SUBDIRECTORY(src/agent) +if(ALL_SPEC) + ADD_SUBDIRECTORY(src/agent) +endif(ALL_SPEC) diff --git a/packaging/context-job-scheduler.spec b/packaging/context-job-scheduler.spec index 25f3368..a17068f 100644 --- a/packaging/context-job-scheduler.spec +++ b/packaging/context-job-scheduler.spec @@ -22,15 +22,19 @@ BuildRequires: pkgconfig(capi-context-motion) BuildRequires: pkgconfig(capi-network-wifi-manager) BuildRequires: pkgconfig(aul) BuildRequires: pkgconfig(notification) +%if %{?mv_prj:!%{mv_prj}}%{?!mv_prj:1} BuildRequires: pkgconfig(contacts-service2) BuildRequires: pkgconfig(capi-geofence-manager) +%endif BuildRequires: pkgconfig(context-common-server) BuildRequires: pkgconfig(context-common-client) Requires: %{name}-dummy = %{version}-%{release} Requires: context-service +%if %{?mv_prj:!%{mv_prj}}%{?!mv_prj:1} Requires: context-agent +%endif %global __provides_exclude ^.*-genuine\\.so.*$ %description @@ -69,7 +73,7 @@ export CXXFLAGS+=" -Wformat=2 -Wno-empty-body -fomit-frame-pointer -fno-optimize export CXXFLAGS+=" -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow" export CXXFLAGS+=" -Wnon-virtual-dtor -std=c++0x" -%cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} +%cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DALL_SPEC:BOOL=%{?!mv_prj:ON} make %{?_smp_mflags} %install @@ -92,7 +96,9 @@ echo "You need to reinstall %{name}-dummy to keep using the APIs after uninstall %manifest packaging/%{name}.manifest %{_libdir}/lib%{name}-client-genuine.so.* %{_libdir}/lib%{name}-server-genuine.so.* -%{_libdir}/context-agent/*.so.* +%if %{?mv_prj:!%{mv_prj}}%{?!mv_prj:1} + %{_libdir}/context-agent/*.so.* +%endif %license LICENSE -- 2.34.1