fix gbs/obs build failure
[framework/osp/bluetooth.git] / packaging / osp-bluetooth.spec
1 %define __strip /bin/true
2
3 Name:           osp-bluetooth
4 Summary:        osp bluetooth library
5 Version:        1.2.1.0
6 Release:        2
7 Group:          System/Libraries
8 License:        TO_BE/FILLED_IN
9 Source0:        %{name}-%{version}.tar.gz
10 BuildRequires:  cmake
11 BuildRequires:  pkgconfig(chromium)
12 BuildRequires:  pkgconfig(glib-2.0)
13 BuildRequires:  pkgconfig(capi-system-info)
14 BuildRequires:  pkgconfig(capi-system-device)
15 BuildRequires:  pkgconfig(capi-network-bluetooth)
16 BuildRequires:  pkgconfig(osp-appfw)
17 BuildRequires:  osp-appfw-internal-devel
18 BuildRequires:  pkgconfig(osp-net)
19 BuildRequires:  osp-net-internal-devel
20
21 # runtime requires
22 Requires: osp-appfw 
23 Requires: osp-net 
24
25 %description
26 osp bluetooth library
27
28 %package devel
29 Summary:    osp bluetooth library (Development)
30 Group:      TO_BE/FILLED_IN
31 Requires:   %{name} = %{version}-%{release}
32
33 %description devel
34 osp bluetooth library (DEV)
35
36 %package internal-devel
37 Summary:    osp bluetooth library (Internal)
38 Group:      TO_BE/FILLED_IN
39 Requires:   %{name} = %{version}-%{release}
40
41 %description internal-devel
42 osp bluetooth library (Internal-DEV)
43
44 %package debug
45 Summary:    osp bluetooth library (Development)
46 Group:      TO_BE/FILLED_IN
47 Requires:   %{name} = %{version}-%{release}
48
49 %description debug
50 osp bluetooth library (DEV)
51
52 %prep
53 %setup -q
54
55 %build 
56 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
57 %ifarch %{ix86}
58 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
59 %else
60 CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
61 %endif
62
63 # Call make instruction with smp support
64 make %{?jobs:-j%jobs}
65
66 %install
67 rm -rf %{buildroot}
68 mkdir -p %{buildroot}/usr/share/license
69 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2.0  %{buildroot}/usr/share/license/%{name}
70
71 %make_install
72
73 %post -p /sbin/ldconfig
74
75 %postun -p /sbin/ldconfig
76
77 %files
78 %manifest osp-bluetooth.manifest
79 /usr/share/license/%{name}
80 %{_libdir}/osp/*.so*
81
82 %files devel
83 %{_includedir}/osp/*.h
84 %{_libdir}/pkgconfig/osp-bluetooth.pc
85
86 %files internal-devel
87 %{_includedir}/osp/net/*.h
88
89 %files debug
90 %{_libdir}/osp/debug/*.so*