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