Generate debuginfo package instead of debug package
[platform/framework/native/image.git] / packaging / osp-image.spec
1 Name:       osp-image
2 Summary:    The Media Image library of OSP
3 Version:    1.2.1.0
4 Release:    1
5 Group:      TO_BE/FILLED_IN
6 License:    TO BE FILLED IN
7 Source0:    %{name}-%{version}.tar.gz
8 BuildRequires:  cmake
9 BuildRequires:  pkgconfig(libcurl)
10 BuildRequires:  pkgconfig(osp-appfw)
11 BuildRequires:  osp-appfw-internal-devel
12 BuildRequires:  pkgconfig(osp-image-core)
13 BuildRequires:  osp-image-core-internal-devel
14 BuildRequires:  pkgconfig(osp-uifw)
15 BuildRequires:  osp-uifw-internal-devel
16 BuildRequires:  pkgconfig(osp-net)
17 BuildRequires:  osp-net-internal-devel
18 BuildRequires:  pkgconfig(openssl)
19 BuildRequires:  pkgconfig(glib-2.0)
20 BuildRequires:  pkgconfig(libavcodec)
21 BuildRequires:  pkgconfig(libavformat)
22 BuildRequires:  pkgconfig(libavutil)
23 BuildRequires:  pkgconfig(libswscale)
24 BuildRequires:  pkgconfig(libwbxml2)
25
26 # runtime requires
27 Requires: osp-appfw
28 Requires: osp-image-core
29 Requires: osp-uifw
30 Requires: osp-net
31
32 Provides:   libosp-image.so.1
33
34 Requires(post): /sbin/ldconfig
35 Requires(postun): /sbin/ldconfig
36
37 %description
38 The Media Image library of OSP
39
40 %package devel
41 Summary:    The Media Image library of OSP (Development)
42 Group:      TO_BE/FILLED_IN
43 Requires:   %{name} = %{version}-%{release}
44
45 %description devel
46 The Media Image library of OSP (DEV)
47
48 %package internal-devel
49 Summary:    osp media image internel (Internal)
50 Group:      TO_BE/FILLED_IN
51 Requires:   %{name} = %{version}-%{release}
52
53 %description internal-devel
54 The Media Image library of OSP (Internal-DEV)
55
56 %prep
57 %setup -q
58
59 %build
60 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
61 %ifarch %{ix86}
62 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
63 %else
64 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
65 %endif
66
67 # Call make instruction with smp support
68 make %{?jobs:-j%jobs}
69
70 %install
71 rm -rf %{buildroot}
72 mkdir -p %{buildroot}/usr/share/license
73 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2.0  %{buildroot}/usr/share/license/%{name}
74
75 %make_install
76
77 %post -p /sbin/ldconfig
78
79 %postun -p /sbin/ldconfig
80
81 %files
82 %manifest osp-image.manifest
83 /usr/share/license/%{name}
84 %{_libdir}/osp/libosp-image.so*
85
86 %files devel
87 %{_includedir}/osp/*.h
88 %{_libdir}/pkgconfig/osp-image.pc
89
90 %files internal-devel
91 %{_includedir}/osp/media/*.h