packaging: only use ecore-x on X config 64/16964/1
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>
Thu, 27 Feb 2014 13:59:42 +0000 (14:59 +0100)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Thu, 27 Feb 2014 13:59:42 +0000 (14:59 +0100)
Change-Id: I1c3706413d5c516fea0e3268bd2c91b721ba1a16
Bug-Tizen: PTREL-640
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
CMakeLists.txt
packaging/system-server.spec

index 85e2b4e..6b0178b 100755 (executable)
@@ -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}")
index 7ea1047..118404d 100755 (executable)
@@ -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} .