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