%define with_tdm 1 %define with_tbm 1 %define with_eom 1 #define with_input 1 %define with_drm 1 %define with_tpl 1 %define with_wl 1 %define with_extra 1 %define with_gl 1 %define with_elm 1 %define with_vk 1 %define pkgs_list (%{?with_tdm:tdm-novice} %{?with_tbm:tbm-novice} %{?with_input:input-novice} \ %{?with_eom:eom-novice} %{?with_drm:drm-novice} %{?with_tpl:tpl-novice} \ %{?with_wl:wl-novice} %{?with_extra:extra-novice} %{?with_gl:gl-novice} \ %{?with_elm:elm-novice} %{?with_vk:vk-novice}) Name: ws-testcase Summary: Novice test framework for Tizen graphic HAL Version: 1.0.0 Release: 1 Group: test License: MIT Source0: %{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: pkgconfig(libtbm) BuildRequires: pkgconfig(libtdm) BuildRequires: terminfo-base-mini %if 0%{?with_tdm} BuildRequires: pkgconfig(libtdm-client) BuildRequires: pkgconfig(wayland-tbm-server) BuildRequires: pkgconfig(wayland-tbm-client) BuildRequires: pkgconfig(wayland-server) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(elementary) %endif %if 0%{?with_tbm} BuildRequires: pkgconfig(wayland-server) %endif %if 0%{?with_eom} BuildRequires: pkgconfig(eom) BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(capi-media-player) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(ecore-wl2) #BuildRequires: libwayland-egl-devel %endif %if 0%{?with_drm} BuildRequires: pkgconfig(libdrm) BuildRequires: kernel-headers %endif %if 0%{?with_tpl} BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(tpl-egl) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(pixman-1) #BuildRequires: libwayland-egl-devel %endif %if 0%{?with_wl} BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(tizen-extension-server) BuildRequires: pkgconfig(wayland-tbm-client) BuildRequires: pkgconfig(tizen-dpms-client) BuildRequires: pkgconfig(ecore-wl2) %endif %if 0%{?with_input} BuildRequires: pkgconfig(efl) BuildRequires: pkgconfig(ecore) BuildRequires: pkgconfig(evas) BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(capi-ui-efl-util) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(tizen-extension-client) #BuildRequires: libwayland-egl-devel %endif %if 0%{?with_gl} BuildRequireS: pkgconfig(wayland-client) BuildRequireS: pkgconfig(wayland-egl) BuildRequireS: pkgconfig(glesv2) BuildRequireS: pkgconfig(egl) BuildRequireS: pkgconfig(libtbm) BuildRequires: pkgconfig(ttrace) %endif %if 0%{?with_vk} BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: vulkan-loader-devel %package vk-novice Summary: Novice test framework for Vulkan %description vk-novice %endif %if 0%{?with_elm} BuildRequires: pkgconfig(elementary) %endif %if 0%{?with_tdm} %package tdm-novice Summary: Novice test framework for TDM Requires: ws-testcase Requires: libtdm Requires: libtdm-client Requires: libtbm Requires: libcairo Requires: libwayland-tbm-client Requires: libwayland-tbm-server Requires: libwayland-client Requires: libwayland-server %description tdm-novice %endif %if 0%{?with_tbm} %package tbm-novice Summary: Novice test framework for TBM Requires: ws-testcase Requires: libtbm Requires: libwayland-server %description tbm-novice %endif %if 0%{?with_eom} %package eom-novice Summary: Novice test framework for EOM Requires: ws-testcase Requires: capi-media-player Requires: libgio Requires: libeom Requires: elementary Requires: libwayland-egl %description eom-novice %endif %if 0%{?with_drm} %package drm-novice Summary: Novice test framework for DRM Requires: ws-testcase Requires: libdrm %description drm-novice %endif %if 0%{?with_tpl} %package tpl-novice Summary: Novice test framework for TPL Requires: ws-testcase Requires: libwayland-egl Requires: libtpl-egl Requires: libwayland-client Requires: pixman %description tpl-novice %endif %if 0%{?with_wl} %package wl-novice Summary: Novice test framework for Wayland Requires: ws-testcase Requires: libwayland-client Requires: libdrm Requires: libcairo Requires: libwayland-extension-server Requires: libwayland-tbm-client Requires: libtizen-dpms-client Requires: ecore-wl2 %description wl-novice %endif %if 0%{?with_input} %package input-novice Summary: Novice test framework for Input Requires: ws-testcase Requires: efl Requires: ecore Requires: evas Requires: elementary Requires: libxkbcommon Requires: capi-ui-efl-util Requires: libwayland-client Requires: libwayland-extension-client Requires: libwayland-egl %description input-novice %endif %if 0%{?with_extra} %package extra-novice Summary: Novice test framework for extra %description extra-novice %endif %if 0%{?with_gl} %package gl-novice Summary: Novice test framework for GL %description gl-novice %endif %if 0%{?with_elm} %package elm-novice Summary: Novice test framework for elm Requires: ws-testcase Requires: elementary %description elm-novice %endif %description novice framework %prep %setup -q %build export CFLAGS+=" -Wno-stringop-overflow -Wno-stringop-truncation " PKGS=%{pkgs_list} for pkg in ${PKGS[@]} do cd $pkg/src for test in `ls -d */` do cd $test cmake ./ make %{?jobs:-j%jobs} cd ../ done cd ../.. done %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}/usr/bin/local/novice/ cp -af template-novice/script/novice %{buildroot}%{_bindir} PKGS=%{pkgs_list} for pkg in ${PKGS[@]} do cd $pkg/src for test in `ls -d */` do cd $test %make_install cd ../ done cd ../../ done %files %defattr(-,root,root,-) %{_bindir}/novice %if 0%{?with_tdm} %files tdm-novice /usr/local/bin/novice/*-tdm-* %endif %if 0%{?with_tbm} %files tbm-novice /usr/local/bin/novice/*-tbm-* /usr/local/bin/novice/tbm-surface-queue-create2 %endif %if 0%{?with_eom} %files eom-novice /usr/local/bin/novice/eom-* %endif %if 0%{?with_drm} %files drm-novice /usr/local/bin/novice/drm-* %endif %if 0%{?with_tpl} %files tpl-novice /usr/local/bin/novice/tpl-* %endif %if 0%{?with_wl} %files wl-novice /usr/local/bin/novice/wl-* %endif %if 0%{?with_input} %files input-novice /usr/local/bin/novice/cursor-window /usr/share/icons/cursors /usr/local/bin/novice/evas-input-window /usr/local/bin/novice/gesture-wayland /usr/local/bin/novice/input-* /usr/local/bin/novice/keymap-builder /usr/local/bin/novice/simple-input-window %endif %if 0%{?with_extra} %files extra-novice /usr/local/bin/novice/tbm-backend-tgl-lock1 /usr/local/bin/novice/tbm-perf-mem /usr/local/bin/novice/test1 %endif %if 0%{?with_gl} %files gl-novice /usr/local/bin/novice/gl-* /usr/local/bin/novice/egl-* /usr/local/bin/novice/video-* /usr/local/bin/novice/gthread-* %endif %if 0%{?with_vk} %files vk-novice /usr/local/bin/novice/vk-* %endif %if 0%{?with_elm} %files elm-novice /usr/local/bin/novice/elm-* /usr/local/bin/novice/ecore-evas-* %endif