8b37e6234f344a5ccee96dc859b139dd1e35ddfd
[platform/core/multimedia/inference-engine-interface.git] / packaging / inference-engine-interface.spec
1 Name:        inference-engine-interface
2 Summary:     Interface of inference engines
3 Version:     0.4.0
4 Release:     1
5 Group:       Multimedia/Framework
6 License:     Apache-2.0
7 Source0:     %{name}-%{version}.tar.gz
8 BuildRequires: cmake
9 BuildRequires: pkgconfig(dlog)
10 BuildRequires: pkgconfig(libtzplatform-config)
11 BuildRequires: pkgconfig(python)
12 BuildRequires: pkgconfig(iniparser)
13 BuildRequires: pkgconfig(glib-2.0)
14 BuildRequires: pkgconfig(json-glib-1.0)
15 BuildRequires: gtest-devel
16
17 %description
18 Interface of inference engines
19
20 %package devel
21 Summary:    Interface of inference engines
22 Group:      Multimedia/Framework
23 Requires:   %{name} = %{version}-%{release}
24
25 %description devel
26 Interface of inference engines (Dev)
27
28
29 %package common
30 Summary:    Common interface of inference engines
31 Group:      Multimedia/Framework
32
33 %description common
34 Common interface of inference engines
35
36 %package common-devel
37 Summary:    Common interface of inference engines
38 Group:      Multimedia/Framework
39 Requires:   inference-engine-interface-common
40
41 %description common-devel
42 Common interface of inference engines (Dev)
43
44 %prep
45 %setup -q
46
47 %build
48 %if 0%{?sec_build_binary_debug_enable}
49 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
50 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
51 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
52 %endif
53
54 export CFLAGS+=" -DPATH_LIBDIR=\\\"%{_libdir}\\\" -DSYSCONFDIR=\\\"%{_hal_sysconfdir}\\\""
55 export CXXFLAGS+=" -DPATH_LIBDIR=\\\"%{_libdir}\\\" -DSYSCONFDIR=\\\"%{_hal_sysconfdir}\\\""
56
57 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
58 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DTZ_SYS_BIN=%TZ_SYS_BIN \
59
60 make %{?jobs:-j%jobs}
61
62 %install
63 rm -rf %{buildroot}
64
65 mkdir -p %{buildroot}/usr/bin/
66 mkdir -p %{buildroot}/opt/usr/images/
67 %make_install
68
69 install -m 755 test/bin/inference_engine_profiler %{buildroot}%{_bindir}
70 install -m 755 test/bin/inference_engine_tc %{buildroot}%{_bindir}
71 install -m 755 start_profiler.sh %{buildroot}%{_bindir}
72 install -m 666 test/res/*.bin %{buildroot}/opt/usr/images
73 install -m 755 tools/bin/inference_engine_cltuner %{buildroot}%{_bindir}
74
75 %post -p /sbin/ldconfig
76 %postun -p /sbin/ldconfig
77
78 %files common
79 %manifest inference-engine-interface-common.manifest
80 %license LICENSE.APLv2
81 %{_libdir}/libinference-engine-interface-common.so.*
82
83 %files common-devel
84 %{_includedir}/media/*.h
85 %{_libdir}/pkgconfig/*common.pc
86 %{_libdir}/lib*-common.so
87 %{_bindir}/inference_engine_profiler
88 %{_bindir}/inference_engine_tc
89 %{_bindir}/start_profiler.sh
90 %{_bindir}/inference_engine_cltuner
91 /opt/usr/images/*.bin