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