Location setting restriction to support DPM
[platform/core/location/lbs-location.git] / packaging / liblbs-location.spec
1 Name: liblbs-location
2 Summary: Location Based Service Library
3 Version: 1.3.0
4 Release: 1
5 Group: Location/Libraries
6 License: Apache-2.0
7 Source0:  %{name}-%{version}.tar.gz
8 Source1001: %{name}.manifest
9 Requires(post): /sbin/ldconfig
10 Requires(postun): /sbin/ldconfig
11 BuildRequires:  cmake
12 BuildRequires:  pkgconfig(glib-2.0)
13 BuildRequires:  pkgconfig(gmodule-2.0)
14 BuildRequires:  pkgconfig(dlog)
15 BuildRequires:  pkgconfig(vconf)
16 BuildRequires:  pkgconfig(capi-appfw-app-manager)
17 %if "%{profile}" != "tv"
18 BuildRequires:  pkgconfig(cynara-client)
19 BuildRequires:  pkgconfig(cynara-session)
20 %endif
21 BuildRequires:  pkgconfig(json-glib-1.0)
22 BuildRequires:  pkgconfig(bundle)
23 BuildRequires:  pkgconfig(eventsystem)
24 BuildRequires:  pkgconfig(libtzplatform-config)
25 BuildRequires:  pkgconfig(capi-system-sensor)
26
27 %description
28 Location Based Service Library
29
30
31 %package devel
32 Summary:    Location Based Service Library (Development files)
33 Group:      Location/Development
34 Requires:   %{name} = %{version}-%{release}
35
36 %description devel
37 Location Based Service Library (Development files)
38 The package includes header files and pkgconfig file.
39
40
41 %prep
42 %setup -q -n %{name}-%{version}
43 cp %{SOURCE1001} .
44
45
46 %build
47 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
48 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
49 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
50
51 %ifarch %arm aarch64
52 export CFLAGS="$CFLAGS -DTIZEN_DEVICE"
53 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEVICE"
54 export FFLAGS="$FFLAGS -DTIZEN_DEVICE"
55 %endif
56
57 # Call make instruction with smp support
58 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
59 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} \
60 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
61 %if "%{profile}" == "wearable"
62         -DFEATURE_PROFILE_WEARABLE:BOOL=ON \
63 %endif
64 %if "%{profile}" == "tv"
65         -DFEATURE_PROFILE_TV:BOOL=ON
66 %endif
67
68
69
70 make %{?jobs:-j%jobs}
71
72
73 %install
74 rm -rf %{buildroot}
75 %make_install
76
77
78 %clean
79 rm -rf %{buildroot}
80
81
82 %post
83 /sbin/ldconfig
84
85
86 %postun -p /sbin/ldconfig
87
88
89 %files
90 %manifest %{name}.manifest
91 %license LICENSE
92 %{_libdir}/*.so.*
93
94 %files devel
95 %{_includedir}/location/*.h
96 %{_libdir}/pkgconfig/*.pc
97 %{_libdir}/*.so