Init Tizen 2.2.1
[framework/osp/vision.git] / packaging / osp-vision.spec
1 %define debug_package %{nil}
2 %define __strip /bin/true
3
4 Name:           osp-vision
5 Summary:        osp vision library
6 Version:        1.2.2.0
7 Release:        2
8 Group:          System/Libraries
9 License:        TO_BE/FILLED_IN
10 Source0:        %{name}-%{version}.tar.gz
11 BuildRequires:  cmake
12 BuildRequires:  pkgconfig(osp-appfw)
13 BuildRequires:  osp-appfw-internal-devel
14 BuildRequires:  pkgconfig(osp-uifw)
15 BuildRequires:  osp-uifw-internal-devel
16 BuildRequires:  pkgconfig(osp-media)
17 BuildRequires:  osp-media-internal-devel
18 BuildRequires:  pkgconfig(osp-image-core)
19 BuildRequires:  osp-image-core-internal-devel
20 BuildRequires:  pkgconfig(osp-image)
21 BuildRequires:  osp-image-internal-devel
22
23 Provides:       libarengine.so
24
25 # runtime requires
26 Requires: osp-appfw 
27 Requires: osp-uifw
28 Requires: osp-media
29 Requires: osp-image
30 Requires: osp-image-core
31
32 %description
33 osp vision library
34
35 %package devel
36 Summary:    osp vision library (Development)
37 Group:      TO_BE/FILLED_IN
38 Requires:   %{name} = %{version}-%{release}
39
40 %description devel
41 osp vision library (DEV)
42
43 %package internal-devel
44 Summary:    osp vision internal (Internal)
45 Group:      TO_BE/FILLED_IN
46 Requires:   %{name} = %{version}-%{release}
47
48 %description internal-devel
49 osp vision library (Internal-DEV)
50
51 %package debug
52 Summary:    osp vision library (Development)
53 Group:      TO_BE/FILLED_IN
54 Requires:   %{name} = %{version}-%{release}
55
56 %description debug
57 osp vision library (DEV)
58
59 %prep
60 %setup -q
61
62 %build
63 %if 0%{?tizen_build_binary_release_type_eng}
64 CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
65 %endif 
66 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
67 %ifarch %{ix86}
68 %if 0%{?simulator}
69 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86
70 %else
71 CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86
72 %endif
73 %else
74
75 %if 0%{?tizen_build_binary_release_type_eng}
76 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} -DARCH=arm
77 %else
78 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_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=arm
79 %endif
80
81
82 %endif
83
84
85 # Call make instruction with smp support
86 make %{?jobs:-j%jobs}
87
88 %install
89 rm -rf %{buildroot}
90 mkdir -p %{buildroot}/usr/share/license
91 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
92 cat %{_builddir}/%{name}-%{version}/LICENSE.Flora >> %{buildroot}/usr/share/license/%{name}
93
94 %make_install
95
96 %post -p /sbin/ldconfig
97
98 %postun -p /sbin/ldconfig
99
100 %files
101 %manifest osp-vision.manifest
102 /usr/share/license/%{name}
103 %{_libdir}/osp/*.so*
104
105 %files devel
106 %{_includedir}/osp/*.h
107 %{_libdir}/pkgconfig/osp-vision.pc
108
109 %files internal-devel
110 %{_includedir}/osp/vision/*
111
112 %files debug
113 %{_libdir}/osp/debug/*.so*