d4f3978e5c75b285531f318741d984b0a5a92717
[platform/core/api/motion.git] / packaging / capi-context-motion.spec
1 Name:       capi-context-motion
2 Summary:    Tizen Native Motion Recognition API
3 Version:    2.0.0
4 Release:    1
5 Group:      Service/Context
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(glib-2.0)
11 BuildRequires:  pkgconfig(dlog)
12 BuildRequires:  pkgconfig(capi-base-common)
13 BuildRequires:  pkgconfig(capi-system-info)
14 BuildRequires:  pkgconfig(sensor)
15
16 Requires(post):  /sbin/ldconfig
17 Requires(postun):  /sbin/ldconfig
18
19 # Backward compatibility
20 Provides: motion
21
22 %description
23 Tizen Native Motion Recognition API
24
25 %prep
26 %setup -q
27
28 %build
29 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
30
31 export CXXFLAGS+=" -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-parameter"
32 export CXXFLAGS+=" -Wno-empty-body -fomit-frame-pointer -fno-optimize-sibling-calls"
33 export CXXFLAGS+=" -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow"
34 export CXXFLAGS+=" -Wnon-virtual-dtor"
35
36 %cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version}
37 make %{?_smp_mflags}
38
39 %install
40 %make_install
41
42 # For backward compatibility
43 ln -s %{name}.pc %{buildroot}/%{_libdir}/pkgconfig/motion.pc
44 ln -s %{name}.pc %{buildroot}/%{_libdir}/pkgconfig/libcore-context-manager.pc
45 ln -s lib%{name}.so.%{version} %{buildroot}/%{_libdir}/libcore-context-manager.so.1
46
47 %post
48 /sbin/ldconfig
49
50 %postun
51 /sbin/ldconfig
52
53 %files
54 %manifest packaging/%{name}.manifest
55 %{_libdir}/*.so*
56 %license LICENSE
57
58 %package devel
59 Summary:        Tizen Native Motion Recognition API (Development)
60 Group:          Framework/context
61 Requires:       %{name} = %{version}-%{release}
62
63 %description devel
64 Tizen Native Motion Recognition API (Development)
65
66 %files devel
67 %{_includedir}/*/*.h
68 %{_libdir}/pkgconfig/*.pc
69
70
71 %package -n motion
72 Summary:        Dummy package for OBS build
73 Group:          Framework/context
74
75 %description -n motion
76 Dummy package for OBS image creation
77
78 %files -n motion
79
80 %package -n motion-devel
81 Summary:        Dummy package for OBS build
82 Group:          Framework/context
83
84 %description -n motion-devel
85 Dummy package for OBS build
86
87 %files -n motion-devel