a91d3d11a43436b5f17b43b77d81a91dc448ed62
[platform/core/appfw/message-port.git] / packaging / message-port.spec
1 Name:       message-port
2 Summary:    Message Port library
3 Version:        1.4.0
4 Release:    0
5 Group:          Application Framework/Libraries
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(bundle)
12 BuildRequires:  pkgconfig(glib-2.0)
13 BuildRequires:  pkgconfig(aul)
14 BuildRequires:  pkgconfig(pkgmgr)
15 BuildRequires:  pkgconfig(pkgmgr-info)
16 BuildRequires:  pkgconfig(openssl1.1)
17
18 Requires(post): /sbin/ldconfig
19 Requires(post): coreutils
20 Requires(postun): /sbin/ldconfig
21
22 Provides: capi-message-port
23 Provides: libcapi-message-port.so.1
24
25 %description
26 Message Port library package.
27
28 %package devel
29 Summary:  Message Port library (Development)
30 Group:    Application Framework/Development
31 Requires: %{name} = %{version}-%{release}
32
33 %description devel
34 Message Port library (Development) package.
35
36 %if 0%{?gcov:1}
37 %package gcov
38 Summary:  Message Port API(gcov)
39 Group:    Application Framework/Libraries
40
41 %description gcov
42 gcov objects of a message port library
43 %endif
44
45 %prep
46 %setup -q
47 cp %{SOURCE1001} .
48
49 %build
50 %if 0%{?gcov:1}
51 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
52 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
53 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
54 export LDFLAGS+=" -lgcov"
55 %endif
56
57 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
58 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
59 # Call make instruction with smp support
60 %__make %{?jobs:-j%jobs}
61
62 %if 0%{?gcov:1}
63 mkdir -p gcov-obj
64 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
65 %endif
66
67 %install
68 rm -rf %{buildroot}
69
70 %make_install
71
72 %if 0%{?gcov:1}
73 mkdir -p %{buildroot}%{_datadir}/gcov/obj
74 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
75 %endif
76
77 %post -p /sbin/ldconfig
78
79 %postun -p /sbin/ldconfig
80
81 %files
82 %manifest %{name}.manifest
83 %attr(0644,root,root) %{_libdir}/lib%{name}.so.*
84 %attr(0644,root,root) %{_libdir}/libcapi-message-port.so.*
85 %config %{_sysconfdir}/dbus-1/session.d/message-port.conf
86 %license LICENSE.APLv2
87
88 %files devel
89 %{_includedir}/appfw/*.h
90 %{_libdir}/pkgconfig/*.pc
91 %{_libdir}/lib%{name}.so
92
93 %if 0%{?gcov:1}
94 %files gcov
95 %{_datadir}/gcov/obj/*
96
97 %endif