summaryrefslogtreecommitdiff
path: root/packaging/aitt.spec
blob: 50aaa78c4888893aaed37b5837361be263716a06 (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
Name: aitt
Version: 0.0.1
Release: 0
Summary: AI Telemetry Transport based on MQTT

Group: Machine Learning / ML Framework
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1001: %{name}.manifest

%{!?stdoutlog: %global stdoutlog 0}
%{!?test: %global test 1}
%{!?gcov: %global gcov 0}

BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(flatbuffers)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libmosquitto)
BuildRequires: pkgconfig(gmock_main)
BuildRequires: pkgconfig(capi-media-tool)
BuildRequires: pkgconfig(capi-media-sound-manager)
BuildRequires: pkgconfig(bundle)
BuildRequires: elementary-tizen
BuildRequires: pkgconfig(capi-media-webrtc)
BuildRequires: pkgconfig(capi-media-camera)
BuildRequires: pkgconfig(json-glib-1.0)
%if 0%{gcov}
BuildRequires: lcov
%endif

%description
AITT is a Framework which transfers data of AI service.
It makes distributed AI Inference possible.

%package plugins
Summary: Plugin Libraries for AITT P2P transport
Group: Machine Learning / ML Framework
Requires: %{name} = %{version}

%description plugins
The %{name}-plugins package contains basic plugin libraries for AITT P2P transport.

%package devel
Summary: AITT development package
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files for
developing programs that use %{name}.

%prep
%setup -q
cp %{SOURCE1001} .

%build
%cmake . \
    -DLOG_STDOUT:BOOL=%{stdoutlog} \
    -DPLATFORM="tizen" \
    -DVERSIONING:BOOL=OFF \
    -DWITH_WEBRTC:BOOL=ON \
    -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
    -DCMAKE_VERBOSE_MAKEFILE=OFF \
    -DBUILD_TESTING:BOOL=%{test} \
    -DCOVERAGE_TEST:BOOL=%{gcov}

%__make %{?_smp_mflags}

%install
%make_install

%check
ctest --output-on-failure --timeout 30 || true

%if 0%{test} && 0%{gcov}
# Extract coverage information
lcov -c --ignore-errors graph --no-external -b . -d . -o %{name}_gcov.info
genhtml %{name}_gcov.info -o out --legend --show-details
%endif

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%manifest %{name}.manifest
%if 0%{test}
%{_bindir}/*
%endif
%{_libdir}/lib%{name}*.so*
%license LICENSE.APLv2

%files plugins
%manifest %{name}.manifest
%{_libdir}/lib%{name}-transport*.so*
%license LICENSE.APLv2

%files devel
%{_includedir}/*
%{_libdir}/pkgconfig/*.pc

%clean
rm -rf %{buildroot}