]> git.pld-linux.org Git - packages/libextractor.git/blob - libextractor.spec
- release 2 (by relup.sh)
[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.0.1
14 Release:        2
15 License:        GPL v3+
16 Group:          Libraries
17 Source0:        http://ftp.gnu.org/gnu/libextractor/%{name}-%{version}.tar.gz
18 # Source0-md5:  593c40670fd7fc8c3ae7adc3df557f64
19 Patch0:         %{name}-info.patch
20 Patch1:         %{name}-rpm5.patch
21 Patch2:         %{name}-sh.patch
22 Patch3:         %{name}-pl.po.patch
23 URL:            http://gnunet.org/libextractor/
24 BuildRequires:  autoconf >= 2.61
25 BuildRequires:  automake >= 1:1.11
26 BuildRequires:  bzip2-devel
27 BuildRequires:  exiv2-devel
28 BuildRequires:  gettext-devel >= 0.16.1
29 # libavformat libavcodec libavutil libswscale
30 BuildRequires:  ffmpeg-devel
31 BuildRequires:  flac-devel
32 BuildRequires:  giflib-devel
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:  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}
57 BuildRequires:  zlib-devel
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 plugin for libextractor
106 Summary(pl.UTF-8):      Wtyczka obsługująca miniaturki obrazów poprzez FFmpeg dla biblioteki libextractor
107 Group:          Libraries
108 Requires:       %{name} = %{version}-%{release}
109
110 %description thumbnail-ffmpeg
111 libextractor plugin that supports thumbnails through FFmpeg.
112
113 %description thumbnail-ffmpeg -l pl.UTF-8
114 Wtyczka biblioteki libextractor obsługująca miniaturki obrazów poprzez
115 FFmpeg.
116
117 %package thumbnail-gtk
118 Summary:        GTK+ Thumbnail plugin for libextractor
119 Summary(pl.UTF-8):      Wtyczka obsługująca miniaturki obrazów poprzez GTK+ dla biblioteki libextractor
120 Group:          Libraries
121 Requires:       %{name} = %{version}-%{release}
122 Obsoletes:      libextractor-thumbnail < 1.0.1
123
124 %description thumbnail-gtk
125 libextractor plugin that supports thumbnails through GTK+.
126
127 %description thumbnail-gtk -l pl.UTF-8
128 Wtyczka biblioteki libextractor obsługująca miniaturki obrazów poprzez
129 GTK+.
130
131 %package devel
132 Summary:        Development files for libextractor
133 Summary(pl.UTF-8):      Pliki nagłówkowe libextractor
134 Group:          Development/Libraries
135 Requires:       %{name} = %{version}-%{release}
136 Requires:       bzip2-devel
137 Requires:       libltdl-devel
138 Requires:       zlib-devel
139
140 %description devel
141 This package contains files to develop with libextractor, that is
142 either to create plugins or to compile applications with libextractor.
143
144 %description devel -l pl.UTF-8
145 Piki nagłówkowe wymagane do tworzenia aplikacji i wtyczek
146 korzystających z libextractor.
147
148 %package static
149 Summary:        Static libextractor libraries
150 Summary(pl.UTF-8):      Statyczne biblioteki libextractor
151 Group:          Development/Libraries
152 Requires:       %{name}-devel = %{version}-%{release}
153
154 %description static
155 This package contains static libraries of libextractor.
156
157 %description static -l pl.UTF-8
158 Statyczna wersja bibliotek libextractor.
159
160 %prep
161 %setup -q
162 %patch0 -p1
163 %patch1 -p1
164 %patch2 -p1
165 %patch3 -p1
166
167 %{__rm} po/stamp-po
168 %{__sed} -i -e 's,tidy/\(tidy\|buffio\)\.h,\1.h,' configure.ac src/plugins/html_extractor.c
169
170 %build
171 %{__gettextize}
172 %{__libtoolize}
173 %{__aclocal} -I m4
174 %{__autoconf}
175 %{__autoheader}
176 %{__automake}
177 %configure \
178         %{!?with_tests:--disable-testruns} \
179         --enable-experimental \
180         %{?with_static_libs:--enable-static} \
181         %{!?with_gstreamer:--without-gstreamer}
182
183 %{__make}
184
185 %{?with_tests:%{__make} check}
186
187 %install
188 rm -rf $RPM_BUILD_ROOT
189
190 %{__make} install \
191         DESTDIR=$RPM_BUILD_ROOT
192
193 # lt_dlopen is used, but .la files are not required now
194 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/libextractor_*.la
195 %if %{with static_libs}
196 # useless
197 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/libextractor_*.a
198 %endif
199
200 %find_lang %{name}
201
202 %clean
203 rm -rf $RPM_BUILD_ROOT
204
205 %post   -p /sbin/ldconfig
206 %postun -p /sbin/ldconfig
207
208 %post   devel -p /sbin/postshell
209 -/usr/sbin/fix-info-dir -c %{_infodir}
210
211 %postun devel -p /sbin/postshell
212 -/usr/sbin/fix-info-dir -c %{_infodir}
213
214 %files -f %{name}.lang
215 %defattr(644,root,root,755)
216 %doc AUTHORS ChangeLog NEWS README TODO
217 %attr(755,root,root) %{_bindir}/extract
218 %attr(755,root,root) %{_libdir}/libextractor.so.*.*.*
219 %attr(755,root,root) %ghost %{_libdir}/libextractor.so.3
220 %attr(755,root,root) %{_libdir}/libextractor_common.so.*.*.*
221 %attr(755,root,root) %ghost %{_libdir}/libextractor_common.so.1
222 %dir %{_libdir}/%{name}
223 # R: libarchive
224 %attr(755,root,root) %{_libdir}/%{name}/libextractor_archive.so
225 %attr(755,root,root) %{_libdir}/%{name}/libextractor_deb.so
226 %attr(755,root,root) %{_libdir}/%{name}/libextractor_dvi.so
227 # R: exiv2
228 %attr(755,root,root) %{_libdir}/%{name}/libextractor_exiv2.so
229 # R: flac
230 %attr(755,root,root) %{_libdir}/%{name}/libextractor_flac.so
231 # R: giflib
232 %attr(755,root,root) %{_libdir}/%{name}/libextractor_gif.so
233 # R: gstreamer gstreamer-plugins-base
234 %attr(755,root,root) %{_libdir}/%{name}/libextractor_gstreamer.so
235 # R: libmagic tidy
236 %{?with_tidy:%attr(755,root,root) %{_libdir}/%{name}/libextractor_html.so}
237 %attr(755,root,root) %{_libdir}/%{name}/libextractor_it.so
238 # R: libjepg
239 %attr(755,root,root) %{_libdir}/%{name}/libextractor_jpeg.so
240 %attr(755,root,root) %{_libdir}/%{name}/libextractor_man.so
241 # R: libsmf
242 %attr(755,root,root) %{_libdir}/%{name}/libextractor_midi.so
243 # R: libmagic
244 %attr(755,root,root) %{_libdir}/%{name}/libextractor_mime.so
245 # R: mp4v2
246 %{?with_mp4v2:%attr(755,root,root) %{_libdir}/%{name}/libextractor_mp4.so}
247 # R: libmpeg2
248 %attr(755,root,root) %{_libdir}/%{name}/libextractor_mpeg.so
249 %attr(755,root,root) %{_libdir}/%{name}/libextractor_nsf.so
250 %attr(755,root,root) %{_libdir}/%{name}/libextractor_nsfe.so
251 %attr(755,root,root) %{_libdir}/%{name}/libextractor_odf.so
252 # R: libvorbis
253 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ogg.so
254 # R: libgsf
255 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ole2.so
256 %attr(755,root,root) %{_libdir}/%{name}/libextractor_png.so
257 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ps.so
258 %attr(755,root,root) %{_libdir}/%{name}/libextractor_riff.so
259 # R: rpm-lib
260 %attr(755,root,root) %{_libdir}/%{name}/libextractor_rpm.so
261 %attr(755,root,root) %{_libdir}/%{name}/libextractor_s3m.so
262 %attr(755,root,root) %{_libdir}/%{name}/libextractor_sid.so
263 # R: libtiff
264 %attr(755,root,root) %{_libdir}/%{name}/libextractor_tiff.so
265 %attr(755,root,root) %{_libdir}/%{name}/libextractor_wav.so
266 %attr(755,root,root) %{_libdir}/%{name}/libextractor_xm.so
267 %attr(755,root,root) %{_libdir}/%{name}/libextractor_zip.so
268 %{_mandir}/man1/extract.1*
269
270 %files thumbnail-ffmpeg
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnailffmpeg.so
273
274 %files thumbnail-gtk
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnailgtk.so
277
278 %files devel
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{_libdir}/libextractor.so
281 %attr(755,root,root) %{_libdir}/libextractor_common.so
282 %{_libdir}/libextractor.la
283 %{_libdir}/libextractor_common.la
284 %{_includedir}/extractor.h
285 %{_pkgconfigdir}/libextractor.pc
286 %{_mandir}/man3/libextractor.3*
287 %{_infodir}/libextractor.info*
288
289 %if %{with static_libs}
290 %files static
291 %defattr(644,root,root,755)
292 %{_libdir}/libextractor.a
293 %{_libdir}/libextractor_common.a
294 %endif
This page took 0.05722 seconds and 4 git commands to generate.