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