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