]> git.pld-linux.org Git - packages/libextractor.git/blob - libextractor.spec
- fix building with ffmpeg 4.0
[packages/libextractor.git] / libextractor.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 %bcond_with     tests           # perform tests [some problems with rpm extractor?]
5 %bcond_without  gstreamer       # GStreamer plugin
6 %bcond_without  mp4v2           # MP4v2 plugin
7 %bcond_without  tidy            # HTML plugin (based on tidy library)
8 #
9 Summary:        Meta-data extraction library
10 Summary(pl.UTF-8):      Biblioteka do ekstrakcji metadanych
11 Name:           libextractor
12 Version:        1.6
13 Release:        2
14 License:        GPL v3+
15 Group:          Libraries
16 Source0:        http://ftp.gnu.org/gnu/libextractor/%{name}-%{version}.tar.gz
17 # Source0-md5:  cbadbfa6051ee54837299ee81732a0eb
18 Patch0:         %{name}-info.patch
19 Patch1:         %{name}-rpm5.patch
20 Patch2:         %{name}-pl.po-update.patch
21 Patch3:         ffmpeg4.patch
22 URL:            http://www.gnu.org/software/libextractor/
23 BuildRequires:  autoconf >= 2.61
24 BuildRequires:  automake >= 1:1.11
25 BuildRequires:  bzip2-devel
26 BuildRequires:  exiv2-devel
27 BuildRequires:  gdk-pixbuf2-devel >= 2.4
28 BuildRequires:  gettext-tools >= 0.16.1
29 # libavformat libavcodec libavutil libswscale
30 BuildRequires:  ffmpeg-devel
31 BuildRequires:  flac-devel
32 BuildRequires:  giflib-devel >= 5.1.0
33 BuildRequires:  glib2-devel >= 2.0.0
34 %if %{with gstreamer}
35 BuildRequires:  gstreamer-devel >= 0.11.93
36 BuildRequires:  gstreamer-plugins-base >= 0.11.93
37 %endif
38 BuildRequires:  gtk+3-devel >= 3.0.0
39 BuildRequires:  libapparmor-devel
40 BuildRequires:  libarchive-devel
41 BuildRequires:  libgsf-devel
42 BuildRequires:  libjpeg-devel
43 BuildRequires:  libltdl-devel >= 2:2
44 BuildRequires:  libmagic-devel
45 BuildRequires:  libmpeg2-devel
46 BuildRequires:  libsmf-devel
47 BuildRequires:  libstdc++-devel
48 BuildRequires:  libtiff-devel
49 BuildRequires:  libtool >= 2:2
50 BuildRequires:  libvorbis-devel
51 %{?with_mp4v2:BuildRequires:    mp4v2-devel >= 2.0.0}
52 BuildRequires:  pkgconfig >= 1:0.7
53 # rpm5 patch supports rpm5.org's rpm 4.5.x and 5.x
54 BuildRequires:  rpm-devel >= 4.5
55 BuildRequires:  sed >= 4.0
56 BuildRequires:  texinfo
57 %{?with_tidy:BuildRequires:     tidy-devel >= 5}
58 BuildRequires:  zlib-devel
59 %{?with_tests:BuildRequires:    zzuf}
60 Obsoletes:      libextractor-printable
61 Obsoletes:      libextractor-thumbnail-qt
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %description
65 libextractor is a simple library for meta-data extraction.
66 libextractor uses a plugin-mechanism that makes it easy to add support
67 for more file formats, allowing anybody to add new extractors quickly.
68
69 libextractor currently features meta-data extractors for HTML, JPEG,
70 Ogg, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real Audio and Video,
71 PostScript and PDF documents. It also detects many more MIME-types in
72 a fashion similar to the well-known "file" tool.
73
74 Each item of meta-data that is extracted from a file is categorized
75 into one of currently about 40 meta-data categories (e.g. title,
76 author, description or MIME-type).
77
78 This libextractor package also contains a little binary tool "extract"
79 that can be used to invoke libextractor from the command line.
80 "extract" can be used similar to "file", but while "file" currently
81 supports a wider range of file types, "extract" should be able to
82 provide more precise and more detailed information for the supported
83 types of documents (HTML, JPEG, Ogg, MP3, PNG, GIF, RPM, RA, RM, PS,
84 PDF, ZIP, QT, ASF).
85
86 %description -l pl.UTF-8
87 libextractor to prosta biblioteka służąca do ekstrakcji metadanych.
88 libextractor używa mechanizmu "wtyczek", dzięki czemu łatwo jest dodać
89 wsparcie dla nowych formatów plików.
90
91 libextractor obecnie pozwala na pozyskanie metadanych z plików w
92 formatach HTML, JPEG, Ogg, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real
93 Audio i Video, PostScript oraz PDF. Ponadto rozpoznaje dużo więcej
94 typów MIME w sposób podobny do dobrze znanego narzędzia "file".
95
96 Każda informacja pobrana z pliku należy do jednej z około 40
97 kategorii (np. tytuł, autor, opis, typ MIME).
98
99 Ta paczka zawiera też narzędzie "extract", które pozwala skorzystać z
100 usług libextractor bezpośrednio z linii poleceń. "extract" może być
101 używane w podobny sposób, co "file". "file" zna więcej typów danych,
102 "extract" natomiast dostarcza bardziej precyzyjnych i szczegółowych
103 informacji na temat obsługiwanych formatów (HTML, JPEG, Ogg, MP3, PNG,
104 GIF, RPM, RA, RM, PS, PDF, ZIP, QT, ASF).
105
106 %package thumbnail-ffmpeg
107 Summary:        FFmpeg Thumbnail and audio preview plugins for libextractor
108 Summary(pl.UTF-8):      Wtyczki obsługująca miniaturki obrazów oraz podgląd dźwięku poprzez FFmpeg dla biblioteki libextractor
109 Group:          Libraries
110 Requires:       %{name} = %{version}-%{release}
111
112 %description thumbnail-ffmpeg
113 libextractor plugins that supports thumbnails and audio preview
114 through FFmpeg.
115
116 %description thumbnail-ffmpeg -l pl.UTF-8
117 Wtyczki biblioteki libextractor obsługujące miniaturki obrazów oraz
118 podgląd dźwięku poprzez FFmpeg.
119
120 %package thumbnail-gtk
121 Summary:        GTK+ Thumbnail plugin for libextractor
122 Summary(pl.UTF-8):      Wtyczka obsługująca miniaturki obrazów poprzez GTK+ dla biblioteki libextractor
123 Group:          Libraries
124 Requires:       %{name} = %{version}-%{release}
125 Requires:       gdk-pixbuf2 >= 2.4
126 Obsoletes:      libextractor-thumbnail < 1.0.1
127
128 %description thumbnail-gtk
129 libextractor plugin that supports thumbnails through GTK+.
130
131 %description thumbnail-gtk -l pl.UTF-8
132 Wtyczka biblioteki libextractor obsługująca miniaturki obrazów poprzez
133 GTK+.
134
135 %package devel
136 Summary:        Development files for libextractor
137 Summary(pl.UTF-8):      Pliki nagłówkowe libextractor
138 Group:          Development/Libraries
139 Requires:       %{name} = %{version}-%{release}
140 Requires:       bzip2-devel
141 Requires:       libapparmor-devel
142 Requires:       libltdl-devel
143 Requires:       zlib-devel
144
145 %description devel
146 This package contains files to develop with libextractor, that is
147 either to create plugins or to compile applications with libextractor.
148
149 %description devel -l pl.UTF-8
150 Piki nagłówkowe wymagane do tworzenia aplikacji i wtyczek
151 korzystających z libextractor.
152
153 %package static
154 Summary:        Static libextractor libraries
155 Summary(pl.UTF-8):      Statyczne biblioteki libextractor
156 Group:          Development/Libraries
157 Requires:       %{name}-devel = %{version}-%{release}
158
159 %description static
160 This package contains static libraries of libextractor.
161
162 %description static -l pl.UTF-8
163 Statyczna wersja bibliotek libextractor.
164
165 %prep
166 %setup -q
167 %patch0 -p1
168 %patch1 -p1
169 %patch2 -p1
170 %patch3 -p1
171
172 %{__rm} po/stamp-po
173
174 %build
175 %{__gettextize}
176 %{__libtoolize}
177 %{__aclocal} -I m4
178 %{__autoconf}
179 %{__autoheader}
180 %{__automake}
181 %configure \
182         %{!?with_tests:--disable-testruns} \
183         --enable-experimental \
184         %{?with_static_libs:--enable-static} \
185         %{!?with_gstreamer:--without-gstreamer}
186
187 %{__make}
188
189 %{?with_tests:%{__make} check}
190
191 %install
192 rm -rf $RPM_BUILD_ROOT
193
194 %{__make} install \
195         DESTDIR=$RPM_BUILD_ROOT
196
197 # lt_dlopen is used, but .la files are not required now
198 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/libextractor_*.la
199 %if %{with static_libs}
200 # useless
201 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/libextractor_*.a
202 %endif
203
204 %find_lang %{name}
205
206 %clean
207 rm -rf $RPM_BUILD_ROOT
208
209 %post   -p /sbin/ldconfig
210 %postun -p /sbin/ldconfig
211
212 %post   devel -p /sbin/postshell
213 -/usr/sbin/fix-info-dir -c %{_infodir}
214
215 %postun devel -p /sbin/postshell
216 -/usr/sbin/fix-info-dir -c %{_infodir}
217
218 %files -f %{name}.lang
219 %defattr(644,root,root,755)
220 %doc AUTHORS ChangeLog NEWS README TODO
221 %attr(755,root,root) %{_bindir}/extract
222 %attr(755,root,root) %{_libdir}/libextractor.so.*.*.*
223 %attr(755,root,root) %ghost %{_libdir}/libextractor.so.3
224 %attr(755,root,root) %{_libdir}/libextractor_common.so.*.*.*
225 %attr(755,root,root) %ghost %{_libdir}/libextractor_common.so.1
226 %dir %{_libdir}/%{name}
227 # R: libarchive
228 %attr(755,root,root) %{_libdir}/%{name}/libextractor_archive.so
229 %attr(755,root,root) %{_libdir}/%{name}/libextractor_deb.so
230 %attr(755,root,root) %{_libdir}/%{name}/libextractor_dvi.so
231 # R: exiv2
232 %attr(755,root,root) %{_libdir}/%{name}/libextractor_exiv2.so
233 # R: flac
234 %attr(755,root,root) %{_libdir}/%{name}/libextractor_flac.so
235 # R: giflib
236 %attr(755,root,root) %{_libdir}/%{name}/libextractor_gif.so
237 # R: gstreamer gstreamer-plugins-base
238 %attr(755,root,root) %{_libdir}/%{name}/libextractor_gstreamer.so
239 # R: libmagic tidy
240 %{?with_tidy:%attr(755,root,root) %{_libdir}/%{name}/libextractor_html.so}
241 %attr(755,root,root) %{_libdir}/%{name}/libextractor_it.so
242 # R: libjepg
243 %attr(755,root,root) %{_libdir}/%{name}/libextractor_jpeg.so
244 %attr(755,root,root) %{_libdir}/%{name}/libextractor_man.so
245 # R: libsmf
246 %attr(755,root,root) %{_libdir}/%{name}/libextractor_midi.so
247 # R: libmagic
248 %attr(755,root,root) %{_libdir}/%{name}/libextractor_mime.so
249 # R: mp4v2
250 %{?with_mp4v2:%attr(755,root,root) %{_libdir}/%{name}/libextractor_mp4.so}
251 # R: libmpeg2
252 %attr(755,root,root) %{_libdir}/%{name}/libextractor_mpeg.so
253 %attr(755,root,root) %{_libdir}/%{name}/libextractor_nsf.so
254 %attr(755,root,root) %{_libdir}/%{name}/libextractor_nsfe.so
255 %attr(755,root,root) %{_libdir}/%{name}/libextractor_odf.so
256 # R: libvorbis
257 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ogg.so
258 # R: libgsf
259 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ole2.so
260 %attr(755,root,root) %{_libdir}/%{name}/libextractor_pdf.so
261 # R: zlib
262 %attr(755,root,root) %{_libdir}/%{name}/libextractor_png.so
263 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ps.so
264 %attr(755,root,root) %{_libdir}/%{name}/libextractor_riff.so
265 # R: rpm-lib
266 %attr(755,root,root) %{_libdir}/%{name}/libextractor_rpm.so
267 %attr(755,root,root) %{_libdir}/%{name}/libextractor_s3m.so
268 %attr(755,root,root) %{_libdir}/%{name}/libextractor_sid.so
269 # R: libtiff
270 %attr(755,root,root) %{_libdir}/%{name}/libextractor_tiff.so
271 %attr(755,root,root) %{_libdir}/%{name}/libextractor_wav.so
272 %attr(755,root,root) %{_libdir}/%{name}/libextractor_xm.so
273 %attr(755,root,root) %{_libdir}/%{name}/libextractor_zip.so
274 %{_mandir}/man1/extract.1*
275
276 %files thumbnail-ffmpeg
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{_libdir}/%{name}/libextractor_previewopus.so
279 %attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnailffmpeg.so
280
281 %files thumbnail-gtk
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnailgtk.so
284
285 %files devel
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_libdir}/libextractor.so
288 %attr(755,root,root) %{_libdir}/libextractor_common.so
289 %{_libdir}/libextractor.la
290 %{_libdir}/libextractor_common.la
291 %{_includedir}/extractor.h
292 %{_pkgconfigdir}/libextractor.pc
293 %{_mandir}/man3/libextractor.3*
294 %{_infodir}/libextractor.info*
295
296 %if %{with static_libs}
297 %files static
298 %defattr(644,root,root,755)
299 %{_libdir}/libextractor.a
300 %{_libdir}/libextractor_common.a
301 %endif
This page took 0.31462 seconds and 3 git commands to generate.