[9.0][location] Remove conditional statements for Mobile/Wearable profile
[platform/core/api/location-manager.git] / packaging / capi-location-manager.spec
1 Name: capi-location-manager
2 Summary: A Location Manager library in Tizen Native API
3 Version: 0.8.4
4 Release: 1
5 Group: Location/API
6 License: Apache-2.0
7 Source0: %{name}-%{version}.tar.gz
8 Source1001: %{name}.manifest
9 BuildRequires: cmake
10 BuildRequires: pkgconfig(dlog)
11 BuildRequires: pkgconfig(lbs-location)
12 BuildRequires: pkgconfig(capi-base-common)
13 BuildRequires: pkgconfig(capi-system-info)
14 BuildRequires: pkgconfig(vconf)
15 BuildRequires: pkgconfig(libtzplatform-config)
16 Requires(post): /sbin/ldconfig
17 Requires(postun): /sbin/ldconfig
18
19 %if 0%{?gcov:1}
20 BuildRequires:  lcov
21 %endif
22
23 %description
24 A Location Manager library in Tizen Native API
25
26
27 %package devel
28 Summary:  A Location Manager library in Tizen Native API (Development)
29 Group:    Location/Development
30 Requires: %{name} = %{version}-%{release}
31
32 %description devel
33 A Location Manager library in Tizen Native API (Development)
34
35 #################################################
36 # gcov
37 #################################################
38 %if 0%{?gcov:1}
39 %package gcov
40 Summary:    Location Manager (gcov)
41 Group:      Service Framework/Testing
42 %description gcov
43 gcov objects for coverage test
44 %endif
45
46 %prep
47 %setup -q
48 cp %{SOURCE1001} .
49
50 %build
51 %if 0%{?gcov:1}
52 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
53 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
54 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
55 export LDFLAGS+=" -lgcov"
56 %endif
57 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
58 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} \
59 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} -DTZ_SYS_BIN=%{TZ_SYS_BIN} \
60
61 make %{?jobs:-j%jobs}
62
63 %install
64 rm -rf %{buildroot}
65 %make_install
66
67 %if 0%{?gcov:1}
68 builddir=$(basename $PWD)
69 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
70 mkdir -p "$gcno_obj_dir"
71 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
72 %endif
73
74 %post -p /sbin/ldconfig
75
76 %postun -p /sbin/ldconfig
77
78 %files
79 %manifest %{name}.manifest
80 %license LICENSE
81 %{_libdir}/libcapi-location-manager.so.*
82 %{_bindir}/location_test
83
84 %files devel
85 %{_includedir}/location/*.h
86 %{_libdir}/pkgconfig/*.pc
87 %{_libdir}/libcapi-location-manager.so
88
89 %if 0%{?gcov:1}
90 %files gcov
91 %{_datadir}/gcov/obj/*
92 %endif