remove C-Mock source
[platform/core/ml/aitt.git] / packaging / aitt.spec
1 Name: aitt
2 Version: 0.0.1
3 Release: 0
4 Summary: AI Telemetry Transport based on MQTT
5
6 Group: Machine Learning / ML Framework
7 License: Apache-2.0
8 Source0: %{name}-%{version}.tar.gz
9 Source1001: %{name}.manifest
10
11 %{?!stdoutlog: %global stdoutlog 0}
12 %{?!test: %global test 0}
13 %{?!gcov: %global gcov 0}
14 %{?!use_glib: %global use_glib 1}
15
16 BuildRequires: cmake
17 BuildRequires: pkgconfig(bundle)
18 BuildRequires: pkgconfig(dlog)
19 BuildRequires: pkgconfig(flatbuffers)
20 BuildRequires: pkgconfig(libmosquitto)
21 BuildRequires: pkgconfig(openssl1.1)
22 %if %{use_glib}
23 BuildRequires: pkgconfig(capi-media-player)
24 BuildRequires: pkgconfig(capi-media-image-util)
25 BuildRequires: pkgconfig(capi-media-sound-manager)
26 BuildRequires: pkgconfig(capi-media-tool)
27 BuildRequires: pkgconfig(capi-media-webrtc)
28 BuildRequires: pkgconfig(gstreamer-video-1.0)
29 BuildRequires: pkgconfig(glib-2.0)
30 BuildRequires: pkgconfig(json-glib-1.0)
31 %endif
32 %if %{test}
33 BuildRequires: pkgconfig(gmock_main)
34 BuildRequires: pkgconfig(c-mock)
35 %endif
36 %if %{gcov}
37 BuildRequires: lcov
38 %endif
39
40 %description
41 AITT is a Framework which transfers data of AI service.
42 It makes distributed AI Inference possible.
43
44 %package plugins
45 Summary: Plugin Libraries for AITT P2P transport
46 Group: Machine Learning / ML Framework
47 Requires: %{name} = %{version}
48
49 %description plugins
50 The %{name}-plugins package contains basic plugin libraries for AITT P2P transport.
51
52 %if 0%{test}
53 %package unittests
54 Summary: Test Programs for %{name}
55 Group: System/Testing
56
57 %description unittests
58 The %{name}-unittests package contains programs for checking quality the %{name}.
59 %endif
60
61 %package devel
62 Summary: AITT development package
63 Group: Development/Libraries
64 Requires: %{name} = %{version}-%{release}
65
66 %description devel
67 The %{name}-devel package contains libraries and header files for
68 developing programs that use %{name}.
69
70 %prep
71 %setup -q
72 cp %{SOURCE1001} .
73
74 %build
75 %cmake . \
76     -DLOG_STDOUT:BOOL=%{stdoutlog} \
77     -DPLATFORM="tizen" \
78     -DVERSIONING:BOOL=OFF \
79     -DWITH_WEBRTC:BOOL=ON \
80     -DWITH_RTSP:BOOL=ON \
81     -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
82     -DCMAKE_VERBOSE_MAKEFILE=OFF \
83     -DBUILD_TESTING:BOOL=%{test} \
84     -DCOVERAGE_TEST:BOOL=%{gcov} \
85     -DUSE_GLIB=%{use_glib}
86
87 %__make %{?_smp_mflags}
88
89 %install
90 %make_install
91
92 %check
93 ctest --output-on-failure --timeout 30 || true
94
95 %if 0%{test} && 0%{gcov}
96 # Extract coverage information
97 lcov -c --ignore-errors graph --no-external -b . -d . -o %{name}_gcov.info
98 genhtml %{name}_gcov.info -o out --legend --show-details
99 %endif
100
101 %post -p /sbin/ldconfig
102
103 %postun -p /sbin/ldconfig
104
105 %files
106 %license LICENSE.APLv2
107 %manifest %{name}.manifest
108 %{_libdir}/lib%{name}*.so*
109 %{_bindir}/%{name}_discovery_viewer
110
111 %files plugins
112 %license LICENSE.APLv2
113 %manifest %{name}.manifest
114 %{_libdir}/lib%{name}-*.so*
115
116 %if 0%{test}
117 %files unittests
118 %license LICENSE.APLv2
119 %manifest %{name}.manifest
120 %{_bindir}/*_ut*
121 %{_bindir}/*_test
122 %endif
123
124 %files devel
125 %{_includedir}/*
126 %{_libdir}/pkgconfig/*.pc
127
128 %clean
129 rm -rf %{buildroot}