%description
Input Service Framewok (ISF) is an input method (IM) platform, and it has been derived from SCIM.
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if wearble or ivi or unified
+%if "%{?profile}" != "tv" && "%{?profile}" != "mobile" && "%{?profile}" != "common"
%package profile_wearable
Summary: ISF bin for wearable/ivi
Provides: %{name}-compat = %{version}-%{release}
Conflicts: %{name}-profile_tv
%description profile_wearable
Compile isf with --disable-include-notification and --disable-include-libwebsocket
+%endif
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if common or mobile or unified
+%if "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
%package profile_common
Summary: ISF bin for mobile/common
Provides: %{name}-compat = %{version}-%{release}
Conflicts: %{name}-profile_tv
%description profile_common
Compile isf with --disable-include-libwebsocket
+%endif
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if tv or unified
+%if "%{?profile}" != "common" && "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi"
%package profile_tv
Summary: ISF bin for TV
Provides: %{name}-compat = %{version}-%{release}
Conflicts: %{name}-profile_wearable
%description profile_tv
Compile isf with --disable-include-notification
+%endif
%package devel
Summary: ISF header files
export CXXFLAGS_BASIS="$CXXFLAGS"
%autogen
+
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if tv or unified
+%if "%{?profile}" != "common" && "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi"
mkdir -p build_tv
export CFLAGS="$CFLAGS_BASIS -D_TV -DENABLE_REMOTE_INPUT=1";
export CXXFLAGS="$CFLAGS_BASIS -D_TV -DENABLE_REMOTE_INPUT=1";
ls -la build_tv/bin/
ls -la build_tv/lib/
ls -la build_tv/
+# if unified
+%if "%{?profile}" != "common" && "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "tv"
make clean
+%endif
+%endif
+
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if wearble or ivi or unified
+%if "%{?profile}" != "tv" && "%{?profile}" != "mobile" && "%{?profile}" != "common"
mkdir -p build_wearable
export CFLAGS="$CFLAGS_BASIS -D_WEARABLE -DENABLE_HIDE_PANEL_KEY=1";
export CXXFLAGS="$CXXFLAGS_BASIS -D_WEARABLE -DENABLE_HIDE_PANEL_KEY=1";
mv %{buildroot}%{_libdir}/* build_wearable/lib/
ls -la build_wearable/bin/
ls -la build_wearable/lib/
+
+# if unified
+%if "%{?profile}" != "common" && "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "tv"
make clean
+%endif
+%endif
+
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if common or mobile or unified
+%if "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
# mobile/common
export CFLAGS="$CFLAGS_BASIS -D_MOBILE -DENABLE_HIDE_PANEL_KEY=1";
export CXXFLAGS="$CXXFLAGS_BASIS -D_MOBILE -DENABLE_HIDE_PANEL_KEY=1";
--with-ro-app-dir=%{TZ_SYS_RO_APP} \
--with-ro-packages-dir=%{TZ_SYS_RO_PACKAGES}
make %{?_smp_mflags}
+%endif
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/etc/scim/conf
mkdir -p %{buildroot}/usr/share/upgrade/scripts/
cp 500.isf_upgrade_24to30.sh %{buildroot}/usr/share/upgrade/scripts/
+
+
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if tv or unified
+%if "%{?profile}" != "common" && "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi"
mv build_tv/bin/isf-demo-efl %{buildroot}%{_bindir}/isf-demo-efl.tv
mv build_tv/bin/isf-panel-efl %{buildroot}%{_bindir}/isf-panel-efl.tv
mv build_tv/bin/isf-log %{buildroot}%{_bindir}/isf-log.tv
+rm -rf %{buildroot}%{_datadir}/scim/remote-input
mkdir -p %{buildroot}%{_datadir}/scim
-mv build_tv/remote-input %{buildroot}%{_datadir}/scim/
+mv -f build_tv/remote-input %{buildroot}%{_datadir}/scim/
#mv build_tv/lib/libscim-*.so* %{buildroot}%{_libdir}/libscim-*.so*.tv
pushd build_tv/lib/
for FILE in libscim-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE.tv"; done
popd
mv build_tv/lib/scim-1.0/scim-launcher %{buildroot}%{_libdir}/scim-1.0/scim-launcher.tv
mv build_tv/lib/scim-1.0/scim-helper-launcher %{buildroot}%{_libdir}/scim-1.0/scim-helper-launcher.tv
+%endif
+
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if wearble or ivi or unified
+%if "%{?profile}" != "tv" && "%{?profile}" != "mobile" && "%{?profile}" != "common"
mv build_wearable/bin/isf-demo-efl %{buildroot}%{_bindir}/isf-demo-efl.wearable
mv build_wearable/bin/isf-panel-efl %{buildroot}%{_bindir}/isf-panel-efl.wearable
mv build_wearable/bin/isf-log %{buildroot}%{_bindir}/isf-log.wearable
popd
mv build_wearable/lib/scim-1.0/scim-launcher %{buildroot}%{_libdir}/scim-1.0/scim-launcher.wearable
mv build_wearable/lib/scim-1.0/scim-helper-launcher %{buildroot}%{_libdir}/scim-1.0/scim-helper-launcher.wearable
+%endif
+
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# If common/mobile is not required
+%if "%{?profile}" == "tv" || "%{?profile}" == "wearable" || "%{?profile}" == "ivi"
+rm %{buildroot}%{_bindir}/isf-demo-efl
+rm %{buildroot}%{_bindir}/isf-panel-efl
+rm %{buildroot}%{_bindir}/isf-log
+rm %{buildroot}%{_libdir}/scim-1.0/scim-launcher
+rm %{buildroot}%{_libdir}/scim-1.0/scim-helper-launcher
+%endif
%find_lang scim
%postun -p /sbin/ldconfig
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if wearble or ivi or unified
+%if "%{?profile}" != "tv" && "%{?profile}" != "mobile" && "%{?profile}" != "common"
%post profile_wearable
ln -sf isf-demo-efl.wearable %{_bindir}/isf-demo-efl
ln -sf isf-panel-efl.wearable %{_bindir}/isf-panel-efl
popd
%preun profile_wearable
+# Do not execute if upgrade
+if [ $1 -gt 0 ]; then
rm %{_bindir}/isf-demo-efl
rm %{_bindir}/isf-panel-efl
rm %{_bindir}/isf-log
pushd %{_libdir}
for FILE in libscim-*.so*; do rm "$FILE"; done
popd
+fi
+%files profile_wearable
+%manifest %{name}.manifest
+# files in bindir and libdir may differ.
+%{_bindir}/isf-demo-efl.wearable
+%{_bindir}/isf-panel-efl.wearable
+%{_bindir}/isf-log.wearable
+%{_libdir}/scim-1.0/scim-launcher.wearable
+%{_libdir}/scim-1.0/scim-helper-launcher.wearable
+%{_libdir}/libscim-*.so*.wearable
+
+%endif
+
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if tv or unified
+%if "%{?profile}" != "common" && "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "ivi"
%post profile_tv
ln -sf isf-demo-efl.tv %{_bindir}/isf-demo-efl
ln -sf isf-panel-efl.tv %{_bindir}/isf-panel-efl
for FILE in libscim-*.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
popd
%preun profile_tv
+# Do not execute if upgrade
+if [ $1 -gt 0 ]; then
rm %{_bindir}/isf-demo-efl
rm %{_bindir}/isf-panel-efl
rm %{_bindir}/isf-log
pushd %{_libdir}
for FILE in libscim-*.so*; do rm "$FILE"; done
popd
+fi
+
+%files profile_tv
+%manifest %{name}.manifest
+# files in bindir, lib/libscim*.so.*, lib/scim-1.0/scim-launcher are different
+%{_bindir}/isf-demo-efl.tv
+%{_bindir}/isf-panel-efl.tv
+%{_bindir}/isf-log.tv
+%{_libdir}/scim-1.0/scim-launcher.tv
+%{_libdir}/scim-1.0/scim-helper-launcher.tv
+%{_libdir}/libscim-*.so*.tv
+# TV Only: remote-input
+%attr(755,root,root) %{_datadir}/scim/remote-input/*
+%endif
%files -f isf.lang
%manifest %{name}.manifest
# although they might be overwritten by subpackages unless there is no possibilities of
# have-choice issues.
-%files profile_wearable
-%manifest %{name}.manifest
-# files in bindir and libdir may differ.
-%{_bindir}/isf-demo-efl.wearable
-%{_bindir}/isf-panel-efl.wearable
-%{_bindir}/isf-log.wearable
-%{_libdir}/scim-1.0/scim-launcher.wearable
-%{_libdir}/scim-1.0/scim-helper-launcher.wearable
-%{_libdir}/libscim-*.so*.wearable
-
+# For product build optimization only. Not for Tizen 4.0 Unified.
+# if common or mobile or unified
+%if "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
%files profile_common
%manifest %{name}.manifest
# files in bindir, lib/libscim*.so.*, lib/scim-1.0/scim-launcher are different
%{_libdir}/scim-1.0/scim-launcher
%{_libdir}/scim-1.0/scim-helper-launcher
# default .so are housed in the main pkg.
-
-%files profile_tv
-%manifest %{name}.manifest
-# files in bindir, lib/libscim*.so.*, lib/scim-1.0/scim-launcher are different
-%{_bindir}/isf-demo-efl.tv
-%{_bindir}/isf-panel-efl.tv
-%{_bindir}/isf-log.tv
-%{_libdir}/scim-1.0/scim-launcher.tv
-%{_libdir}/scim-1.0/scim-helper-launcher.tv
-%{_libdir}/libscim-*.so*.tv
-# TV Only: remote-input
-%attr(755,root,root) %{_datadir}/scim/remote-input/*
+%endif
%files devel
%defattr(-,root,root,-)