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