e9fa3b1f6294a825e0012b73195637a0efa7fe99
[framework/location/maps-service.git] / packaging / capi-maps-service.spec
1 Name:       capi-maps-service
2 Summary:    Tizen Maps Service API
3 Version:    0.4.6
4 Release:    1
5 Group:      Location/API
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(glib-2.0)
11 BuildRequires:  pkgconfig(gmodule-2.0)
12 BuildRequires:  pkgconfig(capi-base-common)
13 BuildRequires:  pkgconfig(dlog)
14 BuildRequires:  pkgconfig(security-privilege-checker)
15 Requires(post):  /sbin/ldconfig
16 Requires(postun):  /sbin/ldconfig
17 Provides: capi-maps-service-plugin-devel
18
19 %ifarch %{arm}
20 %define ARCH arm
21 %else
22 %define ARCH i586
23 %endif
24
25 %description
26 This provides the Tizen Map Service API to access and handle the map data.
27
28 %prep
29 %setup -q
30
31 %build
32 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
33 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
34 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
35
36 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
37 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DLIBDIR=%{_libdir}
38 make %{?jobs:-j%jobs}
39
40 %install
41 rm -rf %{buildroot}
42 %make_install
43
44 mkdir -p %{buildroot}/usr/share/license
45 cp LICENSE %{buildroot}/usr/share/license/%{name}
46
47 %post
48 /sbin/ldconfig
49
50 %postun
51 /sbin/ldconfig
52
53 %files
54 %manifest capi-maps-service.manifest
55 %defattr(-,root,root,-)
56 /usr/share/license/capi-maps-service
57 %{_libdir}/libcapi-maps-service.so.*
58
59
60 %package devel
61 Summary:    Tizen Maps Service Library (Development)
62 Group:      Location/Libraries
63 Requires:  %{name} = %{version}-%{release}
64
65 %description devel
66 This provides the Tizen Maps Service Library to access and handle the map data. (Development)
67
68 %post devel
69 /sbin/ldconfig
70
71 %postun devel
72 /sbin/ldconfig
73
74 %files devel
75 %defattr(-,root,root,-)
76 %{_includedir}/maps/maps_*.h
77 %{_libdir}/pkgconfig/capi-maps-service.pc
78 %{_libdir}/libcapi-maps-service.so
79 %exclude %{_includedir}/maps/maps_plugin*.h
80 %exclude %{_includedir}/maps/maps_*_plugin.h
81 %exclude %{_includedir}/maps/maps_extra_types.h
82
83
84 %package plugin-devel
85 Summary:    Tizen Maps Library for the Maps Service Plug-in (Development)
86 Group:      Location/Libraries
87 Requires:  %{name} = %{version}-%{release}
88
89 %description plugin-devel
90 This provides the Tizen Map Service APIs to access and handle map data for the Maps Service Plug-in. (Development)
91
92 %post plugin-devel
93 /sbin/ldconfig
94
95 %postun plugin-devel
96 /sbin/ldconfig
97
98 %files plugin-devel
99 %defattr(-,root,root,-)
100 %{_includedir}/maps/maps_plugin*.h
101 %{_includedir}/maps/maps_*plugin.h
102 %{_includedir}/maps/maps_extra_types.h
103
104
105 #if you want to tesst code, please remove %if statement
106 %if 0
107 %package test
108 Summary:    Tizen Maps Service Library Test (Internal Dev)
109 Group:      Location/Testing
110 Requires:   capi-maps-service = %{version}-%{release}
111
112 %description test
113 This is a program to test the Tizen Maps Service Library internally.
114
115
116 %files test
117 %defattr(-,root,root,-)
118 %manifest test/capi-maps-service-test.manifest
119 /etc/smack/accesses.d/capi-maps-service-test.efl
120 #/usr/share/packages/capi-maps-service-test.xml
121 /opt/usr/devel/capi-maps-service-test
122
123 #################################################################################
124 # Test plugin library
125
126 %package -n maps-plugin-test
127 Summary:    Tizen Maps Service Plug-in Test (Internal Dev)
128 Group:      Location/Testing
129 Requires:   %{name} = %{version}-%{release}
130
131 %description -n maps-plugin-test
132 This is a program to test the Tizen Maps Service for Plug-in internally.
133
134 %files -n maps-plugin-test
135 %manifest test/dummy_plugin/maps-plugin-test.manifest
136 %defattr(-,root,root,-)
137 %{_libdir}/maps/plugins/libmaps-plugin-test.so*
138 %endif