fix gbs/obs build failure
[framework/osp/nfc.git] / packaging / osp-nfc.spec
1 %define __strip /bin/true
2
3 Name:           osp-nfc
4 Summary:        osp nfc 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-nfc)
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 nfc library
27
28 %package devel
29 Summary:    osp nfc library (Development)
30 Group:      TO_BE/FILLED_IN
31 Requires:   %{name} = %{version}-%{release}
32
33 %description devel
34 osp nfc library (DEV)
35
36 %package internal-devel
37 Summary:    osp nfc library (Internal)
38 Group:      TO_BE/FILLED_IN
39 Requires:   %{name} = %{version}-%{release}
40
41 %description internal-devel
42 osp nfc library (Internal-DEV)
43
44 %package debug
45 Summary:    osp nfc library (Development)
46 Group:      TO_BE/FILLED_IN
47 Requires:   %{name} = %{version}-%{release}
48
49 %description debug
50 osp nfc 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.Flora  %{buildroot}/usr/share/license/%{name}
70 cat %{_builddir}/%{name}-%{version}/LICENSE.APLv2.0 >> %{buildroot}/usr/share/license/%{name}
71
72 %make_install
73
74 %post -p /sbin/ldconfig
75
76 %postun -p /sbin/ldconfig
77
78 %files
79 %manifest osp-nfc.manifest
80 /usr/share/license/%{name}
81 %{_libdir}/osp/*.so*
82
83 %files devel
84 %{_includedir}/osp/*.h
85 %{_libdir}/pkgconfig/osp-nfc.pc
86
87 %files internal-devel
88 %{_includedir}/osp/net/*.h
89
90 %files debug
91 %{_libdir}/osp/debug/*.so*