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