increase 'probesize' to 50000
[platform/core/multimedia/libmm-fileinfo.git] / packaging / libmm-fileinfo.spec
old mode 100755 (executable)
new mode 100644 (file)
index 8fb7551..7f383da
@@ -1,6 +1,6 @@
 Name:      libmm-fileinfo
 Summary:    Media Fileinfo
-Version:    0.6.56
+Version:    1.0.7
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
@@ -13,15 +13,27 @@ BuildRequires: pkgconfig(mm-common)
 BuildRequires: pkgconfig(dlog)
 BuildRequires: pkgconfig(libswscale)
 BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(iniparser)
 BuildRequires: pkgconfig(libavcodec)
 BuildRequires: pkgconfig(libavutil)
 BuildRequires: pkgconfig(libavformat)
 BuildRequires: pkgconfig(icu-i18n)
 BuildRequires: pkgconfig(vconf)
+%if 0%{?gtests:1}
+BuildRequires:  pkgconfig(gmock)
+%endif
 
 %description
 Multimedia Framework FileInfo Library
 
+%package tool
+Summary:    Media Fileinfo Tools
+Group:      Development/Tools
+Requires:   %{name} = %{version}-%{release}
+
+%description tool
+Multimedia Framework FileInfo Tools
+
 %package devel
 Summary:    Media Fileinfo
 Group:      Development/Libraries
@@ -35,37 +47,59 @@ Multimedia Framework FileInfo Library (development files)
 cp %{SOURCE1001} .
 
 %build
+%if "%{tizen_profile_name}" == "tv"
+export CFLAGS+=" -DUSE_CODEC_VPX"
+%endif
 export CFLAGS+=" -Wextra -Wno-array-bounds"
 export CFLAGS+=" -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow"
 export CFLAGS+=" -Wwrite-strings -Wswitch-default -Werror"
-export CFLAGS+=" -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -fgnu89-inline"
+export CFLAGS+=" -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -fgnu89-inline -fstack-protector-strong -D_FORTIFY_SOURCE=2"
 ./autogen.sh
 
 %reconfigure \
-CFLAGS="${CFLAGS} -D_MM_PROJECT_FLOATER -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" " LDFLAGS="${LDFLAGS}" ./configure --disable-testmode --disable-dump --enable-dyn --disable-iommap --prefix=/usr --disable-gtk
+CFLAGS="${CFLAGS} -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" " LDFLAGS="${LDFLAGS}" \
+./configure --disable-testmode --disable-dump --enable-dyn --disable-iommap --prefix=/usr \
+%if 0%{?gtests:1}
+       --enable-tests \
+%endif
+       --disable-gtk
 
 %__make
 
 %install
 %make_install
 
+mkdir -p %{buildroot}%{_sysconfdir}/multimedia
+cp -rf %{_builddir}/%{name}-%{version}/mm_file_config.ini %{buildroot}%{_sysconfdir}/multimedia/mm_file_config.ini
+%if 0%{?gtests:1}
+mkdir -p %{buildroot}%{_bindir}
+cp -rf %{_builddir}/%{name}-%{version}/unittest/*.mp4 %{buildroot}%{_bindir}/
+cp -rf %{_builddir}/%{name}-%{version}/unittest/*.mp3 %{buildroot}%{_bindir}/
+%endif
+
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
 %files
 %manifest %{name}.manifest
-%{_bindir}/mm_file_test
 %{_libdir}/libmmffile.so.*
-%{_libdir}/libmmfile_codecs.so.*
 %{_libdir}/libmmfile_formats.so.*
 %{_libdir}/libmmfile_utils.so.*
 %{_libdir}/libmmffile.so
-%{_libdir}/libmmfile_codecs.so
 %{_libdir}/libmmfile_formats.so
 %{_libdir}/libmmfile_utils.so
+%{_sysconfdir}/multimedia/mm_file_config.ini
+%if 0%{?gtests:1}
+%{_bindir}/gtest*
+%{_bindir}/libmm-fileinfo-unittest*
+%endif
 %license LICENSE.APLv2.0
 
+%files tool
+%manifest %{name}.manifest
+%{_bindir}/mm_file_test
+
 %files devel
 %manifest %{name}.manifest
 %{_includedir}/mmf/mm_file.h