Remove Profile Build Dependency (TV/IVI) 76/92476/8 accepted/tizen/common/20170118.174103 accepted/tizen/ivi/20170118.223312 accepted/tizen/mobile/20170118.223208 accepted/tizen/tv/20170118.223231 accepted/tizen/wearable/20170118.223252 submit/tizen/20170118.073858
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 17 Oct 2016 06:40:36 +0000 (06:40 +0000)
committersinikang <sinikang@samsung.com>
Fri, 13 Jan 2017 06:58:44 +0000 (15:58 +0900)
The newly introduced profile build dependency from
the following commit is removed (not revert, but a mod):

commit 6ca581913973d0445135164c5bb4daae3011b691
Author: Wootak Jung <wootak.jung@samsung.com>
Date:   Wed Sep 21 10:45:27 2016 +0900

    Dongle feature enable in ivi profile

    Change-Id: Iad9307603f22bba862f2159e3d3fcaf7b8ca5c35

Note:

1. This commit is not required for Tizen 3.0 release,
but for later Tizen versions. If maintainers do not feel
comfortable because of the release schedule, maintainers
may delay SR/merge this commit.

2. When maintainers submit SR, they need to submit
JIRA-TRE issues of the followings:

  - Add telephony-daemon-profile_common for common profile if common has telephony-daemon
  - Add telephony-daemon-profile_mobile for mobile profile if mobile has telephony-daemon
  - Add telephony-daemon-profile_wearable for wearable profile if wearable has telephony-daemon
  - Add telephony-daemon-profile_ivi for ivi profile if ivi has telephony-daemon
  - Add telephony-daemon-profile_tv for tv profile if tv has telephony-daemon

Note that you should NOT remove telephony-daemon from the current
meta when you add these telephony-daemon-profile_*

3. Please do not add more usage of profile. We are removing them now. (in 4.0)

Change-Id: Ia388cd7d319569337071858215b9162b856ceb8e
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
CMakeLists.txt
packaging/telephony-daemon.spec

index fc93e48..1a1e1ee 100644 (file)
@@ -62,7 +62,7 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-ldl")
 INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME telephony-daemon)
 IF (TIZEN_PROFILE_TV OR TIZEN_PROFILE_IVI)
-       INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/packaging/telephony-daemon-on-demand.service DESTINATION ${UNITDIR} RENAME telephony-daemon.service)
+       INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/telephony-daemon-on-demand.service DESTINATION ${UNITDIR} RENAME telephony-daemon.service)
 ELSE (TIZEN_PROFILE_TV OR TIZEN_PROFILE_IVI)
-       INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/packaging/telephony-daemon.service DESTINATION ${UNITDIR})
+       INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/telephony-daemon.service DESTINATION ${UNITDIR})
 ENDIF (TIZEN_PROFILE_TV OR TIZEN_PROFILE_IVI)
index 7292640..6f10537 100644 (file)
@@ -1,6 +1,6 @@
 %define major 1
-%define minor 3
-%define patchlevel 42
+%define minor 4
+%define patchlevel 00
 
 Name:           telephony-daemon
 Version:        %{major}.%{minor}.%{patchlevel}
@@ -15,44 +15,119 @@ BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(tcore)
 BuildRequires:  pkgconfig(vconf)
+Requires:      %{name}-compat
+Recommends:    %{name}-profile_common
 
 %description
 Description: Telephony Daemon
 
+%package profile_common
+Summary:       Telephony-daemon binary for common/wearable/mobile
+Provides:      %{name}-compat = %{version}-%{release}
+Provides:      %{name}-profile_wearable = %{version}-%{release}
+Provides:      %{name}-profile_mobile = %{version}-%{release}
+Conflicts:     %{name}-profile_tv
+Conflicts:     %{name}-profile_ivi
+%description profile_common
+Telephony daemon compiled without the flavors of tv or ivi profiles
+
+%package profile_tv
+Summary:       Telephony-daemon binary for TV
+Provides:      %{name}-compat = %{version}-%{release}
+Conflicts:     %{name}-profile_common
+Conflicts:     %{name}-profile_ivi
+%description profile_tv
+Telephony daemon compiled with the flavors of TV
+
+%package profile_ivi
+Summary:       Telephony-daemon binary for IVI
+Provides:      %{name}-compat = %{version}-%{release}
+Conflicts:     %{name}-profile_common
+Conflicts:     %{name}-profile_tv
+%description profile_ivi
+Telephony daemon compiled with the flavors of IVI
+
 %prep
 %setup -q
 
 %build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+mkdir -p build_tv
+pushd build_tv
+cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix}/tv/ \
+       -DLIB_INSTALL_DIR=%{_libdir} \
+       -DUNIT_INSTALL_DIR=%{_unitdir} \
+       -DVERSION=%{version} \
+       -DTIZEN_DEBUG_ENABLE=1 \
+       -DTIZEN_PROFILE_TV=1
+make %{?_smp_mflags}
+
+popd
+mkdir -p build_ivi
+pushd build_ivi
+cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix}/ivi/ \
        -DLIB_INSTALL_DIR=%{_libdir} \
        -DUNIT_INSTALL_DIR=%{_unitdir} \
        -DVERSION=%{version} \
        -DTIZEN_DEBUG_ENABLE=1 \
-%if "%{profile}" == "tv"
-       -DTIZEN_PROFILE_TV=1 \
-%endif
-%if "%{profile}" == "ivi"
-       -DTIZEN_PROFILE_IVI=1 \
-%endif
+       -DTIZEN_PROFILE_IVI=1
+make %{?_smp_mflags}
 
+popd
+
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+       -DLIB_INSTALL_DIR=%{_libdir} \
+       -DUNIT_INSTALL_DIR=%{_unitdir} \
+       -DVERSION=%{version} \
+       -DTIZEN_DEBUG_ENABLE=1
 make %{?_smp_mflags}
 
 %install
 
+pushd build_tv
+%make_install
+popd
+pushd build_ivi
+%make_install
+# tv/ivi has different telephony-daemon.service file. Let's rename it so that we can distinguish it.
+mv %{buildroot}%{_unitdir}/telephony-daemon.service %{buildroot}%{_unitdir}/telephony-daemon.service.tv.ivi
+popd
 %make_install
-%if "%{profile}" != "tv" && "%{profile}" != "ivi"
+
 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
 ln -s %{_unitdir}/telephony-daemon.service %{buildroot}%{_unitdir}/multi-user.target.wants/telephony-daemon.service
-%endif
+mv %{buildroot}/usr/tv/bin/telephony-daemon %{buildroot}%{_bindir}/telephony-daemon.tv
+mv %{buildroot}/usr/ivi/bin/telephony-daemon %{buildroot}%{_bindir}/telephony-daemon.ivi
 
 %post -p /sbin/ldconfig
 
+%post profile_tv
+ln -sf telephony-daemon.tv %{_bindir}/telephony-daemon
+mv %{_unitdir}/telephony-daemon.service.tv.ivi %{_unitdir}/telephony-daemon.service
+%preun profile_tv
+rm %{_bindir}/telephony-daemon
+mv %{_unitdir}/telephony-daemon.service %{_unitdir}/telephony-daemon.service.tv.ivi
+
+%post profile_ivi
+ln -sf telephony-daemon.ivi %{_bindir}/telephony-daemon
+mv %{_unitdir}/telephony-daemon.service.tv.ivi %{_unitdir}/telephony-daemon.service
+%preun profile_ivi
+rm %{_bindir}/telephony-daemon
+mv %{_unitdir}/telephony-daemon.service %{_unitdir}/telephony-daemon.service.tv.ivi
+
 %files
 %manifest telephony-daemon.manifest
 %defattr(644,root,root,-)
+%{_datadir}/license/telephony-daemon
+
+%files profile_common
 %caps(cap_net_admin=eip) %attr(755,root,root) %{_bindir}/telephony-daemon
-%{_unitdir}/telephony-daemon.service
-%if "%{profile}" != "tv" && "%{profile}" != "ivi"
 %{_unitdir}/multi-user.target.wants/telephony-daemon.service
-%endif
-%{_datadir}/license/telephony-daemon
+%{_unitdir}/telephony-daemon.service
+
+%files profile_tv
+%caps(cap_net_admin=eip) %attr(755,root,root) %{_bindir}/telephony-daemon.tv
+%{_unitdir}/telephony-daemon.service.tv.ivi
+
+%files profile_ivi
+%caps(cap_net_admin=eip) %attr(755,root,root) %{_bindir}/telephony-daemon.ivi
+%{_unitdir}/telephony-daemon.service.tv.ivi