Fix svace, coverity, lint
[platform/core/multimedia/vision-source-v4l2.git] / packaging / vision-source-v4l2.spec
1 %define enable_libv4l2 0
2 %define build_test 0
3
4 Name:        vision-source-v4l2
5 Summary:     vision source-v4l2
6 Version:     1.0.1
7 Release:     0
8 Group:       Multimedia/Framework
9 License:     Apache-2.0
10 Source0:     %{name}-%{version}.tar.gz
11
12 BuildRequires: cmake
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(libtbm)
15 BuildRequires: pkgconfig(iniparser)
16 BuildRequires: pkgconfig(capi-media-tool)
17 %if 0%{?enable_libv4l2}
18 BuildRequires:  pkgconfig(libv4l2)
19 %endif
20 %if 0%{?build_test}
21 BuildRequires: gtest-devel
22 BuildRequires: vision-source-devel
23 %else
24 BuildRequires: pkgconfig(vision-source)
25 %endif # build_test
26
27 %description
28 Vision source v4l2
29
30 %prep
31 %setup -q
32
33 %build
34 %if 0%{?sec_build_binary_debug_enable}
35 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
36 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
37 %endif
38
39 %cmake \
40 %if 0%{?enable_libv4l2}
41         -DHAVE_LIBV4L2=ON \
42 %endif
43 %if 0%{?build_test}
44         -DBUILD_TEST=ON \
45 %endif # build_test
46 .
47
48 make %{?jobs:-j%jobs}
49
50 %install
51
52 %make_install
53
54 %post -p /sbin/ldconfig
55 %postun -p /sbin/ldconfig
56
57 %files
58 %{_libdir}/*.so
59 %if 0%{?build_test}
60 %{_bindir}/*
61 %endif # build_test
62 %license LICENSE.APLv2