Remove Profile Build Dependency: mobile extension 73/102373/3 accepted/tizen/common/20170117.174656 accepted/tizen/ivi/20170117.054630 accepted/tizen/mobile/20170117.054525 accepted/tizen/wearable/20170117.054545 submit/tizen/20170117.034928
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 5 Dec 2016 12:15:37 +0000 (21:15 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 16 Jan 2017 05:40:27 +0000 (21:40 -0800)
- This is for Tizen 4.0.
  (4.0 Configurability & Building Block prohibits the usage of
  profile macro; the value of "profile" will become "undefined"
  unconditionally.)

- Please create JIRA-TRE issue when SR-ing this:

  : Add contacts-service-profile_mobile for mobile profile.

Change-Id: Idfbbc2775089b3f44901f437de5e1f9e96f60443
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
packaging/contacts-service.spec

index ee095be..23f859c 100644 (file)
@@ -33,12 +33,23 @@ BuildRequires: pkgconfig(libsystemd)
 
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
+Provides:      %{name}-profile_common = %{version}-%{release}
+Provides:      %{name}-profile_wearable = %{version}-%{release}
+Provides:      %{name}-profile_tv = %{version}-%{release}
+Provides:      %{name}-profile_ivi = %{version}-%{release}
 
 %define upgrade_script_path /usr/share/upgrade/scripts
 
 %description
 Contacts Service Library
 
+%package profile_mobile
+Summary:    Contacts-service extension for mobile profile
+Requires:   %{name} = %{version}-%{release}
+%description profile_mobile
+Service file of Tizen mobile profile is different from other profiles.
+This package supplies the service file for Tizen mobile profile.
+
 %package -n contacts-service2
 Summary:       New Contacts service library
 
@@ -88,11 +99,8 @@ cp -f 500.%{name}.sh %{buildroot}%{upgrade_script_path}
 %make_install
 
 mkdir -p %{buildroot}%{_unitdir_user}/default.target.wants
-%if "%{profile}" == "mobile"
-install -m 0644 %SOURCE3 %{buildroot}%{_unitdir_user}/contacts-service.service
-%else
+install -m 0644 %SOURCE3 %{buildroot}%{_unitdir_user}/contacts-service.service.mobile
 install -m 0644 %SOURCE1 %{buildroot}%{_unitdir_user}/contacts-service.service
-%endif
 ln -s ../contacts-service.service %{buildroot}%{_unitdir_user}/default.target.wants/contacts-service.service
 
 mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants
@@ -133,3 +141,7 @@ chsmack -e "User" /usr/bin/contacts-service-test
 %{_bindir}/contacts-service-test
 %license LICENSE.APLv2
 
+%post profile_mobile
+mv %{_unitdir_user}/contacts-service.service.mobile %{_unitdir_user}/contacts-service.service
+%files profile_mobile
+%{_unitdir_user}/contacts-service.service.mobile