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}
%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