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