Add to limit 'probesize' for getting stream information.
[platform/core/multimedia/libmm-fileinfo.git] / packaging / libmm-fileinfo.spec
1 Name:       libmm-fileinfo
2 Summary:    Media Fileinfo
3 Version:    1.0.5
4 Release:    0
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 %if "%{tizen_profile_name}" == "tv"
51 export CFLAGS+=" -DUSE_CODEC_VPX"
52 %endif
53 export CFLAGS+=" -Wextra -Wno-array-bounds"
54 export CFLAGS+=" -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow"
55 export CFLAGS+=" -Wwrite-strings -Wswitch-default -Werror"
56 export CFLAGS+=" -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -fgnu89-inline -fstack-protector-strong -D_FORTIFY_SOURCE=2"
57 ./autogen.sh
58
59 %reconfigure \
60 CFLAGS="${CFLAGS} -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" " LDFLAGS="${LDFLAGS}" \
61 ./configure --disable-testmode --disable-dump --enable-dyn --disable-iommap --prefix=/usr \
62 %if 0%{?gtests:1}
63         --enable-tests \
64 %endif
65         --disable-gtk
66
67 %__make
68
69 %install
70 %make_install
71
72 mkdir -p %{buildroot}%{_sysconfdir}/multimedia
73 cp -rf %{_builddir}/%{name}-%{version}/mm_file_config.ini %{buildroot}%{_sysconfdir}/multimedia/mm_file_config.ini
74 %if 0%{?gtests:1}
75 mkdir -p %{buildroot}%{_bindir}
76 cp -rf %{_builddir}/%{name}-%{version}/unittest/*.mp4 %{buildroot}%{_bindir}/
77 cp -rf %{_builddir}/%{name}-%{version}/unittest/*.mp3 %{buildroot}%{_bindir}/
78 %endif
79
80 %post -p /sbin/ldconfig
81
82 %postun -p /sbin/ldconfig
83
84 %files
85 %manifest %{name}.manifest
86 %{_libdir}/libmmffile.so.*
87 %{_libdir}/libmmfile_formats.so.*
88 %{_libdir}/libmmfile_utils.so.*
89 %{_libdir}/libmmffile.so
90 %{_libdir}/libmmfile_formats.so
91 %{_libdir}/libmmfile_utils.so
92 %{_sysconfdir}/multimedia/mm_file_config.ini
93 %if 0%{?gtests:1}
94 %{_bindir}/gtest*
95 %{_bindir}/libmm-fileinfo-unittest*
96 %endif
97 %license LICENSE.APLv2.0
98
99 %files tool
100 %manifest %{name}.manifest
101 %{_bindir}/mm_file_test
102
103 %files devel
104 %manifest %{name}.manifest
105 %{_includedir}/mmf/mm_file.h
106 %{_includedir}/mmf/mm_file_error.h
107 %{_libdir}/pkgconfig/mm-fileinfo.pc