a93eb9d818e9a6e548a0086cd10095397d0a84e8
[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.6.1
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 Requires(post): /sbin/ldconfig
16 Requires(postun): /sbin/ldconfig
17
18 %description
19 A Location Manager library in Tizen Native API
20
21
22 %package devel
23 Summary:  A Location Manager library in Tizen Native API (Development)
24 Group:    Location/Development
25 Requires: %{name} = %{version}-%{release}
26
27 %description devel
28 A Location Manager library in Tizen Native API (Development)
29
30
31 %prep
32 %setup -q
33 cp %{SOURCE1001} .
34
35 %build
36
37 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
38 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
39 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
40
41 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
42 #cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
43 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBUILD_PKGTYPE=rpm -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} \
44 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
45
46 make %{?jobs:-j%jobs}
47
48 %install
49 rm -rf %{buildroot}
50 %make_install
51
52 #mkdir -p %{buildroot}/usr/share/license
53 #cp LICENSE %{buildroot}/usr/share/license/%{name}
54
55 %post -p /sbin/ldconfig
56
57 %postun -p /sbin/ldconfig
58
59 %files
60 %manifest %{name}.manifest
61 %license LICENSE
62 %{_libdir}/libcapi-location-manager.so.*
63
64 %files devel
65 %{_includedir}/location/*.h
66 %{_libdir}/pkgconfig/*.pc
67 %{_libdir}/libcapi-location-manager.so
68
69
70 %if 1
71 %package test
72 Summary:    Test application of Location Manager
73 Group:      Location/Testing
74 Requires: %{name} = %{version}-%{release}
75
76 %description test
77 Test application of Location Manager
78
79 %files test
80 %manifest test/capi-location-manager-test.manifest
81 /etc/smack/accesses.d/capi-location-manager-test.efl
82 /opt/usr/devel/location/location_test
83 %endif