]>
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 |
082fa56a | 13 | Release: 6 |
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 |
082fa56a | 21 | Patch3: %{name}-giflib.patch |
654f15d6 | 22 | URL: http://www.gnu.org/software/libextractor/ |
a19263be | 23 | BuildRequires: autoconf >= 2.61 |
ae0eb0ec | 24 | BuildRequires: automake >= 1:1.11 |
ac956507 | 25 | BuildRequires: bzip2-devel |
ae0eb0ec JB |
26 | BuildRequires: exiv2-devel |
27 | BuildRequires: gettext-devel >= 0.16.1 | |
28 | # libavformat libavcodec libavutil libswscale | |
29 | BuildRequires: ffmpeg-devel | |
51643bdb | 30 | BuildRequires: flac-devel |
082fa56a | 31 | BuildRequires: giflib-devel >= 5.1.0 |
f62a8524 | 32 | BuildRequires: glib2-devel >= 2.0.0 |
ae0eb0ec JB |
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 | |
7e423ac2 | 39 | BuildRequires: libgsf-devel |
ae0eb0ec JB |
40 | BuildRequires: libjpeg-devel |
41 | BuildRequires: libltdl-devel >= 2:2 | |
42 | BuildRequires: libmagic-devel | |
43 | BuildRequires: libmpeg2-devel | |
66bf9449 | 44 | BuildRequires: libsmf-devel |
22ef719f | 45 | BuildRequires: libstdc++-devel |
ae0eb0ec JB |
46 | BuildRequires: libtiff-devel |
47 | BuildRequires: libtool >= 2:2 | |
e6895d44 | 48 | BuildRequires: libvorbis-devel |
0f32d9bf | 49 | %{?with_mp4v2:BuildRequires: mp4v2-devel >= 2.0.0} |
ae0eb0ec JB |
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 | |
51643bdb | 54 | BuildRequires: texinfo |
ae0eb0ec | 55 | %{?with_tidy:BuildRequires: tidy-devel} |
22ef719f | 56 | BuildRequires: zlib-devel |
6d2f4968 | 57 | %{?with_tests:BuildRequires: zzuf} |
a78ce0f6 | 58 | Obsoletes: libextractor-printable |
ae0eb0ec | 59 | Obsoletes: libextractor-thumbnail-qt |
e6895d44 | 60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
61 | ||
e6895d44 | 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, | |
dba19c27 | 68 | Ogg, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real Audio and Video, |
e6895d44 | 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 | |
dba19c27 | 81 | types of documents (HTML, JPEG, Ogg, MP3, PNG, GIF, RPM, RA, RM, PS, |
e6895d44 | 82 | PDF, ZIP, QT, ASF). |
83 | ||
3048b7f3 JR |
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. | |
e6895d44 | 88 | |
3048b7f3 | 89 | libextractor obecnie pozwala na pozyskanie metadanych z plików w |
dba19c27 | 90 | formatach HTML, JPEG, Ogg, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real |
3048b7f3 JR |
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". | |
e6895d44 | 93 | |
3048b7f3 JR |
94 | Każda informacja pobrana z pliku należy do jednej z około 40 |
95 | kategorii (np. tytuł, autor, opis, typ MIME). | |
e6895d44 | 96 | |
3048b7f3 JR |
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, | |
e6895d44 | 102 | GIF, RPM, RA, RM, PS, PDF, ZIP, QT, ASF). |
103 | ||
ae0eb0ec | 104 | %package thumbnail-ffmpeg |
6032acdd JB |
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 | |
6ee1ab83 JB |
107 | Group: Libraries |
108 | Requires: %{name} = %{version}-%{release} | |
6ee1ab83 | 109 | |
ae0eb0ec | 110 | %description thumbnail-ffmpeg |
6032acdd JB |
111 | libextractor plugins that supports thumbnails and audio preview |
112 | through FFmpeg. | |
6ee1ab83 | 113 | |
ae0eb0ec | 114 | %description thumbnail-ffmpeg -l pl.UTF-8 |
6032acdd JB |
115 | Wtyczki biblioteki libextractor obsługujące miniaturki obrazów oraz |
116 | podgląd dźwięku poprzez FFmpeg. | |
d4fec0d7 | 117 | |
ae0eb0ec JB |
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 | |
d4fec0d7 JB |
121 | Group: Libraries |
122 | Requires: %{name} = %{version}-%{release} | |
ae0eb0ec | 123 | Obsoletes: libextractor-thumbnail < 1.0.1 |
d4fec0d7 | 124 | |
ae0eb0ec JB |
125 | %description thumbnail-gtk |
126 | libextractor plugin that supports thumbnails through GTK+. | |
d4fec0d7 | 127 | |
ae0eb0ec | 128 | %description thumbnail-gtk -l pl.UTF-8 |
3048b7f3 | 129 | Wtyczka biblioteki libextractor obsługująca miniaturki obrazów poprzez |
ae0eb0ec | 130 | GTK+. |
6ee1ab83 | 131 | |
7a97c3f0 | 132 | %package devel |
133 | Summary: Development files for libextractor | |
b0bb8262 | 134 | Summary(pl.UTF-8): Pliki nagłówkowe libextractor |
7a97c3f0 | 135 | Group: Development/Libraries |
30717bee | 136 | Requires: %{name} = %{version}-%{release} |
ac956507 | 137 | Requires: bzip2-devel |
1611298c | 138 | Requires: libltdl-devel |
ae0eb0ec | 139 | Requires: zlib-devel |
7a97c3f0 | 140 | |
e6895d44 | 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 | ||
3048b7f3 JR |
145 | %description devel -l pl.UTF-8 |
146 | Piki nagłówkowe wymagane do tworzenia aplikacji i wtyczek | |
147 | korzystających z libextractor. | |
e6895d44 | 148 | |
7a97c3f0 | 149 | %package static |
150 | Summary: Static libextractor libraries | |
b0bb8262 | 151 | Summary(pl.UTF-8): Statyczne biblioteki libextractor |
7a97c3f0 | 152 | Group: Development/Libraries |
30717bee | 153 | Requires: %{name}-devel = %{version}-%{release} |
7a97c3f0 | 154 | |
e6895d44 | 155 | %description static |
156 | This package contains static libraries of libextractor. | |
157 | ||
3048b7f3 | 158 | %description static -l pl.UTF-8 |
e6895d44 | 159 | Statyczna wersja bibliotek libextractor. |
160 | ||
161 | %prep | |
162 | %setup -q | |
fcbde899 | 163 | %patch0 -p1 |
d4fec0d7 | 164 | %patch1 -p1 |
654f15d6 | 165 | %patch2 -p1 |
082fa56a | 166 | %patch3 -p1 |
ae0eb0ec JB |
167 | |
168 | %{__rm} po/stamp-po | |
169 | %{__sed} -i -e 's,tidy/\(tidy\|buffio\)\.h,\1.h,' configure.ac src/plugins/html_extractor.c | |
f62a8524 | 170 | |
e6895d44 | 171 | %build |
a4491c19 | 172 | %{__gettextize} |
e4c3c699 | 173 | %{__libtoolize} |
d809ecde | 174 | %{__aclocal} -I m4 |
0271649d | 175 | %{__autoconf} |
176 | %{__autoheader} | |
177 | %{__automake} | |
9ef92358 | 178 | %configure \ |
ae0eb0ec JB |
179 | %{!?with_tests:--disable-testruns} \ |
180 | --enable-experimental \ | |
d4fec0d7 | 181 | %{?with_static_libs:--enable-static} \ |
ae0eb0ec | 182 | %{!?with_gstreamer:--without-gstreamer} |
e6895d44 | 183 | |
7a97c3f0 | 184 | %{__make} |
e6895d44 | 185 | |
ae0eb0ec JB |
186 | %{?with_tests:%{__make} check} |
187 | ||
e6895d44 | 188 | %install |
189 | rm -rf $RPM_BUILD_ROOT | |
22ef719f JB |
190 | |
191 | %{__make} install \ | |
192 | DESTDIR=$RPM_BUILD_ROOT | |
193 | ||
ae0eb0ec JB |
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} | |
22ef719f | 197 | # useless |
ae0eb0ec JB |
198 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/libextractor_*.a |
199 | %endif | |
7a97c3f0 | 200 | |
a4491c19 JB |
201 | %find_lang %{name} |
202 | ||
7a97c3f0 | 203 | %clean |
204 | rm -rf $RPM_BUILD_ROOT | |
205 | ||
22ef719f JB |
206 | %post -p /sbin/ldconfig |
207 | %postun -p /sbin/ldconfig | |
e6895d44 | 208 | |
a19263be | 209 | %post devel -p /sbin/postshell |
a2621b7e | 210 | -/usr/sbin/fix-info-dir -c %{_infodir} |
51643bdb | 211 | |
a19263be | 212 | %postun devel -p /sbin/postshell |
a2621b7e | 213 | -/usr/sbin/fix-info-dir -c %{_infodir} |
51643bdb | 214 | |
a4491c19 | 215 | %files -f %{name}.lang |
e6895d44 | 216 | %defattr(644,root,root,755) |
22ef719f | 217 | %doc AUTHORS ChangeLog NEWS README TODO |
e6895d44 | 218 | %attr(755,root,root) %{_bindir}/extract |
30717bee | 219 | %attr(755,root,root) %{_libdir}/libextractor.so.*.*.* |
a78ce0f6 | 220 | %attr(755,root,root) %ghost %{_libdir}/libextractor.so.3 |
ae0eb0ec JB |
221 | %attr(755,root,root) %{_libdir}/libextractor_common.so.*.*.* |
222 | %attr(755,root,root) %ghost %{_libdir}/libextractor_common.so.1 | |
b70ad6ab | 223 | %dir %{_libdir}/%{name} |
ae0eb0ec JB |
224 | # R: libarchive |
225 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_archive.so | |
b70ad6ab | 226 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_deb.so |
227 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_dvi.so | |
ae0eb0ec JB |
228 | # R: exiv2 |
229 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_exiv2.so | |
230 | # R: flac | |
51643bdb | 231 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_flac.so |
ae0eb0ec | 232 | # R: giflib |
b70ad6ab | 233 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_gif.so |
ae0eb0ec JB |
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} | |
a19263be | 238 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_it.so |
ae0eb0ec | 239 | # R: libjepg |
b70ad6ab | 240 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_jpeg.so |
b70ad6ab | 241 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_man.so |
ae0eb0ec | 242 | # R: libsmf |
66bf9449 | 243 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_midi.so |
ae0eb0ec | 244 | # R: libmagic |
b70ad6ab | 245 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_mime.so |
ae0eb0ec JB |
246 | # R: mp4v2 |
247 | %{?with_mp4v2:%attr(755,root,root) %{_libdir}/%{name}/libextractor_mp4.so} | |
248 | # R: libmpeg2 | |
b70ad6ab | 249 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_mpeg.so |
62aaded9 | 250 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_nsf.so |
51643bdb | 251 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_nsfe.so |
a78ce0f6 | 252 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_odf.so |
ae0eb0ec | 253 | # R: libvorbis |
b70ad6ab | 254 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_ogg.so |
ae0eb0ec | 255 | # R: libgsf |
b70ad6ab | 256 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_ole2.so |
b70ad6ab | 257 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_png.so |
258 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_ps.so | |
b70ad6ab | 259 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_riff.so |
ae0eb0ec | 260 | # R: rpm-lib |
b70ad6ab | 261 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_rpm.so |
a19263be | 262 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_s3m.so |
84556c19 | 263 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_sid.so |
ae0eb0ec | 264 | # R: libtiff |
b70ad6ab | 265 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_tiff.so |
266 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_wav.so | |
a19263be | 267 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_xm.so |
b70ad6ab | 268 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_zip.so |
51643bdb | 269 | %{_mandir}/man1/extract.1* |
e6895d44 | 270 | |
ae0eb0ec | 271 | %files thumbnail-ffmpeg |
6ee1ab83 | 272 | %defattr(644,root,root,755) |
6032acdd | 273 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_previewopus.so |
ae0eb0ec | 274 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnailffmpeg.so |
6ee1ab83 | 275 | |
ae0eb0ec | 276 | %files thumbnail-gtk |
d4fec0d7 | 277 | %defattr(644,root,root,755) |
ae0eb0ec | 278 | %attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnailgtk.so |
d4fec0d7 | 279 | |
e6895d44 | 280 | %files devel |
281 | %defattr(644,root,root,755) | |
22ef719f | 282 | %attr(755,root,root) %{_libdir}/libextractor.so |
43713306 | 283 | %attr(755,root,root) %{_libdir}/libextractor_common.so |
22ef719f | 284 | %{_libdir}/libextractor.la |
43713306 | 285 | %{_libdir}/libextractor_common.la |
e6895d44 | 286 | %{_includedir}/extractor.h |
84556c19 | 287 | %{_pkgconfigdir}/libextractor.pc |
51643bdb | 288 | %{_mandir}/man3/libextractor.3* |
ae0eb0ec | 289 | %{_infodir}/libextractor.info* |
e6895d44 | 290 | |
9ef92358 | 291 | %if %{with static_libs} |
e6895d44 | 292 | %files static |
293 | %defattr(644,root,root,755) | |
22ef719f | 294 | %{_libdir}/libextractor.a |
43713306 | 295 | %{_libdir}/libextractor_common.a |
9ef92358 | 296 | %endif |