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