]> git.pld-linux.org Git - packages/libextractor.git/blobdiff - libextractor.spec
- fix build with ffmpeg2
[packages/libextractor.git] / libextractor.spec
index 3dd3eacf40c7b7af273ef3f2938c9c281285fda2..79ee912b4c99a2789c7db9a620d501845d3814fa 100644 (file)
@@ -1,22 +1,61 @@
+# TODO: zzuf (for tests)
+#
+# Conditional build:
+%bcond_without static_libs     # static library
+%bcond_with    tests           # perform tests [some problems with rpm extractor?]
+%bcond_without gstreamer       # GStreamer plugin
+%bcond_without mp4v2           # MP4v2 plugin
+%bcond_without tidy            # HTML plugin (based on tidy library)
+#
 Summary:       Meta-data extraction library
 Summary:       Meta-data extraction library
-Summary(pl):   Biblioteka do ekstrakcji metadanych
+Summary(pl.UTF-8):     Biblioteka do ekstrakcji metadanych
 Name:          libextractor
 Name:          libextractor
-Version:       0.3.4
+Version:       1.1
 Release:       1
 Release:       1
-License:       GPL
+License:       GPL v3+
 Group:         Libraries
 Group:         Libraries
-# strange, .tar.gz is ~500kB smaller than .tar.bz2
-Source0:       http://www.ovmj.org/libextractor/download/%{name}-%{version}.tar.gz
-# Source0-md5: 49de0466f5d25d6cbe8f76502c50ee87
-URL:           http://www.ovmj.org/libextractor/
-BuildRequires: autoconf >= 2.57
-BuildRequires: automake
-BuildRequires: gettext-devel >= 0.14
-BuildRequires: libltdl-devel
+Source0:       http://ftp.gnu.org/gnu/libextractor/%{name}-%{version}.tar.gz
+# Source0-md5: 4a1496af12bf545582c0e9444429220d
+Patch0:                %{name}-info.patch
+Patch1:                %{name}-rpm5.patch
+Patch2:                %{name}-ffmpeg2.patch
+URL:           http://gnunet.org/libextractor/
+BuildRequires: autoconf >= 2.61
+BuildRequires: automake >= 1:1.11
+BuildRequires: bzip2-devel
+BuildRequires: exiv2-devel
+BuildRequires: gettext-devel >= 0.16.1
+# libavformat libavcodec libavutil libswscale
+BuildRequires: ffmpeg-devel
+BuildRequires: flac-devel
+BuildRequires: giflib-devel
+BuildRequires: glib2-devel >= 2.0.0
+%if %{with gstreamer}
+BuildRequires: gstreamer-devel >= 0.11.93
+BuildRequires: gstreamer-plugins-base >= 0.11.93
+%endif
+BuildRequires: gtk+3-devel >= 3.0.0
+BuildRequires: libarchive-devel
+BuildRequires: libgsf-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libltdl-devel >= 2:2
+BuildRequires: libmagic-devel
+BuildRequires: libmpeg2-devel
+BuildRequires: libsmf-devel
 BuildRequires: libstdc++-devel
 BuildRequires: libstdc++-devel
-BuildRequires: libtool >= 2:1.5
+BuildRequires: libtiff-devel
+BuildRequires: libtool >= 2:2
 BuildRequires: libvorbis-devel
 BuildRequires: libvorbis-devel
+%{?with_mp4v2:BuildRequires:   mp4v2-devel >= 2.0.0}
+BuildRequires: pkgconfig >= 1:0.7
+# rpm5 patch supports rpm5.org's rpm 4.5.x and 5.x
+BuildRequires: rpm-devel >= 4.5
+BuildRequires: sed >= 4.0
+BuildRequires: texinfo
+%{?with_tidy:BuildRequires:    tidy-devel}
 BuildRequires: zlib-devel
 BuildRequires: zlib-devel
+Obsoletes:     libextractor-printable
+Obsoletes:     libextractor-thumbnail-qt
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -25,7 +64,7 @@ libextractor uses a plugin-mechanism that makes it easy to add support
 for more file formats, allowing anybody to add new extractors quickly.
 
 libextractor currently features meta-data extractors for HTML, JPEG,
 for more file formats, allowing anybody to add new extractors quickly.
 
 libextractor currently features meta-data extractors for HTML, JPEG,
-OGG, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real Audio and Video,
+Ogg, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real Audio and Video,
 PostScript and PDF documents. It also detects many more MIME-types in
 a fashion similar to the well-known "file" tool.
 
 PostScript and PDF documents. It also detects many more MIME-types in
 a fashion similar to the well-known "file" tool.
 
@@ -38,90 +77,123 @@ that can be used to invoke libextractor from the command line.
 "extract" can be used similar to "file", but while "file" currently
 supports a wider range of file types, "extract" should be able to
 provide more precise and more detailed information for the supported
 "extract" can be used similar to "file", but while "file" currently
 supports a wider range of file types, "extract" should be able to
 provide more precise and more detailed information for the supported
-types of documents (HTML, JPEG, OGG, MP3, PNG, GIF, RPM, RA, RM, PS,
+types of documents (HTML, JPEG, Ogg, MP3, PNG, GIF, RPM, RA, RM, PS,
 PDF, ZIP, QT, ASF).
 
 PDF, ZIP, QT, ASF).
 
-%description -l pl
-libextractor to prosta biblioteka s³u¿±ca do ekstrakcji metadanych.
-libextractor u¿ywa mechanizmu "wtyczek", dziêki czemu ³atwo jest dodaæ
-wsparcie dla nowych formatów plików.
+%description -l pl.UTF-8
+libextractor to prosta biblioteka służąca do ekstrakcji metadanych.
+libextractor używa mechanizmu "wtyczek", dzięki czemu łatwo jest dodać
+wsparcie dla nowych formatów plików.
 
 
-libextractor obecnie pozwala na pozyskanie metadanych z plików w
-formatach HTML, JPEG, OGG, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real
-Audio i Video, PostScript oraz PDF. Ponadto rozpoznaje du¿o wiêcej
-typów MIME w sposób podobny do dobrze znanego narzêdzia "file".
+libextractor obecnie pozwala na pozyskanie metadanych z plików w
+formatach HTML, JPEG, Ogg, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real
+Audio i Video, PostScript oraz PDF. Ponadto rozpoznaje dużo więcej
+typów MIME w sposób podobny do dobrze znanego narzędzia "file".
 
 
-Ka¿da informacja pobrana z pliku nale¿y do jednej z oko³o 40
-kategorii (np. tytu³, autor, opis, typ MIME).
+Każda informacja pobrana z pliku należy do jednej z około 40
+kategorii (np. tytuł, autor, opis, typ MIME).
 
 
-Ta paczka zawiera te¿ narzêdzie "extract", które pozwala skorzystaæ z
-us³ug libextractor bezpo¶rednio z linii poleceñ. "extract" mo¿e byæ
-u¿ywane w podobny sposób, co "file". "file" zna wiêcej typów danych,
-"extract" natomiast dostarcza bardziej precyzyjnych i szczegó³owych
-informacji na temat obs³ugiwanych formatów (HTML, JPEG, OGG, MP3, PNG,
+Ta paczka zawiera też narzędzie "extract", które pozwala skorzystać z
+usług libextractor bezpośrednio z linii poleceń. "extract" może być
+używane w podobny sposób, co "file". "file" zna więcej typów danych,
+"extract" natomiast dostarcza bardziej precyzyjnych i szczegółowych
+informacji na temat obsługiwanych formatów (HTML, JPEG, Ogg, MP3, PNG,
 GIF, RPM, RA, RM, PS, PDF, ZIP, QT, ASF).
 
 GIF, RPM, RA, RM, PS, PDF, ZIP, QT, ASF).
 
-%package printable
-Summary:       Printable text support plugins for libextractor
-Summary(pl):   Wtyczki obs³uguj±ce tekst dla biblioteki libextractor
+%package thumbnail-ffmpeg
+Summary:       FFmpeg Thumbnail plugin for libextractor
+Summary(pl.UTF-8):     Wtyczka obsługująca miniaturki obrazów poprzez FFmpeg dla biblioteki libextractor
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
 
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
 
-%description printable
-libextractor plugins that support printable text in few languages.
+%description thumbnail-ffmpeg
+libextractor plugin that supports thumbnails through FFmpeg.
 
 
-%description printable -l pl
-Wtyczki biblioteki libextractor obs³uguj±ce tekst w kilku jêzykach.
+%description thumbnail-ffmpeg -l pl.UTF-8
+Wtyczka biblioteki libextractor obsługująca miniaturki obrazów poprzez
+FFmpeg.
+
+%package thumbnail-gtk
+Summary:       GTK+ Thumbnail plugin for libextractor
+Summary(pl.UTF-8):     Wtyczka obsługująca miniaturki obrazów poprzez GTK+ dla biblioteki libextractor
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+Obsoletes:     libextractor-thumbnail < 1.0.1
+
+%description thumbnail-gtk
+libextractor plugin that supports thumbnails through GTK+.
+
+%description thumbnail-gtk -l pl.UTF-8
+Wtyczka biblioteki libextractor obsługująca miniaturki obrazów poprzez
+GTK+.
 
 %package devel
 Summary:       Development files for libextractor
 
 %package devel
 Summary:       Development files for libextractor
-Summary(pl):   Pliki nag³ówkowe libextractor
+Summary(pl.UTF-8):     Pliki nagłówkowe libextractor
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+Requires:      bzip2-devel
 Requires:      libltdl-devel
 Requires:      libltdl-devel
+Requires:      zlib-devel
 
 %description devel
 This package contains files to develop with libextractor, that is
 either to create plugins or to compile applications with libextractor.
 
 
 %description devel
 This package contains files to develop with libextractor, that is
 either to create plugins or to compile applications with libextractor.
 
-%description devel -l pl
-Piki nag³ówkowe wymagane do tworzenia aplikacji i wtyczek
-korzystaj±cych z libextractor.
+%description devel -l pl.UTF-8
+Piki nagłówkowe wymagane do tworzenia aplikacji i wtyczek
+korzystających z libextractor.
 
 %package static
 Summary:       Static libextractor libraries
 
 %package static
 Summary:       Static libextractor libraries
-Summary(pl):   Statyczne biblioteki libextractor
+Summary(pl.UTF-8):     Statyczne biblioteki libextractor
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 This package contains static libraries of libextractor.
 
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 This package contains static libraries of libextractor.
 
-%description static -l pl
+%description static -l pl.UTF-8
 Statyczna wersja bibliotek libextractor.
 
 %prep
 %setup -q
 Statyczna wersja bibliotek libextractor.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p0
+
+%{__rm} po/stamp-po
+%{__sed} -i -e 's,tidy/\(tidy\|buffio\)\.h,\1.h,' configure.ac src/plugins/html_extractor.c
 
 %build
 %{__gettextize}
 
 %build
 %{__gettextize}
-%{__libtoolize} --ltdl
-%{__aclocal}
+%{__libtoolize}
+%{__aclocal} -I m4
 %{__autoconf}
 %{__autoheader}
 %{__automake}
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure
+%configure \
+       %{!?with_tests:--disable-testruns} \
+       --enable-experimental \
+       %{?with_static_libs:--enable-static} \
+       %{!?with_gstreamer:--without-gstreamer}
 
 %{__make}
 
 
 %{__make}
 
+%{?with_tests:%{__make} check}
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+# lt_dlopen is used, but .la files are not required now
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/libextractor_*.la
+%if %{with static_libs}
 # useless
 # useless
-rm -f $RPM_BUILD_ROOT%{_libdir}/libextractor_[!u]*.a
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/libextractor_*.a
+%endif
 
 %find_lang %{name}
 
 
 %find_lang %{name}
 
@@ -131,70 +203,90 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
+%post  devel -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
+%postun        devel -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README TODO
 %attr(755,root,root) %{_bindir}/extract
 %attr(755,root,root) %{_libdir}/libextractor.so.*.*.*
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README TODO
 %attr(755,root,root) %{_bindir}/extract
 %attr(755,root,root) %{_libdir}/libextractor.so.*.*.*
-# plugins are lt_dlopened without extension, so *.la are needed
-%attr(755,root,root) %{_libdir}/libextractor_asf.so
-%attr(755,root,root) %{_libdir}/libextractor_elf.so
-%attr(755,root,root) %{_libdir}/libextractor_filename.so
-%attr(755,root,root) %{_libdir}/libextractor_gif.so
-%attr(755,root,root) %{_libdir}/libextractor_html.so
-%attr(755,root,root) %{_libdir}/libextractor_jpeg.so
-%attr(755,root,root) %{_libdir}/libextractor_lower.so
-%attr(755,root,root) %{_libdir}/libextractor_mime.so
-%attr(755,root,root) %{_libdir}/libextractor_mp3.so
-%attr(755,root,root) %{_libdir}/libextractor_mpeg.so
-%attr(755,root,root) %{_libdir}/libextractor_ogg.so
-%attr(755,root,root) %{_libdir}/libextractor_pdf.so
-%attr(755,root,root) %{_libdir}/libextractor_png.so
-%attr(755,root,root) %{_libdir}/libextractor_ps.so
-%attr(755,root,root) %{_libdir}/libextractor_qt.so
-%attr(755,root,root) %{_libdir}/libextractor_real.so
-%attr(755,root,root) %{_libdir}/libextractor_riff.so
-%attr(755,root,root) %{_libdir}/libextractor_rpm.so
-%attr(755,root,root) %{_libdir}/libextractor_split.so
-%attr(755,root,root) %{_libdir}/libextractor_tiff.so
-%attr(755,root,root) %{_libdir}/libextractor_wav.so
-%attr(755,root,root) %{_libdir}/libextractor_zip.so
-%{_libdir}/libextractor_asf.la
-%{_libdir}/libextractor_elf.la
-%{_libdir}/libextractor_filename.la
-%{_libdir}/libextractor_gif.la
-%{_libdir}/libextractor_html.la
-%{_libdir}/libextractor_jpeg.la
-%{_libdir}/libextractor_lower.la
-%{_libdir}/libextractor_mime.la
-%{_libdir}/libextractor_mp3.la
-%{_libdir}/libextractor_mpeg.la
-%{_libdir}/libextractor_ogg.la
-%{_libdir}/libextractor_pdf.la
-%{_libdir}/libextractor_png.la
-%{_libdir}/libextractor_ps.la
-%{_libdir}/libextractor_qt.la
-%{_libdir}/libextractor_real.la
-%{_libdir}/libextractor_riff.la
-%{_libdir}/libextractor_rpm.la
-%{_libdir}/libextractor_split.la
-%{_libdir}/libextractor_tiff.la
-%{_libdir}/libextractor_wav.la
-%{_libdir}/libextractor_zip.la
-%{_mandir}/man1/*
-
-%files printable
+%attr(755,root,root) %ghost %{_libdir}/libextractor.so.3
+%attr(755,root,root) %{_libdir}/libextractor_common.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libextractor_common.so.1
+%dir %{_libdir}/%{name}
+# R: libarchive
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_archive.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_deb.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_dvi.so
+# R: exiv2
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_exiv2.so
+# R: flac
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_flac.so
+# R: giflib
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_gif.so
+# R: gstreamer gstreamer-plugins-base
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_gstreamer.so
+# R: libmagic tidy
+%{?with_tidy:%attr(755,root,root) %{_libdir}/%{name}/libextractor_html.so}
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_it.so
+# R: libjepg
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_jpeg.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_man.so
+# R: libsmf
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_midi.so
+# R: libmagic
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_mime.so
+# R: mp4v2
+%{?with_mp4v2:%attr(755,root,root) %{_libdir}/%{name}/libextractor_mp4.so}
+# R: libmpeg2
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_mpeg.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_nsf.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_nsfe.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_odf.so
+# R: libvorbis
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_ogg.so
+# R: libgsf
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_ole2.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_png.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_ps.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_riff.so
+# R: rpm-lib
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_rpm.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_s3m.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_sid.so
+# R: libtiff
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_tiff.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_wav.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_xm.so
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_zip.so
+%{_mandir}/man1/extract.1*
+
+%files thumbnail-ffmpeg
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnailffmpeg.so
+
+%files thumbnail-gtk
 %defattr(644,root,root,755)
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libextractor_printable_*.so
-%{_libdir}/libextractor_printable_*.la
+%attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnailgtk.so
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libextractor.so
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libextractor.so
+%attr(755,root,root) %{_libdir}/libextractor_common.so
 %{_libdir}/libextractor.la
 %{_libdir}/libextractor.la
+%{_libdir}/libextractor_common.la
 %{_includedir}/extractor.h
 %{_includedir}/extractor.h
-%{_mandir}/man3/*
+%{_pkgconfigdir}/libextractor.pc
+%{_mandir}/man3/libextractor.3*
+%{_infodir}/libextractor.info*
 
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libextractor.a
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libextractor.a
+%{_libdir}/libextractor_common.a
+%endif
This page took 0.073519 seconds and 4 git commands to generate.