summaryrefslogtreecommitdiff
path: root/packaging/capi-ui-efl-util.spec
blob: 996bdd555203e2af08da077195b9fc91883e38ec (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

Name:       capi-ui-efl-util
Summary:    An EFL utility library in Tizen C API
Version:    0.7.3
Release:    1
Group:      Graphics & UI Framework/API
License:    Apache-2.0
Source0:    %{name}-%{version}.tar.gz
Source1001: 	capi-ui-efl-util.manifest
BuildRequires:  cmake
BuildRequires:  pkgconfig(dlog)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-tbm-client)
BuildRequires:  pkgconfig(screenshooter-client)
BuildRequires:  pkgconfig(tizen-extension-client)
BuildRequires:  pkgconfig(ecore-wl2)
BuildRequires:  pkgconfig(elementary)
BuildRequires:  pkgconfig(capi-base-common)
BuildRequires:  pkgconfig(capi-system-info)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(libtbm)

%{!?TZ_SYS_RO_SHARE: %global TZ_SYS_RO_SHARE /usr/share}

%description
An EFL utility library in SLP C API.


%package devel
Summary:  An EFL utility library in Tizen C API (Development)
Requires: %{name} = %{version}-%{release}

%description devel
%devel_desc

%if 0%{?gcov:1}
%package gcov
Summary: efl-util gcov data package
Group: Development/Libraries

%description gcov
efl-util gcno data for gcov
%endif

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

cp -a include/efl_util.h.in include/efl_util.h
sed -i 's/\$TZ_CFG_VER_24_OR_30\$/@if WEARABLE 3.0 @else 2.4 @endif/g'    include/efl_util.h
sed -i 's/\$TZ_CFG_VER_24_OR_231\$/@if WEARABLE 2.3.1 @else 2.4 @endif/g'   include/efl_util.h

%build
export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%if 0%{?gcov:1}
%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DEFLUTILGCOV=ON \
%else
%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DEFLUTILGCOV=OFF \
%endif

make %{?jobs:-j%jobs}

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

%install
%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


%files
%manifest %{name}.manifest
%license LICENSE.APLv2
%{_libdir}/libcapi-ui-efl-util.so.*

%files devel
%manifest %{name}.manifest
%{_includedir}/ui/efl_util.h
%{_includedir}/ui/efl_util_screenshot_extension.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libcapi-ui-efl-util.so
%exclude %{_includedir}/ui/config.h

%if 0%{?gcov:1}
%files gcov
%{_datadir}/gcov/obj/*
%endif