blob: 624636cb0fb442b8ef1d3c5fdbf842f885fdd67e (
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
|
Name: capi-media-camera
Summary: A Camera API
Version: 0.4.97
Release: 0
Group: Multimedia/API
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(muse-client)
BuildRequires: pkgconfig(mm-common)
BuildRequires: pkgconfig(mm-camcorder)
BuildRequires: pkgconfig(mm-display-interface)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(mmsvc-camera)
BuildRequires: pkgconfig(capi-media-tool)
BuildRequires: pkgconfig(libtbm)
BuildRequires: pkgconfig(appcore-efl)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(evas)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description
A Camera library in Tizen Native API.
%package devel
Summary: A Camera API (Development)
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig(libtbm)
Requires: pkgconfig(capi-media-tool)
%description devel
Development related files for a Camera library in Tizen Native API.
%package test-headed
Summary: A Camera API testsuite for headed target
Requires: %{name} = %{version}-%{release}
%description test-headed
Tizen Native camera API testsuite for headed target.
%package test-headless
Summary: A Camera API testsuite for headless target
Requires: %{name} = %{version}-%{release}
%description test-headless
Tizen Native camera API testsuite for headless target.
%if 0%{?gcov:1}
%package gcov
Summary: Line Coverage of Camera library in Tizen Native API
Group: Development/Multimedia
%description gcov
Collection of files related to Line Coverage. It is teseted as gcov for a camera library in Tizen native API
%endif
%prep
%setup -q
%build
%if 0%{?sec_build_binary_debug_enable}
export CFLAGS+=" -DTIZEN_DEBUG_ENABLE"
%endif
%if "%{tizen_profile_name}" != "tv"
export CFLAGS+=" -DTIZEN_FEATURE_NO_TIMEOUT_FOR_PREVIEW"
%endif
%if 0%{?gcov:1}
export CFLAGS+=" -fprofile-arcs -ftest-coverage"
export LDFLAGS+=" -lgcov"
%endif
export CFLAGS+=" -DPATH_LIBDIR=\\\"%{_libdir}\\\""
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
%make_install
%if 0%{?gcov:1}
builddir=$(basename $PWD)
gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
mkdir -p "$gcno_obj_dir"
find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%manifest capi-media-camera.manifest
%license LICENSE.APLv2
%{_libdir}/libcapi-media-camera.so.*
%files devel
%{_includedir}/media/camera.h
%{_includedir}/media/camera_internal.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libcapi-media-camera.so
%files test-headed
%manifest capi-media-camera-test-headed.manifest
%license LICENSE.APLv2
%{_bindir}/camera_test_headed
%files test-headless
%manifest capi-media-camera-test-headless.manifest
%license LICENSE.APLv2
%{_bindir}/camera_test_headless
%if 0%{?gcov:1}
%files gcov
%{_datadir}/gcov/obj/*
%endif
|