From 74035472316075e7226ab7d0d2e8638dc5014a56 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Thu, 27 Feb 2014 14:59:42 +0100 Subject: [PATCH] packaging: only use ecore-x on X config Change-Id: I1c3706413d5c516fea0e3268bd2c91b721ba1a16 Bug-Tizen: PTREL-640 Signed-off-by: Philippe Coval --- CMakeLists.txt | 14 +++++++++++--- packaging/system-server.spec | 16 ++++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 85e2b4e..6b0178b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,10 +104,10 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} SET(MOVINAND_FORMAT scripts/movi_format.sh) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs REQUIRED + +SET( local_pkgs ecore ecore-file - ecore-x edbus eina vconf @@ -119,7 +119,15 @@ pkg_check_modules(pkgs REQUIRED sensor notification libsmack - libsystemd-daemon) + libsystemd-daemon +) + +IF(X11_SUPPORT) +SET( local_pkgs ecore-x ${local_pkgs} ) +ENDIF(X11_SUPPORT) + +pkg_check_modules(pkgs REQUIRED ${local_pkgs} ) + FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") diff --git a/packaging/system-server.spec b/packaging/system-server.spec index 7ea1047..118404d 100755 --- a/packaging/system-server.spec +++ b/packaging/system-server.spec @@ -1,8 +1,10 @@ +%bcond_with x + #sbs-git:slp/pkgs/s/system-server system-server 0.1.51 56e16bca39f96d6c8aed9ed3df2fea9b393801be Name: system-server Summary: System server Version: 2.0.0 -Release: 1 +Release: 0 Group: System/Service License: Apache-2.0 Source0: system-server-%{version}.tar.gz @@ -23,7 +25,9 @@ BuildRequires: pkgconfig(tapi) BuildRequires: pkgconfig(edbus) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(syspopup-caller) +%if %{with x} BuildRequires: pkgconfig(x11) +%endif BuildRequires: pkgconfig(notification) BuildRequires: pkgconfig(usbutils) BuildRequires: pkgconfig(udev) @@ -158,7 +162,15 @@ Deviced library for device control (devel) %prep %setup -q -%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} + +%cmake . \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ +%if %{with x} + -DX11_SUPPORT=On \ +%else + -DX11_SUPPORT=Off \ +%endif + #eol %build cp %{SOURCE1} . -- 2.7.4