]> git.pld-linux.org Git - packages/libextractor.git/blob - libextractor.spec
- added bcond_without static_libs
[packages/libextractor.git] / libextractor.spec
1 #
2 # Conditional build:
3 %bcond_with     static          # build with static glib
4 %bcond_without  static_libs     # don't build static library
5 #
6 Summary:        Meta-data extraction library
7 Summary(pl):    Biblioteka do ekstrakcji metadanych
8 Name:           libextractor
9 Version:        0.5.0
10 Release:        1
11 License:        GPL
12 Group:          Libraries
13 # strange, .tar.gz is ~500kB smaller than .tar.bz2
14 Source0:        http://gnunet.org/libextractor/download/%{name}-%{version}.tar.gz
15 # Source0-md5:  5ca78c69a523e54b8c3c08369786f48a
16 Patch0:         %{name}-make_python.patch
17 URL:            http://gnunet.org/libextractor/
18 BuildRequires:  ImageMagick-devel >= 1:6.0.0
19 BuildRequires:  autoconf >= 2.57
20 BuildRequires:  automake
21 BuildRequires:  gettext-devel >= 0.14
22 %if %{with static}
23 BuildRequires:  glib2-static >= 2.0.0
24 %else
25 BuildRequires:  glib2-devel >= 2.0.0
26 %endif
27 BuildRequires:  libltdl-devel
28 BuildRequires:  libstdc++-devel
29 BuildRequires:  libtool >= 2:1.5
30 BuildRequires:  libvorbis-devel
31 BuildRequires:  python-devel >= 1:2.3
32 BuildRequires:  zlib-devel
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 libextractor is a simple library for meta-data extraction.
37 libextractor uses a plugin-mechanism that makes it easy to add support
38 for more file formats, allowing anybody to add new extractors quickly.
39
40 libextractor currently features meta-data extractors for HTML, JPEG,
41 Ogg, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real Audio and Video,
42 PostScript and PDF documents. It also detects many more MIME-types in
43 a fashion similar to the well-known "file" tool.
44
45 Each item of meta-data that is extracted from a file is categorized
46 into one of currently about 40 meta-data categories (e.g. title,
47 author, description or MIME-type).
48
49 This libextractor package also contains a little binary tool "extract"
50 that can be used to invoke libextractor from the command line.
51 "extract" can be used similar to "file", but while "file" currently
52 supports a wider range of file types, "extract" should be able to
53 provide more precise and more detailed information for the supported
54 types of documents (HTML, JPEG, Ogg, MP3, PNG, GIF, RPM, RA, RM, PS,
55 PDF, ZIP, QT, ASF).
56
57 %description -l pl
58 libextractor to prosta biblioteka s³u¿±ca do ekstrakcji metadanych.
59 libextractor u¿ywa mechanizmu "wtyczek", dziêki czemu ³atwo jest dodaæ
60 wsparcie dla nowych formatów plików.
61
62 libextractor obecnie pozwala na pozyskanie metadanych z plików w
63 formatach HTML, JPEG, Ogg, MP3, PNG, RPM, GIF, ZIP, QT, ASF, Real
64 Audio i Video, PostScript oraz PDF. Ponadto rozpoznaje du¿o wiêcej
65 typów MIME w sposób podobny do dobrze znanego narzêdzia "file".
66
67 Ka¿da informacja pobrana z pliku nale¿y do jednej z oko³o 40
68 kategorii (np. tytu³, autor, opis, typ MIME).
69
70 Ta paczka zawiera te¿ narzêdzie "extract", które pozwala skorzystaæ z
71 us³ug libextractor bezpo¶rednio z linii poleceñ. "extract" mo¿e byæ
72 u¿ywane w podobny sposób, co "file". "file" zna wiêcej typów danych,
73 "extract" natomiast dostarcza bardziej precyzyjnych i szczegó³owych
74 informacji na temat obs³ugiwanych formatów (HTML, JPEG, Ogg, MP3, PNG,
75 GIF, RPM, RA, RM, PS, PDF, ZIP, QT, ASF).
76
77 %package printable
78 Summary:        Printable text support plugins for libextractor
79 Summary(pl):    Wtyczki obs³uguj±ce tekst dla biblioteki libextractor
80 Group:          Libraries
81 Requires:       %{name} = %{version}-%{release}
82
83 %description printable
84 libextractor plugins that support printable text in few languages.
85
86 %description printable -l pl
87 Wtyczki biblioteki libextractor obs³uguj±ce tekst w kilku jêzykach.
88
89 %package devel
90 Summary:        Development files for libextractor
91 Summary(pl):    Pliki nag³ówkowe libextractor
92 Group:          Development/Libraries
93 Requires:       %{name} = %{version}-%{release}
94 Requires:       libltdl-devel
95
96 %description devel
97 This package contains files to develop with libextractor, that is
98 either to create plugins or to compile applications with libextractor.
99
100 %description devel -l pl
101 Piki nag³ówkowe wymagane do tworzenia aplikacji i wtyczek
102 korzystaj±cych z libextractor.
103
104 %package static
105 Summary:        Static libextractor libraries
106 Summary(pl):    Statyczne biblioteki libextractor
107 Group:          Development/Libraries
108 Requires:       %{name}-devel = %{version}-%{release}
109
110 %description static
111 This package contains static libraries of libextractor.
112
113 %description static -l pl
114 Statyczna wersja bibliotek libextractor.
115
116 %package -n python-extractor
117 Summary:        Python support for libextractor
118 Summary(pl):    Modu³ jêzyka Python dla biblioteki libextractor
119 Group:          Libraries/Python
120 Requires:       %{name} = %{version}-%{release}
121 %pyrequires_eq  python-libs
122
123 %description -n python-extractor
124 Python support for libextractor.
125
126 %description -n python-extractor -l pl
127 Modu³ jêzyka Python dla biblioteki libextractor.
128
129 %prep
130 %setup -q
131 %patch0 -p1
132
133 %if %{without static}
134 %{__perl} -pi -e 's/-B(static|dynamic)//g' src/plugins/ole2/Makefile.am
135 %endif
136
137 %build
138 %{__gettextize}
139 %{__libtoolize} --ltdl
140 %{__aclocal} -I m4
141 %{__autoconf}
142 %{__autoheader}
143 %{__automake}
144 %configure \
145         %{!?with_static_libs:--disable-static}
146
147 %{__make}
148
149 %install
150 rm -rf $RPM_BUILD_ROOT
151
152 %{__make} install \
153         DESTDIR=$RPM_BUILD_ROOT
154
155 # useless
156 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/libextractor_*.a
157
158 %find_lang %{name}
159
160 %clean
161 rm -rf $RPM_BUILD_ROOT
162
163 %post   -p /sbin/ldconfig
164 %postun -p /sbin/ldconfig
165
166 %files -f %{name}.lang
167 %defattr(644,root,root,755)
168 %doc AUTHORS ChangeLog NEWS README TODO
169 %attr(755,root,root) %{_bindir}/extract
170 %attr(755,root,root) %{_libdir}/libextractor.so.*.*.*
171 # plugins are lt_dlopened without extension, so *.la are needed
172 %dir %{_libdir}/%{name}
173 %attr(755,root,root) %{_libdir}/%{name}/libextractor_asf.so
174 %attr(755,root,root) %{_libdir}/%{name}/libextractor_deb.so
175 %attr(755,root,root) %{_libdir}/%{name}/libextractor_dvi.so
176 %attr(755,root,root) %{_libdir}/%{name}/libextractor_elf.so
177 %attr(755,root,root) %{_libdir}/%{name}/libextractor_filename.so
178 %attr(755,root,root) %{_libdir}/%{name}/libextractor_gif.so
179 %attr(755,root,root) %{_libdir}/%{name}/libextractor_hash_md5.so
180 %attr(755,root,root) %{_libdir}/%{name}/libextractor_hash_rmd160.so
181 %attr(755,root,root) %{_libdir}/%{name}/libextractor_hash_sha1.so
182 %attr(755,root,root) %{_libdir}/%{name}/libextractor_html.so
183 %attr(755,root,root) %{_libdir}/%{name}/libextractor_id3v2.so
184 %attr(755,root,root) %{_libdir}/%{name}/libextractor_id3v23.so
185 %attr(755,root,root) %{_libdir}/%{name}/libextractor_id3v24.so
186 %attr(755,root,root) %{_libdir}/%{name}/libextractor_jpeg.so
187 %attr(755,root,root) %{_libdir}/%{name}/libextractor_lower.so
188 %attr(755,root,root) %{_libdir}/%{name}/libextractor_man.so
189 %attr(755,root,root) %{_libdir}/%{name}/libextractor_mime.so
190 %attr(755,root,root) %{_libdir}/%{name}/libextractor_mp3.so
191 %attr(755,root,root) %{_libdir}/%{name}/libextractor_mpeg.so
192 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ogg.so
193 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ole2.so
194 %attr(755,root,root) %{_libdir}/%{name}/libextractor_oo.so
195 %attr(755,root,root) %{_libdir}/%{name}/libextractor_pdf.so
196 %attr(755,root,root) %{_libdir}/%{name}/libextractor_png.so
197 %attr(755,root,root) %{_libdir}/%{name}/libextractor_ps.so
198 %attr(755,root,root) %{_libdir}/%{name}/libextractor_qt.so
199 %attr(755,root,root) %{_libdir}/%{name}/libextractor_real.so
200 %attr(755,root,root) %{_libdir}/%{name}/libextractor_riff.so
201 %attr(755,root,root) %{_libdir}/%{name}/libextractor_rpm.so
202 %attr(755,root,root) %{_libdir}/%{name}/libextractor_split.so
203 %attr(755,root,root) %{_libdir}/%{name}/libextractor_tar.so
204 %attr(755,root,root) %{_libdir}/%{name}/libextractor_thumbnail.so
205 %attr(755,root,root) %{_libdir}/%{name}/libextractor_tiff.so
206 %attr(755,root,root) %{_libdir}/%{name}/libextractor_translit.so
207 %attr(755,root,root) %{_libdir}/%{name}/libextractor_wav.so
208 %attr(755,root,root) %{_libdir}/%{name}/libextractor_zip.so
209 %{_libdir}/%{name}/libextractor_asf.la
210 %{_libdir}/%{name}/libextractor_deb.la
211 %{_libdir}/%{name}/libextractor_dvi.la
212 %{_libdir}/%{name}/libextractor_elf.la
213 %{_libdir}/%{name}/libextractor_filename.la
214 %{_libdir}/%{name}/libextractor_gif.la
215 %{_libdir}/%{name}/libextractor_hash_md5.la
216 %{_libdir}/%{name}/libextractor_hash_rmd160.la
217 %{_libdir}/%{name}/libextractor_hash_sha1.la
218 %{_libdir}/%{name}/libextractor_html.la
219 %{_libdir}/%{name}/libextractor_id3v2.la
220 %{_libdir}/%{name}/libextractor_id3v23.la
221 %{_libdir}/%{name}/libextractor_id3v24.la
222 %{_libdir}/%{name}/libextractor_jpeg.la
223 %{_libdir}/%{name}/libextractor_lower.la
224 %{_libdir}/%{name}/libextractor_man.la
225 %{_libdir}/%{name}/libextractor_mime.la
226 %{_libdir}/%{name}/libextractor_mp3.la
227 %{_libdir}/%{name}/libextractor_mpeg.la
228 %{_libdir}/%{name}/libextractor_ogg.la
229 %{_libdir}/%{name}/libextractor_ole2.la
230 %{_libdir}/%{name}/libextractor_oo.la
231 %{_libdir}/%{name}/libextractor_pdf.la
232 %{_libdir}/%{name}/libextractor_png.la
233 %{_libdir}/%{name}/libextractor_ps.la
234 %{_libdir}/%{name}/libextractor_qt.la
235 %{_libdir}/%{name}/libextractor_real.la
236 %{_libdir}/%{name}/libextractor_riff.la
237 %{_libdir}/%{name}/libextractor_rpm.la
238 %{_libdir}/%{name}/libextractor_split.la
239 %{_libdir}/%{name}/libextractor_tar.la
240 %{_libdir}/%{name}/libextractor_thumbnail.la
241 %{_libdir}/%{name}/libextractor_tiff.la
242 %{_libdir}/%{name}/libextractor_translit.la
243 %{_libdir}/%{name}/libextractor_wav.la
244 %{_libdir}/%{name}/libextractor_zip.la
245 %{_mandir}/man1/*
246
247 %files printable
248 %defattr(644,root,root,755)
249 %attr(755,root,root) %{_libdir}/%{name}/libextractor_printable_*.so
250 %{_libdir}/%{name}/libextractor_printable_*.la
251
252 %files devel
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_libdir}/libextractor.so
255 %{_libdir}/libextractor.la
256 %{_includedir}/extractor.h
257 %{_mandir}/man3/*
258
259 %if %{with static_libs}
260 %files static
261 %defattr(644,root,root,755)
262 %{_libdir}/libextractor.a
263 %endif
264
265 %files -n python-extractor
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{py_sitedir}/*.so
This page took 0.161984 seconds and 4 git commands to generate.