[4.0] Remove Profile Build Dependency (IVI) 91/98091/4
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 16 Nov 2016 06:18:54 +0000 (15:18 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 16 Jan 2017 12:14:08 +0000 (04:14 -0800)
- This is for Tizen 4.0

- Create JIRA-TRE issue when you SR this:

  Add model-config-xu3-profile_common for common profile.
  Add model-config-xu3-profile_tv for tv profile.
  Add model-config-xu3-profile_ivi for ivi profile.

  (wearable/mobile does not have model-config-xu3)

Change-Id: I57f408e57cdc8fef6e2e2a0da8b538c05cffad29
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
packaging/model-config-xu3.spec

index 18cad028f50983176d6c367f9f4bd77e08cfc8be..54245700d7956dbff557046771007ffc0d069091 100644 (file)
@@ -8,10 +8,30 @@ Group:                System/Configuration
 License:       Apache-2.0
 BuildArch:     noarch
 Source0:       %{name}-%{version}.tar.gz
+Requires:       %{name}-compat = %{version}-%{release}
+Recommends:     %{name}-profile_common = %{version}-%{release}
 
 %description
 Model configuration data package
 
+
+%package profile_common
+Summary:        Model configuration of XU3 for common/mobile/wearable/tv profiles
+Provides:       %{name}-profile_mobile = %{version}-%{release}
+Provides:       %{name}-profile_wearable = %{version}-%{release}
+Provides:       %{name}-profile_tv = %{version}-%{release}
+Provides:       %{name}-compat = %{version}-%{release}
+Conflicts:      %{name}-profile_ivi
+%description profile_common
+Model configuration data package main body supporting common/mobile/wearable/tv profiles
+
+%package profile_ivi
+Summary:        Model configuration of XU3 for IVI profile
+Provides:       %{name}-compat = %{version}-%{release}
+Conflicts:      %{name}-profile_common
+%description profile_ivi
+Model configuration data package main body supporting IVI profile
+
 %prep
 %setup -q -n %{name}-%{version}
 
@@ -20,15 +40,18 @@ Model configuration data package
 %install
 rm -rf %{buildroot}
 mkdir -p %{buildroot}%{_sysconfdir}/config
-
-%define config_xml model-config.xml
-
-%if "%{?profile}" == "ivi"
-%define config_xml model-config_ivi.xml
-%endif
-
-cp -f %{config_xml} %{buildroot}%{_sysconfdir}/config/model-config.xml
+cp -f model-config.xml %{buildroot}%{_sysconfdir}/config/model-config.xml
+cp -f model-config_ivi.xml %{buildroot}%{_sysconfdir}/config/model-config.ivi.xml
 
 %files
-%{_sysconfdir}/config/model-config.xml
 %manifest model-config.manifest
+
+%files profile_common
+%{_sysconfdir}/config/model-config.xml
+
+%post profile_ivi
+ln -sf model-config.ivi.xml %{_sysconfdir}/config/model-config.xml
+%preun profile_ivi
+rm %{_sysconfdir}/config/model-config.xml
+%files profile_ivi
+%{_sysconfdir}/config/model-config.ivi.xml