Release version 0.11.0
[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.11.0
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 %install
71 rm -rf %{buildroot}
72 %make_install
73
74 %if 0%{?gcov:1}
75 builddir=$(basename $PWD)
76 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
77 mkdir -p "$gcno_obj_dir"
78 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
79 %endif
80
81 %post -p /sbin/ldconfig
82
83 %postun -p /sbin/ldconfig
84
85
86 %files
87 %manifest %{name}.manifest
88 %license LICENSE
89 %{_libdir}/libcapi-appfw-package-manager.so.*
90
91 %files devel
92 %manifest %{name}.manifest
93 %{_includedir}/appfw/*.h
94 %{_libdir}/libcapi-appfw-package-manager.so
95 %{_libdir}/pkgconfig/*.pc
96
97 %files test
98 %manifest %{name}.manifest
99 %{_bindir}/pkgmgr_tool
100
101 %if 0%{?gcov:1}
102 %files gcov
103 %{_datadir}/gcov/obj/*
104 %endif