Fix incorrect rpm-build macros 99/104899/3
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 14 Dec 2016 13:52:45 +0000 (22:52 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Tue, 31 Jan 2017 04:00:44 +0000 (20:00 -0800)
1. 'tizen_profile_name' is recognized only in GBM build servers (private).
  Make it explicit.

   : It is highly recommended NOT to use in-code ifdef/endif with profile: TIZEN_TV
   Please remove all of them soon. (This will be incomaptible with Tizen 4.0)

2. TIZEN_MICRO is useless.

3. tizen_audio_feature_bludetooth_enable is useless

Change-Id: I9885f415b1e8604d34a0187250292187b8ef9969
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
include/mm_sound_common.h
packaging/libmm-sound.spec

index 281f95ed8bab8cbc636c98d502471e031c7a7420..1724ec2b3733f076077d26d48a2db5f3b1e076f5 100644 (file)
 #define VCONF_KEY_VOLUME_TYPE_ANDROID          VCONF_KEY_VOLUME_PREFIX"/fixed"
 
 #ifndef _TIZEN_PUBLIC_
-#ifdef TIZEN_MICRO
 #define VCONF_KEY_VR_LEFTHAND_ENABLED          VCONFKEY_SETAPPL_PERFERED_ARM_LEFT_BOOL
 #endif
-#endif
 
 #define PA_READY "/tmp/.pa_ready"
 
-#ifdef TIZEN_TV
 #define SOUND_SERVER_READY "/tmp/.sound_server_ready"
-#endif
 
 #define MMSOUND_ENTER_CRITICAL_SECTION(x_mutex) \
 switch ( pthread_mutex_lock( x_mutex ) ) \
index 01c84e1a462ff6cec667aee5236e4d0f90d3e65e..1edffbdf482bfd34d5611dbcecd7928a28295e6f 100644 (file)
@@ -10,7 +10,7 @@ Source4:    focus-server.service
 Source5:    focus-server.path
 Source6:    focus-server.conf
 Requires: security-config
-%if "%{?tizen_profile_name}" == "tv"
+%if "%{?TIZEN_PRODUCT_TV}" == "1"
 Source8:    focus-server-tv.service
 %endif
 Source9:    org.tizen.SoundServer.service
@@ -64,18 +64,9 @@ MMSound utility package - contians mm_sound_testsuite, sound_check for sound sys
 %build
 %define tizen_audio_feature_ogg_enable 1
 
-%if "%{?tizen_profile_name}" == "tv"
-%define tizen_audio_feature_bluetooth_enable 0
-%else
-%define tizen_audio_feature_bluetooth_enable 1
-%endif
-
 CFLAGS="%{optflags} -fvisibility=hidden -D_TIZEN_PUBLIC_ -DMM_DEBUG_FLAG -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\"" ;export CFLAGS
 
-%if "%{?tizen_profile_name}" == "wearable"
-       CFLAGS+=" -DTIZEN_MICRO";export CFLAGS
-%endif
-%if "%{?tizen_profile_name}" == "tv"
+%if "%{?TIZEN_PRODUCT_TV}" == "1"
         CFLAGS+=" -DTIZEN_TV";export CFLAGS
 %endif
 
@@ -101,21 +92,21 @@ cp LICENSE.APLv2 %{buildroot}/usr/share/license/libmm-sound-tool
 mkdir -p %{buildroot}/etc/dbus-1/system.d/
 cp %{SOURCE3} %{buildroot}/etc/dbus-1/system.d/sound-server.conf
 cp %{SOURCE6} %{buildroot}/etc/dbus-1/system.d/focus-server.conf
-%if "%{?tizen_profile_name}" == "tv"
+%if "%{?TIZEN_PRODUCT_TV}" == "1"
 cp %{SOURCE8} %{SOURCE4}
 %endif
 mkdir -p %{buildroot}/usr/share/dbus-1/system-services/
 cp %{SOURCE9} %{buildroot}/usr/share/dbus-1/system-services/org.tizen.SoundServer.service
 
 %make_install
-%if "%{?tizen_profile_name}" == "tv"
+%if "%{?TIZEN_PRODUCT_TV}" == "1"
 install -d %{buildroot}%{_unitdir}/sysinit.target.wants
 %else
 install -d %{buildroot}%{_unitdir}/multi-user.target.wants
 %endif
 install -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/
 install -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/
-%if "%{?tizen_profile_name}" == "tv"
+%if "%{?TIZEN_PRODUCT_TV}" == "1"
 ln -sf ../focus-server.path %{buildroot}%{_unitdir}/sysinit.target.wants/focus-server.path
 %else
 ln -sf ../focus-server.path %{buildroot}%{_unitdir}/multi-user.target.wants/focus-server.path
@@ -145,7 +136,7 @@ ln -sf ../focus-server.path %{buildroot}%{_unitdir}/multi-user.target.wants/focu
 %if 0%{?tizen_audio_feature_ogg_enable}
 %{_libdir}/soundplugins/libsoundplugintremoloogg.so
 %endif
-%if "%{?tizen_profile_name}" == "tv"
+%if "%{?TIZEN_PRODUCT_TV}" == "1"
 %{_unitdir}/sysinit.target.wants/focus-server.path
 %else
 %{_unitdir}/multi-user.target.wants/focus-server.path