Split CXXFLAGS of the spec file for -D_SECURE_LOG
[platform/framework/native/channel-service.git] / packaging / osp-channel-service.spec
1 Name:           osp-channel-service
2 Summary:        osp channel service
3 Version:        1.2.2.0
4 Release:        1
5 Group:          System/Libraries
6 License:    Apache License, Version 2.0
7 Source0:        %{name}-%{version}.tar.gz
8 BuildRequires:  cmake
9 BuildRequires:  pkgconfig(glib-2.0)
10 BuildRequires:  pkgconfig(osp-appfw)
11 BuildRequires:  pkgconfig(bundle)
12 BuildRequires:  pkgconfig(dlog)
13 BuildRequires:  pkgconfig(chromium)
14 BuildRequires:  pkgconfig(libsoup-2.4)
15 BuildRequires:  pkgconfig(libssl)
16 BuildRequires:  pkgconfig(libsmack)
17 BuildRequires:  pkgconfig(message-port)
18 BuildRequires:  pkgconfig(openssl)
19 BuildRequires:  pkgconfig(aul)
20 BuildRequires:  pkgconfig(pkgmgr-info)
21 BuildRequires:  osp-appfw-internal-devel
22 BuildRequires:  hash-signer
23
24 # runtime requires
25 Requires: osp-appfw 
26 Requires: osp-installer
27 Requires: osp-app-service
28
29 Requires(post): coreutils
30
31 %description
32 osp channel service
33
34 %prep
35 %setup -q
36
37 %build
38 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
39
40 %ifarch %{ix86}
41         ARCH=x86
42         CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_"
43         %if 0%{?simulator}
44                 CXXFLAGS="$CXXFLAGS -D_OSP_EMUL_"
45         %endif
46 %else
47         ARCH=arm
48         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_"
49 %endif
50
51 %if 0%{?tizen_build_binary_release_type_eng}
52         CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
53 %endif
54
55 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=${ARCH}
56
57 # Call make instruction with smp support
58 make %{?jobs:-j%jobs}
59
60 %install
61 rm -rf %{buildroot}
62 mkdir -p %{buildroot}/usr/share/license
63 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
64
65 %make_install
66 %define tizen_sign 1
67 %define tizen_sign_base /usr/apps/cp7ipabg4k
68 %define tizen_sign_level public
69 %define tizen_author_sign 1
70 %define tizen_dist_sign 1
71
72 %post
73 /bin/rm -fr /opt/apps/cp7ipabg4k
74 /usr/etc/package-manager/backend/tpk -i /usr/apps/cp7ipabg4k
75
76 #%postun -p /sbin/ldconfig
77
78 %files
79 %manifest osp-channel-service.manifest
80 /usr/share/license/%{name}
81 /usr/apps/*