Add '-D_SECURE_LOG'
[platform/framework/native/telephony.git] / packaging / osp-telephony.spec
1 %define debug_package %{nil}
2 %define __strip /bin/true
3
4 Name:           osp-telephony
5 Summary:        osp telephony library
6 Version:        1.2.1.0
7 Release:        2
8 Group:          System/Libraries
9 License:        Apache License, Version 2.0
10 Source0:        %{name}-%{version}.tar.gz
11 BuildRequires:  cmake
12 BuildRequires:  pkgconfig(chromium)
13 BuildRequires:  pkgconfig(capi-telephony-sim)
14 BuildRequires:  pkgconfig(capi-telephony-network-info)
15 BuildRequires:  pkgconfig(capi-network-connection)
16 BuildRequires:  pkgconfig(glib-2.0)
17 BuildRequires:  pkgconfig(tapi)
18 BuildRequires:  pkgconfig(osp-appfw)
19 BuildRequires:  osp-appfw-internal-devel
20 BuildRequires:  pkgconfig(osp-net)
21 BuildRequires:  osp-net-internal-devel
22
23 # runtime requires
24 Requires: osp-appfw 
25 Requires: osp-net
26
27 %description
28 osp telephony library
29
30 %package devel
31 Summary:    osp telephony library (Development)
32 Group:      TO_BE/FILLED_IN
33 Requires:   %{name} = %{version}-%{release}
34
35 %description devel
36 osp telephony library (DEV)
37
38 %package internal-devel
39 Summary:    osp telephony library (Internal)
40 Group:      TO_BE/FILLED_IN
41 Requires:   %{name} = %{version}-%{release}
42
43 %description internal-devel
44 osp telephony library (Internal-DEV)
45
46 %package debug
47 Summary:    osp telephony library (Development)
48 Group:      TO_BE/FILLED_IN
49 Requires:   %{name} = %{version}-%{release}
50
51 %description debug
52 osp telephony library (DEV)
53
54 %prep
55 %setup -q
56
57 %build 
58 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
59 %ifarch %{ix86}
60 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
61 %else
62 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} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
63 %endif
64
65 # Call make instruction with smp support
66 make %{?jobs:-j%jobs}
67
68 %install
69 rm -rf %{buildroot}
70 mkdir -p %{buildroot}/usr/share/license
71 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
72
73 %make_install
74
75 %post -p /sbin/ldconfig
76
77 %postun -p /sbin/ldconfig
78
79 %files
80 %manifest osp-telephony.manifest
81 /usr/share/license/%{name}
82 %{_libdir}/osp/*.so*
83
84 %files devel
85 %{_includedir}/osp/*.h
86 %{_libdir}/pkgconfig/osp-telephony.pc
87
88 %files internal-devel
89 %{_includedir}/osp/telephony/*.h
90
91 %files debug
92 %{_libdir}/osp/debug/*.so*