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