Remove Model-Build-Features 24/96824/10
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 10 Nov 2016 07:14:58 +0000 (16:14 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 24 Feb 2017 04:29:21 +0000 (13:29 +0900)
- This is for Tizen 4.0

- The maintainer needs to create a JIRA-TRE issue when SR-ing:

  - Add crosswalk-tizen-extension-circle for wearable profile's circle displays.

- Model-build-features is going to be phased out.

Change-Id: I30de7d6bb214862838b64f322cc145823057fde9
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
packaging/crosswalk-tizen.spec

index 083798b..6148059 100755 (executable)
@@ -20,7 +20,6 @@ BuildRequires: edje-tools
 BuildRequires: gettext
 BuildRequires: ninja
 BuildRequires: python
-BuildRequires: model-build-features
 BuildRequires: pkgconfig(appsvc)
 BuildRequires: pkgconfig(aul)
 BuildRequires: pkgconfig(bundle)
@@ -102,6 +101,16 @@ Requires: /usr/bin/systemctl
 %description
 Crosswalk Runtime and AppShell for Tizen 3.0 and later
 
+# If it is unified or wearable, create circular-display extension
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%package extension-circle
+Summary:      Extension for Crosswalk-Tizen with Circular Displays (Tizen Wearable)
+Requires:     %{name} = %{version}-%{release}
+%description extension-circle
+Extension for Crosswalk-Tizen with Circular Displays of Tizen Wearable Profile.
+You need to install %{name} before installing this extension.
+%endif
+
 %prep
 %setup -q
 
@@ -128,9 +137,6 @@ GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_watch_face_support=%{?tizen_feature_wa
 # Not required anymore
 #GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_manual_rotate_support=%{?tizen_feature_manual_rotate_support}"
 
-# TODO: do not use model_build_feature.
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_model_formfactor=%{?model_build_feature_formfactor}"
-
 # Extension Path
 GYP_OPTIONS="$GYP_OPTIONS -Dextension_path=%{extension_path}"
 
@@ -145,6 +151,24 @@ GYP_OPTIONS="$GYP_OPTIONS -Dchromium_efl_workaround_ewk_settings=%{chromium_efl_
 # Tizen product tv
 GYP_OPTIONS="$GYP_OPTIONS -Dtizen_product_tv=%{!?TIZEN_PRODUCT_TV:0}"
 
+GYP_OPTIONS_BASE="$GYP_OPTIONS"
+
+# TODO: do not use model_build_feature.
+GYP_OPTIONS="$GYP_OPTIONS_BASE -Dtizen_model_formfactor=rectangle"
+
+echo "PROFILE = %{?profile}"
+
+# If it is unified or wearable, create circular-display extension
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+# TODO: do not use model_build_feature.
+GYP_OPTIONS="$GYP_OPTIONS_BASE -Dtizen_model_formfactor=circle"
+mkdir -p build_circle
+./tools/gyp/gyp $GYP_OPTIONS xwalk_tizen.gyp
+ninja -C out/Default %{?_smp_mflags}
+mkdir -p out/Circle
+mv out/Default/xwalk_runtime out/Circle/
+%endif
+
 # Build
 ./tools/gyp/gyp $GYP_OPTIONS xwalk_tizen.gyp
 ninja -C out/Default %{?_smp_mflags}
@@ -187,6 +211,10 @@ install -p -m 644 out/Default/gen/splash_screen.json %{buildroot}%{extension_pat
 install -p -m 755 out/Default/xwalk_runtime %{buildroot}%{_bindir}
 ln -s %{_bindir}/xwalk_runtime %{buildroot}%{_bindir}/wrt
 ln -s %{_bindir}/xwalk_runtime %{buildroot}%{_bindir}/wrt-client
+# If it is unified or wearable, create circular-display extension
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+install -p -m 755 out/Circle/xwalk_runtime %{buildroot}%{_bindir}/xwalk_runtime.circle
+%endif
 
 # xwalk extension shared
 install -p -m 644 out/Default/lib/libxwalk_extension_shared.so %{buildroot}%{_libdir}
@@ -231,3 +259,13 @@ rm -fr %{buildroot}
 %attr(755,root,root) %{_bindir}/wrt-upgrade
 %attr(755,root,root) %{_datadir}/upgrade/scripts/720.wrt.upgrade.sh
 %caps(cap_sys_admin,cap_setgid=ei) %{_bindir}/wrt-loader
+
+# If it is unified or wearable, create circular-display extension
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%post extension-circle
+ln -sf xwalk_runtime.circle %{_bindir}/xwalk_runtime
+%preun extension-circle
+echo "You need to reinstall %{name} if you want to let %{name} behave correctly after uninstalling this package."
+%files extension-circle
+%attr(755,root,root) %{_bindir}/xwalk_runtime.circle
+%endif