1 # TODO: zzuf (for tests)
4 %bcond_without static_libs # static library
5 %bcond_with tests # perform tests [some problems with rpm extractor?]
6 %bcond_without gstreamer # GStreamer plugin
7 %bcond_without mp4v2 # MP4v2 plugin
8 %bcond_without tidy # HTML plugin (based on tidy library)
10 Summary: Meta-data extraction library
11 Summary(pl.UTF-8): Biblioteka do ekstrakcji metadanych
17 Source0: http://ftp.gnu.org/gnu/libextractor/%{name}-%{version}.tar.gz
18 # Source0-md5: 4a1496af12bf545582c0e9444429220d
19 Patch0: %{name}-info.patch
20 Patch1: %{name}-rpm5.patch
21 Patch2: %{name}-ffmpeg2.patch
22 URL: http://gnunet.org/libextractor/
23 BuildRequires: autoconf >= 2.61
24 BuildRequires: automake >= 1:1.11
25 BuildRequires: bzip2-devel
26 BuildRequires: exiv2-devel
27 BuildRequires: gettext-devel >= 0.16.1
28 # libavformat libavcodec libavutil libswscale
29 BuildRequires: ffmpeg-devel
30 BuildRequires: flac-devel
31 BuildRequires: giflib-devel
32 BuildRequires: glib2-devel >= 2.0.0
34 BuildRequires: gstreamer-devel >= 0.11.93
35 BuildRequires: gstreamer-plugins-base >= 0.11.93
37 BuildRequires: gtk+3-devel >= 3.0.0
38 BuildRequires: libarchive-devel
39 BuildRequires: libgsf-devel
40 BuildRequires: libjpeg-devel
41 BuildRequires: libltdl-devel >= 2:2
42 BuildRequires: libmagic-devel
43 BuildRequires: libmpeg2-devel
44 BuildRequires: libsmf-devel
45 BuildRequires: libstdc++-devel
46 BuildRequires: libtiff-devel
47 BuildRequires: libtool >= 2:2
48 BuildRequires: libvorbis-devel
49 %{?with_mp4v2:BuildRequires: mp4v2-devel >= 2.0.0}
50 BuildRequires: pkgconfig >= 1:0.7
51 # rpm5 patch supports rpm5.org's rpm 4.5.x and 5.x
52 BuildRequires: rpm-devel >= 4.5
53 BuildRequires: sed >= 4.0
54 BuildRequires: texinfo
55 %{?with_tidy:BuildRequires: tidy-devel}
56 BuildRequires: zlib-devel
57 Obsoletes: libextractor-printable
58 Obsoletes: libextractor-thumbnail-qt
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 libextractor is a simple library for meta-data extraction.
63 libextractor uses a plugin-mechanism that makes it easy to add support
64 for more file formats, allowing anybody to add new extractors quickly.
66 libextractor currently features meta-data extractors for HTML, JPEG,
67 Ogg, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real Audio and Video,
68 PostScript and PDF documents. It also detects many more MIME-types in
69 a fashion similar to the well-known "file" tool.
71 Each item of meta-data that is extracted from a file is categorized
72 into one of currently about 40 meta-data categories (e.g. title,
73 author, description or MIME-type).
75 This libextractor package also contains a little binary tool "extract"
76 that can be used to invoke libextractor from the command line.
77 "extract" can be used similar to "file", but while "file" currently
78 supports a wider range of file types, "extract" should be able to
79 provide more precise and more detailed information for the supported
80 types of documents (HTML, JPEG, Ogg, MP3, PNG, GIF, RPM, RA, RM, PS,
83 %description -l pl.UTF-8
84 libextractor to prosta biblioteka służąca do ekstrakcji metadanych.
85 libextractor używa mechanizmu "wtyczek", dzięki czemu łatwo jest dodać
86 wsparcie dla nowych formatów plików.
88 libextractor obecnie pozwala na pozyskanie metadanych z plików w
89 formatach HTML, JPEG, Ogg, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real
90 Audio i Video, PostScript oraz PDF. Ponadto rozpoznaje dużo więcej
91 typów MIME w sposób podobny do dobrze znanego narzędzia "file".
93 Każda informacja pobrana z pliku należy do jednej z około 40
94 kategorii (np. tytuł, autor, opis, typ MIME).
96 Ta paczka zawiera też narzędzie "extract", które pozwala skorzystać z
97 usług libextractor bezpośrednio z linii poleceń. "extract" może być
98 używane w podobny sposób, co "file". "file" zna więcej typów danych,
99 "extract" natomiast dostarcza bardziej precyzyjnych i szczegółowych
100 informacji na temat obsługiwanych formatów (HTML, JPEG, Ogg, MP3, PNG,
101 GIF, RPM, RA, RM, PS, PDF, ZIP, QT, ASF).
103 %package thumbnail-ffmpeg
104 Summary: FFmpeg Thumbnail plugin for libextractor
105 Summary(pl.UTF-8): Wtyczka obsługująca miniaturki obrazów poprzez FFmpeg dla biblioteki libextractor
107 Requires: %{name} = %{version}-%{release}
109 %description thumbnail-ffmpeg
110 libextractor plugin that supports thumbnails through FFmpeg.
112 %description thumbnail-ffmpeg -l pl.UTF-8
113 Wtyczka biblioteki libextractor obsługująca miniaturki obrazów poprzez
116 %package thumbnail-gtk
117 Summary: GTK+ Thumbnail plugin for libextractor
118 Summary(pl.UTF-8): Wtyczka obsługująca miniaturki obrazów poprzez GTK+ dla biblioteki libextractor
120 Requires: %{name} = %{version}-%{release}
121 Obsoletes: libextractor-thumbnail < 1.0.1
123 %description thumbnail-gtk
124 libextractor plugin that supports thumbnails through GTK+.
126 %description thumbnail-gtk -l pl.UTF-8
127 Wtyczka biblioteki libextractor obsługująca miniaturki obrazów poprzez
131 Summary: Development files for libextractor
132 Summary(pl.UTF-8): Pliki nagłówkowe libextractor
133 Group: Development/Libraries
134 Requires: %{name} = %{version}-%{release}
135 Requires: bzip2-devel
136 Requires: libltdl-devel
140 This package contains files to develop with libextractor, that is
141 either to create plugins or to compile applications with libextractor.
143 %description devel -l pl.UTF-8
144 Piki nagłówkowe wymagane do tworzenia aplikacji i wtyczek
145 korzystających z libextractor.
148 Summary: Static libextractor libraries
149 Summary(pl.UTF-8): Statyczne biblioteki libextractor
150 Group: Development/Libraries
151 Requires: %{name}-devel = %{version}-%{release}
154 This package contains static libraries of libextractor.
156 %description static -l pl.UTF-8
157 Statyczna wersja bibliotek libextractor.
166 %{__sed} -i -e 's,tidy/\(tidy\|buffio\)\.h,\1.h,' configure.ac src/plugins/html_extractor.c
176 %{!?with_tests:--disable-testruns} \
177 --enable-experimental \
178 %{?with_static_libs:--enable-static} \
179 %{!?with_gstreamer:--without-gstreamer}
183 %{?with_tests:%{__make} check}
186 rm -rf $RPM_BUILD_ROOT
189 DESTDIR=$RPM_BUILD_ROOT
191 # lt_dlopen is used, but .la files are not required now
192 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/libextractor_*.la
193 %if %{with static_libs}
195 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/libextractor_*.a
201 rm -rf $RPM_BUILD_ROOT
203 %post -p /sbin/ldconfig
204 %postun -p /sbin/ldconfig
206 %post devel -p /sbin/postshell
207 -/usr/sbin/fix-info-dir -c %{_infodir}
209 %postun devel -p /sbin/postshell
210 -/usr/sbin/fix-info-dir -c %{_infodir}
212 %files -f %{name}.lang
213 %defattr(644,root,root,755)
214 %doc AUTHORS ChangeLog NEWS README TODO
215 %attr(755,root,root) %{_bindir}/extract
216 %attr(755,root,root) %{_libdir}/libextractor.so.*.*.*
217 %attr(755,root,root) %ghost %{_libdir}/libextractor.so.3
218 %attr(755,root,root) %{_libdir}/libextractor_common.so.*.*.*
219 %attr(755,root,root) %ghost %{_libdir}/libextractor_common.so.1
220 %dir %{_libdir}/%{name}
222 %attr(755,root,root) %{_libdir}/%{name}/libextractor_archive.so
223 %attr(755,root,root) %{_libdir}/%{name}/libextractor_deb.so
224 %attr(755,root,root) %{_libdir}/%{name}/libextractor_dvi.so
226 %attr(755,root,root) %{_libdir}/%{name}/libextractor_exiv2.so
228 %attr(755,root,root) %{_libdir}/%{name}/libextractor_flac.so
230 %attr(755,root,root) %{_libdir}/%{name}/libextractor_gif.so
231 # R: gstreamer gstreamer-plugins-base
232 %attr(755,root,root) %{_libdir}/%{name}/libextractor_gstreamer.so
234 %{?with_tidy:%attr(755,root,root) %{_libdir}/%{name}/libextractor_html.so}
235 %attr(755,root,root) %{_libdir}/%{name}/libextractor_it.so
237 %attr(755,root,root) %{_libdir}/%{name}/libextractor_jpeg.so
238 %attr(755,root,root) %{_libdir}/%{name}/libextractor_man.so
240 %attr(755,root,root) %{_libdir}/%{name}/libextractor_midi.so
242 %attr(755,root,root) %{_libdir}/%{name}/libextractor_mime.so
244 %{?with_mp4v2:%attr(755,root,root) %{_libdir}/%{name}/libextractor_mp4.so}
246 %attr(755,root,root) %{_libdir}/%{name}/libextractor_mpeg.so
247 %attr(755,root,root) %{_libdir}/%{name}/libextractor_nsf.so
248 %attr(755,root,root) %{_libdir}/%{name}/libextractor_nsfe.so
249 %attr(755,root,root) %{_libdir}/%{name}/libextractor_odf.so
251 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ogg.so
253 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ole2.so
254 %attr(755,root,root) %{_libdir}/%{name}/libextractor_png.so
255 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ps.so
256 %attr(755,root,root) %{_libdir}/%{name}/libextractor_riff.so
258 %attr(755,root,root) %{_libdir}/%{name}/libextractor_rpm.so
259 %attr(755,root,root) %{_libdir}/%{name}/libextractor_s3m.so
260 %attr(755,root,root) %{_libdir}/%{name}/libextractor_sid.so
262 %attr(755,root,root) %{_libdir}/%{name}/libextractor_tiff.so
263 %attr(755,root,root) %{_libdir}/%{name}/libextractor_wav.so
264 %attr(755,root,root) %{_libdir}/%{name}/libextractor_xm.so
265 %attr(755,root,root) %{_libdir}/%{name}/libextractor_zip.so
266 %{_mandir}/man1/extract.1*
268 %files thumbnail-ffmpeg
269 %defattr(644,root,root,755)
270 %attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnailffmpeg.so
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnailgtk.so
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{_libdir}/libextractor.so
279 %attr(755,root,root) %{_libdir}/libextractor_common.so
280 %{_libdir}/libextractor.la
281 %{_libdir}/libextractor_common.la
282 %{_includedir}/extractor.h
283 %{_pkgconfigdir}/libextractor.pc
284 %{_mandir}/man3/libextractor.3*
285 %{_infodir}/libextractor.info*
287 %if %{with static_libs}
289 %defattr(644,root,root,755)
290 %{_libdir}/libextractor.a
291 %{_libdir}/libextractor_common.a