2a0d5351a85cdcc9f5fc2ba18bfaf9644462a1cc
[platform/framework/native/compat.git] / packaging / osp-compat.spec
1 Name:       osp-compat
2 Summary:    osp-compat library
3 Version:    1.3.0.0
4 Release:    1
5 Group:      TO_BE/FILLED_IN
6 License:    Apache License, Version 2.0
7 Source0:    %{name}-%{version}.tar.gz
8 BuildRequires:  cmake
9 BuildRequires:  pkgconfig(osp-appfw)
10 BuildRequires:  pkgconfig(osp-net)
11 BuildRequires:  pkgconfig(osp-nfc)
12 BuildRequires:  pkgconfig(osp-social)
13 BuildRequires:  pkgconfig(osp-uifw)
14
15 Provides:       libosp-compat.so.1
16
17 %description
18 osp-compat library
19
20 %prep
21 %setup -q
22
23 %build
24 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
25 %ifarch %{ix86}
26 %if 0%{?simulator}
27 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DEMUL=1
28 %else
29 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DEMUL=1
30 %endif
31 %else
32 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DTARGET=1
33 %endif
34
35 # Call make instruction with smp support
36 make %{?jobs:-j%jobs}
37
38 %install
39 rm -rf %{buildroot}
40 mkdir -p %{buildroot}/usr/share/license
41 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
42
43 %make_install
44
45 %post -p /sbin/ldconfig
46
47 %postun -p /sbin/ldconfig
48
49 %files
50 %manifest osp-compat.manifest
51 %defattr(-,root,root,-)
52 /usr/share/license/%{name}
53 %{_libdir}/osp/libosp-compat.so*