Release version 0.8.9
[platform/core/api/package-manager.git] / packaging / capi-appfw-package-manager.spec
1 Name:       capi-appfw-package-manager
2 Summary:    Package Manager API
3 Version:    0.8.9
4 Release:    1
5 Group:      System/API
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001:     capi-appfw-package-manager.manifest
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(dlog)
11 BuildRequires:  pkgconfig(pkgmgr)
12 BuildRequires:  pkgconfig(pkgmgr-installer)
13 BuildRequires:  pkgconfig(pkgmgr-info)
14 BuildRequires:  pkgconfig(vconf)
15 BuildRequires:  pkgconfig(aul)
16 BuildRequires:  pkgconfig(capi-base-common)
17 BuildRequires:  pkgconfig(libtzplatform-config)
18 BuildRequires:  pkgconfig(glib-2.0)
19 BuildRequires:  pkgconfig(cynara-client)
20 BuildRequires:  pkgconfig(cynara-session)
21
22 %description
23 The Package Manager API provides functions to install, uninstall the package,
24 and also privides event listening function.
25
26 %package devel
27 Summary:  Package Manager API (Development)
28 Group:    System/API
29 Requires: %{name} = %{version}
30
31 %description devel
32 The Package Manager API provides functions to install, uninstall the package,
33 and also privides event listening function. (DEV)
34
35 %package test
36 Summary:  Package Manager API (Test Tool)
37 Group:    System/API
38 Requires: %{name} = %{version}
39
40 %description test
41 This package includes test tool for package manager apis.
42
43 %if 0%{?gcov:1}
44 %package gcov
45 Summary:  Package Manager API (gcov)
46 Group:    System/API
47
48 %description gcov
49 gcov objects for a package manager library
50 %endif
51
52 %prep
53 %setup -q
54 cp %{SOURCE1001} .
55
56
57 %build
58 %if 0%{?gcov:1}
59 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
60 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
61 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
62 export LDFLAGS+=" -lgcov"
63 %endif
64
65 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
66 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
67
68 make %{?jobs:-j%jobs}
69
70 %if 0%{?gcov:1}
71 mkdir -p gcov-obj
72 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
73 %endif
74
75 %install
76 rm -rf %{buildroot}
77 %make_install
78
79 %if 0%{?gcov:1}
80 mkdir -p %{buildroot}%{_datadir}/gcov/obj
81 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
82 %endif
83
84 %post -p /sbin/ldconfig
85
86 %postun -p /sbin/ldconfig
87
88
89 %files
90 %manifest %{name}.manifest
91 %license LICENSE
92 %{_libdir}/libcapi-appfw-package-manager.so.*
93
94 %files devel
95 %manifest %{name}.manifest
96 %{_includedir}/appfw/*.h
97 %{_libdir}/libcapi-appfw-package-manager.so
98 %{_libdir}/pkgconfig/*.pc
99
100 %files test
101 %manifest %{name}.manifest
102 %{_bindir}/pkgmgr_tool
103
104 %if 0%{?gcov:1}
105 %files gcov
106 %{_datadir}/gcov/obj/*
107 %endif