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