Fix coverity issue
[platform/core/multimedia/libmm-fileinfo.git] / packaging / libmm-fileinfo.spec
1 Name:       libmm-fileinfo
2 Summary:    Media Fileinfo
3 Version:    0.6.84
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001:    libmm-fileinfo.manifest
9 Requires(post): /sbin/ldconfig
10 Requires(postun): /sbin/ldconfig
11
12 BuildRequires: pkgconfig(mm-common)
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(libswscale)
15 BuildRequires: pkgconfig(glib-2.0)
16 BuildRequires: pkgconfig(iniparser)
17 BuildRequires: pkgconfig(libavcodec)
18 BuildRequires: pkgconfig(libavutil)
19 BuildRequires: pkgconfig(libavformat)
20 BuildRequires: pkgconfig(icu-i18n)
21 BuildRequires: pkgconfig(vconf)
22 %if 0%{?gtests:1}
23 BuildRequires:  pkgconfig(gmock)
24 %endif
25
26 %description
27 Multimedia Framework FileInfo Library
28
29 %package tool
30 Summary:    Media Fileinfo Tools
31 Group:      Development/Tools
32 Requires:   %{name} = %{version}-%{release}
33
34 %description tool
35 Multimedia Framework FileInfo Tools
36
37 %package devel
38 Summary:    Media Fileinfo
39 Group:      Development/Libraries
40 Requires:   %{name} = %{version}-%{release}
41
42 %description devel
43 Multimedia Framework FileInfo Library (development files)
44
45 %prep
46 %setup -q
47 cp %{SOURCE1001} .
48
49 %build
50 export CFLAGS+=" -Wextra -Wno-array-bounds"
51 export CFLAGS+=" -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow"
52 export CFLAGS+=" -Wwrite-strings -Wswitch-default -Werror"
53 export CFLAGS+=" -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -fgnu89-inline -fstack-protector-strong -D_FORTIFY_SOURCE=2"
54 ./autogen.sh
55
56 %reconfigure \
57 CFLAGS="${CFLAGS} -D_MM_PROJECT_FLOATER -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" " LDFLAGS="${LDFLAGS}" \
58 ./configure --disable-testmode --disable-dump --enable-dyn --disable-iommap --prefix=/usr \
59 %if 0%{?gtests:1}
60         --enable-tests \
61 %endif
62         --disable-gtk
63
64 %__make
65
66 %install
67 %make_install
68
69 mkdir -p %{buildroot}%{_sysconfdir}/multimedia
70 cp -rf %{_builddir}/%{name}-%{version}/mm_file_config.ini %{buildroot}%{_sysconfdir}/multimedia/mm_file_config.ini
71 %if 0%{?gtests:1}
72 mkdir -p %{buildroot}%{_bindir}
73 cp -rf %{_builddir}/%{name}-%{version}/unittest/*.mp4 %{buildroot}%{_bindir}/
74 cp -rf %{_builddir}/%{name}-%{version}/unittest/*.mp3 %{buildroot}%{_bindir}/
75 %endif
76
77 %post -p /sbin/ldconfig
78
79 %postun -p /sbin/ldconfig
80
81 %files
82 %manifest %{name}.manifest
83 %{_libdir}/libmmffile.so.*
84 %{_libdir}/libmmfile_codecs.so.*
85 %{_libdir}/libmmfile_formats.so.*
86 %{_libdir}/libmmfile_utils.so.*
87 %{_libdir}/libmmffile.so
88 %{_libdir}/libmmfile_codecs.so
89 %{_libdir}/libmmfile_formats.so
90 %{_libdir}/libmmfile_utils.so
91 %{_sysconfdir}/multimedia/mm_file_config.ini
92 %if 0%{?gtests:1}
93 %{_bindir}/gtest*
94 %{_bindir}/libmm-fileinfo-unittest*
95 %endif
96 %license LICENSE.APLv2.0
97
98 %files tool
99 %manifest %{name}.manifest
100 %{_bindir}/mm_file_test
101
102 %files devel
103 %manifest %{name}.manifest
104 %{_includedir}/mmf/mm_file.h
105 %{_includedir}/mmf/mm_file_error.h
106 %{_libdir}/pkgconfig/mm-fileinfo.pc