Fixed build error
[platform/core/api/zigbee.git] / packaging / capi-network-zigbee.spec
1 %define major 0
2 %define minor 1
3 %define patchlevel 1
4
5 Name:          capi-network-zigbee
6 Summary:       Network Zigbee Service in Tizen CAPI
7 Version:       %{major}.%{minor}.%{patchlevel}
8 Release:       0
9 Group:         Network & Connectivity/Other
10 License:       Apache-2.0
11 Source0:       %{name}-%{version}.tar.gz
12 Source1001:    %{name}.manifest
13 BuildRequires: cmake
14 BuildRequires: pkgconfig(glib-2.0)
15 BuildRequires: pkgconfig(dlog)
16 BuildRequires: pkgconfig(capi-base-common)
17 BuildRequires: pkgconfig(capi-system-info)
18
19 Requires(post): /sbin/ldconfig
20 Requires(postun): /sbin/ldconfig
21
22 %description
23 Zigbee service library
24 This package aims to support the Zigbee service in Tizen platform.
25
26 %package devel
27 Summary: Zigbee Library (Shared Library) (development)
28 Group: Network & Connectivity/Other
29 Requires: %{name} = %{version}-%{release}
30
31 %description devel
32 Zigbee Library (Shared Library) (Development)
33 This package aims to support the Zigbee developers.
34
35 %prep
36 %setup #-q
37 chmod g-w %_sourcedir/*
38 cp %{SOURCE1001} ./%{name}.manifest
39
40 %build
41 %if 0%{?gcov:1}
42 export LDFLAGS+=" -lgcov"
43 %endif
44
45 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
46 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
47         -DLIB_INSTALL_DIR=%{_libdir} \
48         -DBIN_INSTALL_DIR=%{_bindir} \
49         -DINCLUDE_INSTALL_DIR=%{_includedir} \
50         -DLIB_PATH=%{_lib} \
51         -DFULLVER=%{version} \
52         -DMAJORVER=${MAJORVER} \
53         -DZB_FEATURE_GLOBAL_RSP_SYNC=1 \
54         -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
55
56 %install
57 rm -rf %{buildroot}/BUILD/%{name}
58 %make_install
59
60 %post
61 /sbin/ldconfig
62
63 %postun
64 /sbin/ldconfig # re-inialize shared library db
65
66 %files
67 %manifest %{name}.manifest
68 %defattr(-,root,root,-)
69 %license LICENSE.APLv2
70 %attr(644,-,-) %{_libdir}/lib%{name}.so.*
71 %{_bindir}/test-zigbee
72
73 %files devel
74 %defattr(-,root,root,-)
75 %attr(644,-,-) %{_libdir}/lib%{name}.so
76 %{_libdir}/pkgconfig/%{name}.pc
77 %{_includedir}/network/*.h