12e78b0e70da24b6252ca4c01da23cf42b7c7f9a
[platform/core/api/wifi-mesh.git] / packaging / capi-network-wifi-mesh.spec
1 %define major 0
2 %define minor 1
3 %define patchlevel 2
4
5 Name:           capi-network-wifi-mesh
6 Version:        %{major}.%{minor}.%{patchlevel}
7 Release:        1
8 License:        Apache-2.0
9 Summary:        Wi-Fi Mesh Core API
10 Group:          System/Libraries
11 Source0:        %{name}-%{version}.tar.gz
12 Source1001:     %{name}.manifest
13 BuildRequires:  cmake
14 BuildRequires:  pkgconfig(dlog)
15 BuildRequires:  pkgconfig(gio-2.0)
16 BuildRequires:  pkgconfig(glib-2.0)
17 BuildRequires:  pkgconfig(capi-system-info)
18 Requires(post): /sbin/ldconfig
19 Requires(postun): /sbin/ldconfig
20
21 %description
22 Wi-Fi Mesh network Core API library
23
24 %package devel
25 Summary:  Wi-Fi Mesh Core API
26 Group:    Development/Libraries
27 Requires: %{name} = %{version}-%{release}
28
29 %description devel
30 Mesh Core API library (development library)
31
32 %prep
33 %setup -q
34 cp %{SOURCE1001} .
35
36 %build
37
38 %if 0%{?gcov:1}
39 export LDFLAGS+=" -lgcov"
40 %endif
41
42 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
43 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
44         -DLIB_INSTALL_DIR=%{_libdir} \
45         -DBIN_INSTALL_DIR=%{_bindir} \
46         -DINCLUDE_INSTALL_DIR=%{_includedir} \
47         -DLIB_PATH=%{_lib} \
48         -DFULLVER=%{version} \
49         -DMAJORVER=${MAJORVER} \
50         -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
51
52 make %{?jobs:-j%jobs}
53
54 %install
55 rm -rf %{buildroot}
56 %make_install
57
58 %post -p /sbin/ldconfig
59
60 %postun -p /sbin/ldconfig
61
62 %files
63 %manifest capi-network-wifi-mesh.manifest
64 %attr(644,-,-) %{_libdir}/libcapi-network-wifi-mesh.so.*
65 %license LICENSE
66 %attr(755,network_fw,network_fw) %{_bindir}/wifi-mesh-test
67
68 %files devel
69 %{_includedir}/network/*.h
70 %{_libdir}/pkgconfig/*.pc
71 %{_libdir}/libcapi-network-wifi-mesh.so