Split CXXFLAGS of the spec file for -D_SECURE_LOG
authorso.yu <so.yu@samsung.com>
Fri, 6 Sep 2013 07:41:43 +0000 (16:41 +0900)
committerso.yu <so.yu@samsung.com>
Fri, 6 Sep 2013 07:41:52 +0000 (16:41 +0900)
Change-Id: I637037cb324b4c3a685cf9148bbacd22d80e611b
Signed-off-by: so.yu <so.yu@samsung.com>
packaging/osp-appwidget-service.spec

index 9aafe66c916b2d700c0745ac7ad4aa36fe14d401..a4564e1e971eb9cfb6e87966e9c60a8b6698df14 100755 (executable)
@@ -33,12 +33,24 @@ osp appwidget service
 
 %build
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+
 %ifarch %{ix86}
-CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       ARCH=x86
+       CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_"
+       %if 0%{?simulator}
+               CXXFLAGS="$CXXFLAGS -D_OSP_EMUL_"
+       %endif
 %else
-CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       ARCH=arm
+       CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_"
+%endif
+
+%if 0%{?tizen_build_binary_release_type_eng}
+       CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
 %endif
 
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=${ARCH}
+
 # Call make instruction with smp support
 make %{?jobs:-j%jobs}
 
@@ -66,4 +78,4 @@ cp -f %{_libdir}/osp/osp-system-service-loader /usr/apps/gi2qxenosh/bin/%{name}
 %files
 %manifest %{name}.manifest
 /usr/share/license/%{name}
-/usr/apps/*
\ No newline at end of file
+/usr/apps/*