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