Distinguish tizen version via tizen_version_major
[platform/core/uifw/dali-adaptor.git] / packaging / dali-adaptor.spec
index 735cac7..5ee2695 100644 (file)
@@ -14,7 +14,7 @@
 
 Name:       dali-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    1.1.16
+Version:    1.1.20
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-2-Clause and MIT
@@ -25,8 +25,9 @@ Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 Requires:       giflib
 
-# Get the profile from tizen_profile_name if it exists.
-%if 0%{?tizen_profile_name:1}
+# Get the profile from tizen_profile_name if tizen version is 2.x and tizen_profile_name exists.
+
+%if "%{tizen_version_major}" == "2" && 0%{?tizen_profile_name:1}
 %define profile %{tizen_profile_name}
 %endif
 
@@ -66,9 +67,6 @@ BuildRequires:  pkgconfig(glesv2)
 # If we have not set a BuildRequires for the gles version, default it here.
 %{!?gles_requirement_setup: BuildRequires:  pkgconfig(glesv2)}
 
-# macro is enabled by passing gbs build --define "with_libuv 1"
-%define build_with_libuv 0%{?with_libuv:1}
-
 BuildRequires:  pkgconfig
 BuildRequires:  gawk
 BuildRequires:  pkgconfig(sensor)
@@ -93,15 +91,11 @@ BuildRequires:  fribidi-devel
 BuildRequires:  pkgconfig(capi-system-info)
 %endif
 
-%if 0%{?build_with_libuv}
 # Tizen currently does not have libuv as a separate libuv package
 # So we have to look into the uv headers bundled inside node-js
 BuildRequires:  nodejs-devel
-%endif
 
 
-%define dali_needs_efl_libraries 1
-%define dali_needs_appfw_libraries 1
 %if %{with wayland}
 
 ####### BUILDING FOR WAYLAND #######
@@ -112,18 +106,19 @@ BuildRequires:  wayland-devel
 %if "%{profile}" != "common"
 BuildRequires:  wayland-extension-client-devel
 %endif
-%if %{build_with_libuv}
-####### BUILDING FOR PURE WAYLAND #######
-# if we're building with wayland and runnning under node.js then we are using libuv mainloop
-# and DALis own wayland client (it needs wayland-client headers).
-# EFL libraries and APP Framework libraries are not required in this case
-%define dali_needs_efl_libraries 0
-%define dali_needs_appfw_libraries 0
+
+# dali-adaptor-uv uses libuv mainloop and has its own wayland client (it needs wayland-client headers).
 BuildRequires:  libxkbcommon-devel
-%else
-####### BUILDING FOR ECORE WAYLAND #######
+
+# dali-adaptor uses ecore mainloop
 BuildRequires:  pkgconfig(ecore-wayland)
-%endif
+
+# dali-adaptor needs tbm_surface in tizen 3.0 wayland
+BuildRequires:  pkgconfig(libtbm)
+
+# tpkp-curl (certificate pinning for libcurl functions) is only available in Tizen 3.0
+BuildRequires:  pkgconfig(tpkp-curl)
+
 ####### BUILDING FOR X11#######
 %else
 BuildRequires:  pkgconfig(egl)
@@ -134,17 +129,11 @@ BuildRequires:  pkgconfig(xdamage)
 BuildRequires:  pkgconfig(utilX)
 %endif
 
-###### Building with EFL libraries
-%if 0%{?dali_needs_efl_libraries}
+# for dali-adaptor
 BuildRequires:  pkgconfig(evas)
 BuildRequires:  pkgconfig(elementary)
-%endif
-
-###### Build with APP Framework
-%if 0%{?dali_needs_appfw_libraries}
 BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(capi-system-system-settings)
-%endif
 
 %if 0%{?over_tizen_2_2}
 BuildRequires:  pkgconfig(capi-system-info)
@@ -248,6 +237,10 @@ FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION
 # Default to GLES 2.0 if not specified.
 %{!?target_gles_version: %define target_gles_version 20}
 
+#--enable-efl=no \ # only affects dali-adaptor-uv
+#--enable-appfw=yes \ # affects both dali-adaptor & dali-adaptor-uv
+#--with-libuv=/usr/include/node/ \ # only affects dali-adaptor-uv
+
 # Set up the build via configure.
 %configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=%{target_gles_version} --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} \
 %if 0%{?dali_feedback_plugin}
@@ -256,19 +249,13 @@ FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION
 %if 0%{?tizen_2_2_compatibility}
            --with-tizen-2-2-compatibility \
 %endif
-%if 0%{?dali_needs_efl_libraries}
-            --enable-efl=yes \
-%else
-            --enable-efl=no \
-%endif
-%if 0%{?dali_needs_appfw_libraries}
-            --enable-appfw=yes \
+%if %{with wayland}
+           --enable-efl=no \
 %else
-            --enable-appfw=no \
+           --enable-efl=yes \
 %endif
-%if %{?build_with_libuv}
+           --enable-appfw=yes \
            --with-libuv=/usr/include/node/ \
-%endif
            $configure_flags --libdir=%{_libdir}
 
 # Build.
@@ -350,7 +337,8 @@ exit 0
 %{dev_include_path}/dali/public-api/*
 %{dev_include_path}/dali/devel-api/*
 %{dev_include_path}/dali/doc/*
-%{_libdir}/pkgconfig/dali.pc
+%{_libdir}/pkgconfig/dali-adaptor.pc
+%{_libdir}/pkgconfig/dali-adaptor-uv.pc
 
 %files integration-devel
 %defattr(-,root,root,-)