d60d4504627a87d1ef9968cc182f96a0472327d2
[platform/core/api/media-key.git] / packaging / capi-system-media-key.spec
1 Name:       capi-system-media-key
2 Summary:    A System Information library in SLP C API
3 Version:    0.2.1
4 Release:    6
5 Group:      System/API
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001:     capi-system-media-key.manifest
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(dlog)
11 BuildRequires:  pkgconfig(capi-base-common)
12 BuildRequires:  pkgconfig(ecore)
13 BuildRequires:  pkgconfig(ecore-input)
14 BuildRequires:  pkgconfig(evas)
15 BuildRequires:  pkgconfig(ecore-wl2)
16
17 %description
18 %{summary}.
19
20 %package devel
21 Summary:  A Media Key library in SLP C API (Development)
22 Group:    System/API
23 Requires: %{name} = %{version}
24
25 %description devel
26 %devel_desc
27
28 %if 0%{?gcov:1}
29 %package gcov
30 Summary:  A media key library(gcov)
31 Group:    System/API
32
33 %description gcov
34 gcov objects of an media key library
35 %endif
36
37 %prep
38 %setup -q
39 cp %{SOURCE1001} .
40
41 %build
42 %if 0%{?gcov:1}
43 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
44 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
45 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
46 export LDFLAGS+=" -lgcov"
47 %endif
48
49 export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
50 export CXXFLAGS+=" -DEFL_BETA_API_SUPPORT "
51 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
52 %cmake -DFULLVER=%{version} \
53         -DMAJORVER=${MAJORVER} \
54         .
55
56 make %{?jobs:-j%jobs}
57
58 %if 0%{?gcov:1}
59 mkdir -p gcov-obj
60 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
61 %endif
62
63 %install
64 %make_install
65
66 %if 0%{?gcov:1}
67 mkdir -p %{buildroot}%{_datadir}/gcov/obj
68 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
69 %endif
70
71 %post -p /sbin/ldconfig
72
73 %postun -p /sbin/ldconfig
74
75 %files
76 %manifest %{name}.manifest
77 %license LICENSE
78 %{_libdir}/libcapi-system-media-key.so.*
79
80 %files devel
81 %manifest %{name}.manifest
82 %{_includedir}/system/media_key.h
83 %{_libdir}/pkgconfig/*.pc
84 %{_libdir}/libcapi-system-media-key.so
85
86 %if 0%{?gcov:1}
87 %files gcov
88 %{_datadir}/gcov/obj/*
89 %endif