Fix svace issue - SEC_DO_NOT_USE_POINTER_WITH_INT_IN_UNION
[platform/core/api/camera.git] / packaging / capi-media-camera.spec
1 Name:       capi-media-camera
2 Summary:    A Camera API
3 Version:    1.2.3
4 Release:    0
5 Group:      Multimedia/API
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 BuildRequires:  cmake
9 BuildRequires:  pkgconfig(dlog)
10 BuildRequires:  pkgconfig(glib-2.0)
11 BuildRequires:  pkgconfig(gio-2.0)
12 BuildRequires:  pkgconfig(muse-client)
13 BuildRequires:  pkgconfig(mm-common)
14 BuildRequires:  pkgconfig(mm-camcorder)
15 BuildRequires:  pkgconfig(mm-display-interface)
16 BuildRequires:  pkgconfig(capi-base-common)
17 BuildRequires:  pkgconfig(mmsvc-camera)
18 BuildRequires:  pkgconfig(capi-media-tool)
19 BuildRequires:  pkgconfig(libtbm)
20 BuildRequires:  pkgconfig(appcore-efl)
21 BuildRequires:  pkgconfig(elementary)
22 BuildRequires:  pkgconfig(evas)
23
24 Requires(post): /sbin/ldconfig
25 Requires(postun): /sbin/ldconfig
26
27 %description
28 A Camera library in Tizen Native API.
29
30
31 %package devel
32 Summary:  A Camera API (Development)
33 Requires: %{name} = %{version}-%{release}
34 Requires: pkgconfig(libtbm)
35 Requires: pkgconfig(capi-media-tool)
36
37 %description devel
38 Development related files for a Camera library in Tizen Native API.
39
40
41 %package test-headed
42 Summary:  A Camera API testsuite for headed target
43 Requires: %{name} = %{version}-%{release}
44
45 %description test-headed
46 Tizen Native camera API testsuite for headed target.
47
48 %package test-headless
49 Summary:  A Camera API testsuite for headless target
50 Requires: %{name} = %{version}-%{release}
51
52 %description test-headless
53 Tizen Native camera API testsuite for headless target.
54
55
56 %if 0%{?gcov:1}
57 %package gcov
58 Summary: Line Coverage of Camera library in Tizen Native API
59 Group: Development/Multimedia
60
61 %description gcov
62 Collection of files related to Line Coverage. It is teseted as gcov for a camera library in Tizen native API
63 %endif
64
65
66 %prep
67 %setup -q
68
69
70 %build
71 %if 0%{?sec_build_binary_debug_enable}
72 export CFLAGS+=" -DTIZEN_DEBUG_ENABLE"
73 %endif
74 %if "%{tizen_profile_name}" != "tv"
75 export CFLAGS+=" -DTIZEN_FEATURE_NO_TIMEOUT_FOR_PREVIEW"
76 %endif
77 %if 0%{?gcov:1}
78 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
79 export LDFLAGS+=" -lgcov"
80 %endif
81 export CFLAGS+=" -DPATH_LIBDIR=\\\"%{_libdir}\\\""
82 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
83 SO_FULLVER=0.5.0
84 SO_MAJORVER=`echo ${SO_FULLVER} | awk 'BEGIN {FS="."}{print $1}'`
85 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DSO_FULLVER=${SO_FULLVER} -DSO_MAJORVER=${SO_MAJORVER}
86
87 make %{?jobs:-j%jobs}
88
89
90 %install
91 rm -rf %{buildroot}
92 %make_install
93
94 %if 0%{?gcov:1}
95 builddir=$(basename $PWD)
96 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
97 mkdir -p "$gcno_obj_dir"
98 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
99 %endif
100
101 %post -p /sbin/ldconfig
102
103
104 %postun -p /sbin/ldconfig
105
106
107 %files
108 %manifest capi-media-camera.manifest
109 %license LICENSE.APLv2
110 %{_libdir}/libcapi-media-camera.so.*
111
112 %files devel
113 %{_includedir}/media/camera.h
114 %{_includedir}/media/camera_device_manager.h
115 %{_includedir}/media/camera_internal.h
116 %{_libdir}/pkgconfig/*.pc
117 %{_libdir}/libcapi-media-camera.so
118
119 %files test-headed
120 %manifest capi-media-camera-test-headed.manifest
121 %license LICENSE.APLv2
122 %{_bindir}/camera_test_headed
123
124 %files test-headless
125 %manifest capi-media-camera-test-headless.manifest
126 %license LICENSE.APLv2
127 %{_bindir}/camera_test_headless
128
129 %if 0%{?gcov:1}
130 %files gcov
131 %{_datadir}/gcov/obj/*
132 %endif
133