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