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