X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=packaging%2Fdali-adaptor.spec;h=71d74f8e75fb0738c6fc5738269362b0084d84a6;hb=827364bdc27a793d2cb18eef6702a0229b057a7d;hp=a0627b522b59950a70f6d7eacd8d76f346fa4c4c;hpb=aadc485fba32897c687bbf863b2d5f1db2c39b57;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/packaging/dali-adaptor.spec b/packaging/dali-adaptor.spec index a0627b5..a711908 100644 --- a/packaging/dali-adaptor.spec +++ b/packaging/dali-adaptor.spec @@ -1,79 +1,151 @@ +# NOTES +# This spec file is used to build DALi Adaptor for different Tizen Profiles +# Current profiles are: Mobile, TV, Wearable, Common +# +# The profile variable is defined outside of the spec file in a build.conf file. +# It will contain the profile and whether or not to build with X11 or Wayland +# +# gbs will try to download the build.conf for the platform automatically from the repo location when +# performing a gbs build ( use gbs build -v to see it download location) E.g. +# http://download.tizen.org/snapshots/tizen/tv/tizen-tv/repos/arm-wayland/packages/repodata/xxxx-build.conf.gz + + %bcond_with wayland Name: dali-adaptor Summary: The DALi Tizen Adaptor -Version: 1.1.5 +Version: 1.1.46 Release: 1 Group: System/Libraries -License: Apache-2.0, BSD-2.0, MIT +License: Apache-2.0 and BSD-2-Clause and MIT URL: https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary Source0: %{name}-%{version}.tar.gz +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +Requires: giflib + +#need libtzplatform-config for directory if tizen version is 3.x + +%if "%{tizen_version_major}" == "3" +BuildRequires: pkgconfig(libtzplatform-config) +%endif + + +# 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 + %if "%{profile}" == "mobile" %define dali_profile MOBILE %define dali_feedback_plugin 0 -%define over_tizen_2_2 1 +%define dali_videoplayer_plugin 1 %define shaderbincache_flag DISABLE +BuildRequires: pkgconfig(gles20) +%define gles_requirement_setup 1 %endif %if "%{profile}" == "tv" %define dali_profile TV %define dali_feedback_plugin 0 -%define over_tizen_2_2 1 +%define dali_videoplayer_plugin 1 %define shaderbincache_flag ENABLE +BuildRequires: pkgconfig(glesv2) +%define gles_requirement_setup 1 %endif %if "%{profile}" == "wearable" %define dali_profile WEARABLE %define dali_feedback_plugin 0 -%define over_tizen_2_2 1 +%define dali_videoplayer_plugin 1 +%define shaderbincache_flag DISABLE +BuildRequires: pkgconfig(gles20) +BuildRequires: pkgconfig(capi-appfw-watch-application) +BuildRequires: pkgconfig(appcore-watch) +BuildRequires: pkgconfig(screen_connector_provider) +%define gles_requirement_setup 1 +%endif + +%if "%{profile}" == "ivi" +%define dali_profile IVI +%define dali_feedback_plugin 0 +%define dali_videoplayer_plugin 1 %define shaderbincache_flag DISABLE +BuildRequires: pkgconfig(glesv2) +%define gles_requirement_setup 1 %endif %if "%{profile}" == "common" %define dali_profile COMMON %define dali_feedback_plugin 0 -%define over_tizen_2_2 0 +%define dali_videoplayer_plugin 1 +%define tizen_2_2_compatibility 0 %define shaderbincache_flag DISABLE +BuildRequires: pkgconfig(glesv2) +%define gles_requirement_setup 1 %endif -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig -Requires: giflib +# If we have not set a BuildRequires for the gles version, default it here. +%{!?gles_requirement_setup: BuildRequires: pkgconfig(glesv2)} + BuildRequires: pkgconfig BuildRequires: gawk -BuildRequires: pkgconfig(sensor) -BuildRequires: pkgconfig(aul) BuildRequires: giflib-devel BuildRequires: pkgconfig(fontconfig) -BuildRequires: pkgconfig(elementary) -BuildRequires: pkgconfig(capi-appfw-application) BuildRequires: libjpeg-turbo-devel -BuildRequires: pkgconfig(evas) BuildRequires: dali-devel BuildRequires: dali-integration-devel -BuildRequires: vconf-devel -BuildRequires: vconf-keys-devel +BuildRequires: pkgconfig(vconf) BuildRequires: tts-devel BuildRequires: pkgconfig(dlog) BuildRequires: libdrm-devel BuildRequires: pkgconfig(libexif) -BuildRequires: pkgconfig(capi-system-system-settings) BuildRequires: pkgconfig(libpng) -BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(egl) BuildRequires: libcurl-devel +BuildRequires: pkgconfig(harfbuzz) +BuildRequires: fribidi-devel - -%if 0%{?over_tizen_2_2} +%if 0%{?tizen_2_2_compatibility} != 1 BuildRequires: pkgconfig(capi-system-info) +BuildRequires: pkgconfig(capi-system-sensor) %endif +# 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 + + %if %{with wayland} -BuildRequires: pkgconfig(ecore-wayland) + +####### BUILDING FOR WAYLAND ####### BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-client) +BuildRequires: wayland-devel +# Currently Tizen Common we use does not have wayland extensions like xdg-shell +%if "%{profile}" != "common" +BuildRequires: wayland-extension-client-devel +%endif + +# dali-adaptor-uv uses libuv mainloop and has its own wayland client (it needs wayland-client headers). +BuildRequires: libxkbcommon-devel + +# dali-adaptor uses ecore mainloop +BuildRequires: pkgconfig(ecore-wayland) +BuildRequires: pkgconfig(wayland-tbm-client) +BuildRequires: pkgconfig(tizen-extension-client) + +# 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) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xfixes) @@ -81,8 +153,17 @@ BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(utilX) %endif -BuildRequires: pkgconfig(harfbuzz) -BuildRequires: fribidi-devel +# for dali-adaptor +BuildRequires: pkgconfig(evas) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(capi-system-system-settings) + +%if 0%{?over_tizen_2_2} +BuildRequires: pkgconfig(capi-system-info) +%endif + + %description The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core @@ -120,7 +201,7 @@ Group: System/Libraries %if 0%{?dali_feedback_plugin} #Requires: libdeviced BuildRequires: pkgconfig(mm-sound) -BuildRequires: pkgconfig(haptic) +#BuildRequires: pkgconfig(haptic) BuildRequires: libfeedback-devel %endif @@ -128,19 +209,47 @@ BuildRequires: libfeedback-devel Feedback plugin to play haptic and audio feedback for Dali ############################## +# Dali VideoPlayer Plugin +############################## +%if %{with wayland} + +%package dali-video-player-plugin +Summary: Plugin to play a video file for Dali +Group: System/Libraries +%if 0%{?dali_videoplayer_plugin} +BuildRequires: pkgconfig(capi-media-player) +%endif + +%description dali-video-player-plugin +VideoPlayer plugin to play a video file for Dali +%endif + +############################## # Preparation ############################## %prep %setup -q + +#Use TZ_PATH when tizen version is 3.x + +%if "%{tizen_version_major}" == "2" %define dali_data_rw_dir /usr/share/dali/ %define dali_data_ro_dir /usr/share/dali/ -%define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/ %define font_preloaded_path /usr/share/fonts/ %define font_downloaded_path /opt/share/fonts/ %define font_application_path /usr/share/app_fonts/ %define font_configuration_file /opt/etc/fonts/conf.avail/99-slp.conf -%define dali_plugin_sound_files %{dali_data_ro_dir}/plugins/sounds/ +%else +%define dali_data_rw_dir %TZ_SYS_RO_SHARE/dali/ +%define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/ +%define font_preloaded_path %TZ_SYS_RO_SHARE/fonts/ +%define font_downloaded_path %TZ_SYS_SHARE/fonts/ +%define font_application_path %TZ_SYS_RO_SHARE/app_fonts/ +%define font_configuration_file %TZ_SYS_ETC/fonts/conf.avail/99-slp.conf +%endif +%define user_shader_cache_dir %{dali_data_ro_dir}/core/shaderbin/ +%define dali_plugin_sound_files %{dali_data_ro_dir}/plugins/sounds/ %define dev_include_path %{_includedir} ############################## @@ -148,7 +257,7 @@ Feedback plugin to play haptic and audio feedback for Dali ############################## %build PREFIX+="/usr" -CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections " +CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES" LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions " %ifarch %{arm} @@ -161,9 +270,9 @@ CXXFLAGS+=" -DWAYLAND" configure_flags="--enable-wayland" %endif -%if 0%{?over_tizen_2_2} -CFLAGS+=" -DOVER_TIZEN_SDK_2_2" -CXXFLAGS+=" -DOVER_TIZEN_SDK_2_2" +%if 0%{?tizen_2_2_compatibility} +CFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY" +CXXFLAGS+=" -DTIZEN_SDK_2_2_COMPATIBILITY" %endif libtoolize --force @@ -177,15 +286,37 @@ FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE -%configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-shaderbincache=%{shaderbincache_flag} --enable-profile=%{dali_profile} \ +# 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} --enable-feedback \ %endif -%if 0%{?over_tizen_2_2} - --with-over-tizen_2_2 \ +%if 0%{?dali_videoplayer_plugin} + --enable-videoplayer \ +%endif +%if 0%{?tizen_2_2_compatibility} + --with-tizen-2-2-compatibility \ +%endif +%if %{with wayland} + --enable-efl=no \ +%else + --enable-efl=yes \ %endif +%if 0%{?enable_debug} + --enable-debug \ +%endif + --enable-appfw=yes \ + --with-libuv=/usr/include/node/ \ $configure_flags --libdir=%{_libdir} +# Build. make %{?jobs:-j%jobs} ############################## @@ -196,9 +327,6 @@ rm -rf %{buildroot} cd build/tizen %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}" -# LICENSE -mkdir -p %{buildroot}/usr/share/license -cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name} ############################## # Upgrade order: @@ -226,6 +354,14 @@ exit 0 exit 0 %endif +%if %{with wayland} +%if 0%{?dali_videoplayer_plugin} +%post dali-video-player-plugin +/sbin/ldconfig +exit 0 +%endif +%endif + ############################## # Pre Uninstall old package ############################## @@ -245,6 +381,14 @@ exit 0 exit 0 %endif +%if %{with wayland} +%if 0%{?dali_videoplayer_plugin} +%postun dali-video-player-plugin +/sbin/ldconfig +exit 0 +%endif +%endif + ############################## # Files in Binary Packages ############################## @@ -256,7 +400,8 @@ exit 0 %defattr(-,app,app,-) %dir %{user_shader_cache_dir} %{_bindir}/* -%{_datadir}/license/%{name} +%license LICENSE +#%{_datadir}/license/%{name} %files devel %defattr(-,root,root,-) @@ -264,7 +409,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,-) @@ -278,3 +424,11 @@ exit 0 %{dali_plugin_sound_files}/* %endif +%if %{with wayland} +%if 0%{?dali_videoplayer_plugin} +%files dali-video-player-plugin +%manifest dali-adaptor.manifest +%defattr(-,root,root,-) +%{_libdir}/libdali-video-player-plugin.so* +%endif +%endif