summaryrefslogtreecommitdiff
path: root/packaging/capi-appfw-application.spec
blob: 31af871379e1c10f4b292f55a569ee4ed18ed2de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
Name:       capi-appfw-application
Summary:    An Application library in SLP C API
Version:    0.5.26
Release:    0
Group:      System/API
License:    Apache-2.0
Source0:    %{name}-%{version}.tar.gz
Source1001:     capi-appfw-application.manifest
Source1002:     appcore-ui-app-ambient.manifest
BuildRequires:  cmake
BuildRequires:  pkgconfig(dlog)
BuildRequires:  pkgconfig(bundle)
BuildRequires:  pkgconfig(appcore-common)
BuildRequires:  pkgconfig(appcore-efl)
BuildRequires:  pkgconfig(aul)
BuildRequires:  pkgconfig(alarm-service)
BuildRequires:  pkgconfig(appsvc)
BuildRequires:  pkgconfig(elementary)
BuildRequires:  pkgconfig(capi-base-common)
BuildRequires:  pkgconfig(capi-appfw-app-control)
BuildRequires:  pkgconfig(capi-appfw-app-common)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(libtzplatform-config)
BuildRequires:  pkgconfig(vconf-internal-keys)
BuildRequires:  pkgconfig(eventsystem)
BuildRequires:  pkgconfig(pkgmgr-info)
BuildRequires:  pkgconfig(glib-2.0)

%if 0%{?gcov:1}
BuildRequires:  pkgconfig(gmock)
BuildRequires:  lcov
BuildRequires:  zip
%endif

%description
An Application library in SLP C API package.

%package devel
Summary:  An Application library in SLP C API (Development)
Group:    System/API
Requires: %{name} = %{version}

%description devel
An Application library in SLP C API (Development) package.

%if 0%{?gcov:1}
%package gcov
Summary:  An application library(gcov)
Group:    System/API

%description gcov
gcov objects of an application library
%endif

#################################################
# ui-app-ambient-gcov
#################################################
%package ui-app-ambient-gcov
Summary:    Gcov for application library
Group:      Development/Libraries
Requires:   %{name}

%description ui-app-ambient-gcov
Gcov for application library

%prep
%setup -q
cp %{SOURCE1001} .
cp %{SOURCE1002} .

%build
%if 0%{?gcov:1}
export CFLAGS+=" -fprofile-arcs -ftest-coverage"
export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
export FFLAGS+=" -fprofile-arcs -ftest-coverage"
export LDFLAGS+=" -lgcov"
%endif

MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
         -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
%__make %{?jobs:-j%jobs}

%if 0%{?gcov:1}
mkdir -p gcov-obj
find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
%endif

%check
(cd unittest && ctest -V --output-on-failure)
%if 0%{?gcov:1}
lcov -c --ignore-errors graph --no-external -q -d . -o appcore_ui_app_ambient.info
genhtml appcore_ui_app_ambient.info -o appcore_ui_app_ambient.out
zip -r appcore_ui_app_ambient.zip appcore_ui_app_ambient.out
install -m 0644 appcore_ui_app_ambient.zip %{buildroot}%{_datadir}/gcov/
%endif

%install
rm -rf %{buildroot}
%make_install

%if 0%{?gcov:1}
mkdir -p %{buildroot}%{_datadir}/gcov/obj
install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
%endif

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

################################################
# libappcore-ui-app-ambient
%package -n appcore-ui-app-ambient
Summary: APIs to set lifecycle ui application ambient
Version: 0.0.1
License: Apache-2.0
Group: Applications/Core Applications

%description -n appcore-ui-app-ambient
A set of APIs to set lifecycle ui application ambient

%package -n appcore-ui-app-ambient-devel
Summary: APIs to set lifecycle ui application ambient
Group: Development/Libraries

%description -n appcore-ui-app-ambient-devel
Header & package configuration of appcore-ui-app-ambient

%post -n appcore-ui-app-ambient -p /sbin/ldconfig
%postun -n appcore-ui-app-ambient -p /sbin/ldconfig

%files
%manifest %{name}.manifest
%{_libdir}/libcapi-appfw-application.so.*
%license LICENSE

%files devel
%manifest %{name}.manifest
%{_includedir}/appfw/app.h
%{_includedir}/appfw/app_internal.h
%{_includedir}/appfw/app_extension.h
%{_includedir}/appfw/app_i18n.h
%{_libdir}/pkgconfig/capi-appfw-application.pc
%{_libdir}/libcapi-appfw-application.so

%files -n appcore-ui-app-ambient
%manifest appcore-ui-app-ambient.manifest
%license LICENSE
%{_libdir}/libappcore-ui-app-ambient.so.*

%files -n appcore-ui-app-ambient-devel
%{_includedir}/appcore-ui-app-ambient/*.h
%{_libdir}/pkgconfig/appcore-ui-app-ambient.pc
%{_libdir}/libappcore-ui-app-ambient.so

%if 0%{?gcov:1}
%files ui-app-ambient-gcov
%{_datadir}/gcov/*
%{_bindir}/gtest-ui-app-ambient
%endif