]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without python # don't build python-magic module | |
4 | %bcond_without static_libs # don't build static libraries | |
5 | %bcond_without tests # don't perform "make check" | |
6 | # | |
7 | Summary: A utility for determining file types | |
8 | Summary(cs.UTF-8): Program pro zjišťování typu souborů | |
9 | Summary(da.UTF-8): Et værktøj til bestemmelse af filtyper | |
10 | Summary(de.UTF-8): Ein Befehl zur Bestimmung von Dateitypen | |
11 | Summary(es.UTF-8): Utilidad para determinar el tipo de fichero | |
12 | Summary(fr.UTF-8): Utilitaire permettant d'identifier des types de fichier | |
13 | Summary(id.UTF-8): Utility untuk menentukan tipe file | |
14 | Summary(is.UTF-8): Tól til þess að komast að tegund skráar | |
15 | Summary(it.UTF-8): Utility per determinare il tipo di file | |
16 | Summary(ja.UTF-8): ファイルの種類を判断するためのユーティリティ | |
17 | Summary(ko.UTF-8): 파일 종류를 결정하는 유틸리티 | |
18 | Summary(nb.UTF-8): Et verktøy for å bestemme filtyper | |
19 | Summary(pl.UTF-8): Polecenie określające rodzaj pliku | |
20 | Summary(pt.UTF-8): Um utilitário para determinar o tipo dos ficheiros | |
21 | Summary(pt_BR.UTF-8): Um utilitário para determinar tipos de arquivos | |
22 | Summary(ru.UTF-8): Утилита для определения типов файлов | |
23 | Summary(sk.UTF-8): Pomocný program pre určenie typu súboru | |
24 | Summary(sl.UTF-8): Pripomoček za ugotavljanje vrste datotek | |
25 | Summary(sv.UTF-8): Ett verktyg för att bestämma filtyper | |
26 | Summary(tr.UTF-8): Dosya türünü öğrenmek için bir araç | |
27 | Summary(uk.UTF-8): Утиліта для визначення типів файлів | |
28 | Summary(zh_CN.UTF-8): 判定文件类型的工具。 | |
29 | Summary(zh_TW.UTF-8): 用於決定檔案類型的一個工具程式。 | |
30 | Name: file | |
31 | Version: 5.02 | |
32 | Release: 2 | |
33 | License: distributable | |
34 | Group: Applications/File | |
35 | URL: http://www.darwinsys.com/file/ | |
36 | Source0: ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz | |
37 | # Source0-md5: 003c56bd1a130390522b45ebcd5ac179 | |
38 | Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2 | |
39 | # Source1-md5: c157a183b64156f8baafaefd9cbf04c1 | |
40 | Source2: %{name}-zisofs.magic | |
41 | Source3: %{name}-mscompress.magic | |
42 | Source4: %{name}-magic.mime-gen.awk | |
43 | Patch0: %{name}-debian.patch | |
44 | Patch1: %{name}-sparc.patch | |
45 | Patch2: %{name}-lmagic.patch | |
46 | Patch3: %{name}-greedy-dump.patch | |
47 | Patch4: %{name}-selinux.patch | |
48 | Patch5: %{name}-msdos.patch | |
49 | Patch6: %{name}-fusecompress.patch | |
50 | BuildRequires: autoconf | |
51 | BuildRequires: automake | |
52 | BuildRequires: libtool | |
53 | %if %{with python} | |
54 | BuildRequires: python-devel >= 1:2.5 | |
55 | BuildRequires: python-modules >= 1:2.5 | |
56 | BuildRequires: rpm-pythonprov | |
57 | %endif | |
58 | Requires: libmagic = %{version}-%{release} | |
59 | Conflicts: rpm-build < 4.4.1-9 | |
60 | Conflicts: xdelta < 1.0.0 | |
61 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
62 | ||
63 | %description | |
64 | This package is useful for finding out what type of file you are | |
65 | looking at on your system. For example, if an fsck results in a file | |
66 | being stored in lost+found, you can run file on it to find out if it's | |
67 | safe to 'more' it or if it's a binary. It recognizes many file types, | |
68 | including ELF binaries, system libraries, RPM packages, and many | |
69 | different graphics formats. | |
70 | ||
71 | %description -l cs.UTF-8 | |
72 | Příkaz file se používá pro identifikaci zadaného souboru podle jeho | |
73 | obsahu. Je schopen identifikovat množství různých typů souborů včetně | |
74 | binárních souborů ELF, systémových knihoven, RPM balíčků a různých | |
75 | grafických formátů. | |
76 | ||
77 | %description -l da.UTF-8 | |
78 | Programmet "file" bruges til at identificere filer baseret på indhold. | |
79 | "file" kan identificere mange forskellige filtyper, inkl. ELF-filer, | |
80 | systembiblioteker, RPM-pakker og billedfiler i forskellige formater. | |
81 | ||
82 | %description -l de.UTF-8 | |
83 | Sie können dieses Paket verwenden, um zu bestimmen, welches Format | |
84 | eine bestimmte Datei hat. Wird durch fsck eine Datei in lost+found | |
85 | gespeichert, können Sie 'file' ausführen, um herauszufinden, ob Sie | |
86 | sie mit 'more' einsehen können, oder ob es sich um ein Binärprogramm | |
87 | handelt Das Programm erkennt u.a. ELF-Binärprogramme, | |
88 | System-Libraries, RPM-Pakete und viele Grafikformate. | |
89 | ||
90 | %description -l es.UTF-8 | |
91 | Este paquete es útil para descubrir que tipo de archivo estás buscando | |
92 | en tu sistema. Por ejemplo, si fsck resulta un archivo que fue | |
93 | almacenado en el "lost+found", tu puedes ejecutar file en él para | |
94 | descubrir si es seguro leerlo con el "more" o si es un binario. | |
95 | Reconoce varios tipos de archivos, incluyendo binarios ELF, | |
96 | bibliotecas de sistema, paquetes RPM y varios formatos gráficos | |
97 | diferentes. | |
98 | ||
99 | %description -l fr.UTF-8 | |
100 | Ce paquetage sert à trouver le type du fichier que vous recherchez sur | |
101 | votre système. Par exemple, si un fsck fait qu'un fichier a été stocké | |
102 | dans lost+found, vous pouvez lancer file dessus pour savoir si on peut | |
103 | faire un more, ou s'il s'agit d'un binaire. Il reconnaît de nombreux | |
104 | types de fichiers dont les binaires ELF, les bibliothèques systèmes, | |
105 | les paquetages RPM et de nombreux formats graphiques différents. | |
106 | ||
107 | %description -l it.UTF-8 | |
108 | Il comando file è utilizzato per identificare il tipo di file in base | |
109 | ai tipi di dati che contiene. File può identificare molti tipi di | |
110 | file, tra cui i binari ELF, le librerie di sistema, i pacchetti RPM e | |
111 | vari formati grafici. | |
112 | ||
113 | %description -l ja.UTF-8 | |
114 | ファイルコマンドはファイルに含まれるデータの種類により個々のファイルを | |
115 | 見分けるために使われる。file は ELF バイナリ、システムライブラリ、 RPM | |
116 | パッケージ、そして種々のグラフィックフォーマットを含む、多くの異なる | |
117 | ファイルの種類を見分けることが可能である。 | |
118 | ||
119 | %description -l ko.UTF-8 | |
120 | 파일에 저장된 자료 유형에 따라 파일을 식별하는 file 명령. File은 ELF | |
121 | 바이너리, 시스템 라이브러리, RPM 패키지와 다른 그래픽 유형을 포함한 | |
122 | 여러 많은 파일 유형을 식별 가능합니다. | |
123 | ||
124 | %description -l nb.UTF-8 | |
125 | Programmet "file" brukes for å identifisere filer basert på innhold. | |
126 | "file" kan identifisere mange ulike filtyper, inkl. ELF-filer, | |
127 | systembibliotek, RPM-pakker og bildefiler i ulike formater. | |
128 | ||
129 | %description -l pl.UTF-8 | |
130 | Pakiet ten jest przydatny jeżeli chcesz rozpoznać typ plików w twoim | |
131 | systemie. Na przykład jeżeli fsck zdeponuje jakieś pliki w katalogu | |
132 | lost+found, możesz uruchomić file na zdeponowanym pliku i zobaczyć | |
133 | jaki to jest typ pliku, jest to metoda bezpieczniejsza niż 'more', ze | |
134 | względu na to, że to może być plik binarny. File potrafi rozpoznać | |
135 | wiele typów plików np. binarny ELF, biblioteki systemowe, pakiety RPM | |
136 | oraz wiele różnych formatów graficznych i dźwiękowych. | |
137 | ||
138 | %description -l pt.UTF-8 | |
139 | O comando file é usado para identificar um ficheiro em particular de | |
140 | acordo com o tipo de dados que contém. O file pode identificar vários | |
141 | formatos de ficheiros, incluindo binários ELF, bibliotecas de sistema, | |
142 | pacotes RPM e vários formatos gráficos diferentes. | |
143 | ||
144 | %description -l pt_BR.UTF-8 | |
145 | Este pacote é útil para descobrir que tipo de arquivo você está | |
146 | procurando em seu sistema. Por exemplo, se um fsck resulta em um | |
147 | arquivo forem armazenado no "lost+found", você pode rodar file nele | |
148 | para descobrir se é seguro lê-lo com o "more" ou se ele é um binário. | |
149 | Ele reconhece vários tipos de arquivos, incluindo binários ELF, | |
150 | bibliotecas de sistema, pacotes RPM e vários formatos gráficos | |
151 | diferentes. | |
152 | ||
153 | %description -l ru.UTF-8 | |
154 | Команда file используется для определения типа файла по данным, в нем | |
155 | содержащимся. Она может определить множество разнообразных типов | |
156 | файлов, включая бинарные файлы формата ELF, системные библиотеки, | |
157 | пакеты RPM, различные графические форматы и много других. | |
158 | ||
159 | %description -l sv.UTF-8 | |
160 | Kommandot file används för att identifera en fil vad avser vilken typ | |
161 | av data filen innehåller. File kan identifiera många olika filtyper, | |
162 | inklusive ELF-binärer, systembibliotek, RPM-paket och olika | |
163 | grafikformat. | |
164 | ||
165 | %description -l tr.UTF-8 | |
166 | file, bir dosyayı inceleyerek ne tür bir dosya olduğu konusunda size | |
167 | bir fikir verebilir. Böylece uzantısından ve adından ne olduğunu | |
168 | çıkaramadığınız bir dosyayı hangi yazılım ile kullanabileceğinize ya | |
169 | da ne yapacağınıza karar verebilisiniz. file, temel dosya tiplerini, | |
170 | çoğu grafik formatını, çalıştırılabilir dosyaları, sistem | |
171 | kitaplıklarını vs. tanıyabilir. | |
172 | ||
173 | %description -l uk.UTF-8 | |
174 | Команда file використовується для визначення типу файлу по даних, які | |
175 | він містить. Вона може визначити велику кількість різноманітних типів | |
176 | файлів, у тому числі бінарні файли формату ELF, системні бібліотеки, | |
177 | пакети RPM, різноманітні графічні формати та багато інших. | |
178 | ||
179 | %description -l zh_CN.UTF-8 | |
180 | file 命令用来根据文件中包含的数据类型来识别文件类型。 file | |
181 | 可以识别许多不同的文件类型,包括 ELF 二进制、系统 库、RPM | |
182 | 软件包、和不同的图形格式。 | |
183 | ||
184 | %description -l zh_TW.UTF-8 | |
185 | file 指令是根據檔案包含的資料類型來辨認檔案。 File | |
186 | 可以辨認許多不同的檔案類型, 包含 ELF binaries,系統函式庫,RPM | |
187 | 套件,以及不同的 圖像格式。 | |
188 | ||
189 | %package -n libmagic | |
190 | Summary: libmagic library | |
191 | Summary(pl.UTF-8): Biblioteka libmagic | |
192 | Group: Libraries | |
193 | ||
194 | %description -n libmagic | |
195 | Library of functions which operate on magic database file. | |
196 | ||
197 | %description -n libmagic -l pl.UTF-8 | |
198 | Biblioteka funkcji operujących na pliku bazy danych magic. | |
199 | ||
200 | %package -n libmagic-devel | |
201 | Summary: Header files for libmagic library | |
202 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libmagic | |
203 | Group: Development/Libraries | |
204 | Requires: libmagic = %{version}-%{release} | |
205 | ||
206 | %description -n libmagic-devel | |
207 | Library of functions which operate on magic database file. | |
208 | ||
209 | This package contains the header files needed to develop programs that | |
210 | use these libmagic. | |
211 | ||
212 | %description -n libmagic-devel -l pl.UTF-8 | |
213 | Biblioteka funkcji operujących na pliku bazy danych magic. | |
214 | ||
215 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów | |
216 | używających libmagic. | |
217 | ||
218 | %package -n libmagic-static | |
219 | Summary: Static libmagic library | |
220 | Summary(pl.UTF-8): Statyczna biblioteka libmagic | |
221 | Group: Development/Libraries | |
222 | Requires: libmagic-devel = %{version}-%{release} | |
223 | ||
224 | %description -n libmagic-static | |
225 | Library of functions which operate on magic database file. | |
226 | ||
227 | This package contains the static libmagic. | |
228 | ||
229 | %description -n libmagic-static -l pl.UTF-8 | |
230 | Biblioteka funkcji operujących na pliku bazy danych magic. | |
231 | ||
232 | Ten pakiet zawiera statyczną wersję biblioteki. | |
233 | ||
234 | %package -n python-magic | |
235 | Summary: Python bindings for libmagic | |
236 | Summary(pl.UTF-8): Wiązania Pythona dla libmagic | |
237 | Group: Libraries/Python | |
238 | Requires: libmagic = %{version}-%{release} | |
239 | %pyrequires_eq python-libs | |
240 | ||
241 | %description -n python-magic | |
242 | Python bindings for libmagic. | |
243 | ||
244 | %description -n python-magic -l pl.UTF-8 | |
245 | Wiązania Pythona dla libmagic. | |
246 | ||
247 | %prep | |
248 | %setup -q | |
249 | %patch0 -p1 | |
250 | %patch1 -p1 | |
251 | %patch2 -p1 | |
252 | %patch3 -p1 | |
253 | %patch4 -p1 | |
254 | %patch5 -p1 | |
255 | %patch6 -p1 | |
256 | ||
257 | rm -f magic/Magdir/{*.orig,*~} | |
258 | ||
259 | %build | |
260 | %{__libtoolize} | |
261 | %{__aclocal} | |
262 | %{__autoheader} | |
263 | %{__autoconf} | |
264 | %{__automake} | |
265 | %configure \ | |
266 | --enable-fsect-man5 \ | |
267 | %{!?with_static_libs:--enable-static=no} | |
268 | ||
269 | %{__make} | |
270 | ||
271 | %if %{with python} | |
272 | cd python | |
273 | python setup.py build | |
274 | cd .. | |
275 | %endif | |
276 | ||
277 | %if %{with tests} | |
278 | %{__make} check | |
279 | %endif | |
280 | ||
281 | %install | |
282 | rm -rf $RPM_BUILD_ROOT | |
283 | install -d $RPM_BUILD_ROOT{/%{_lib},%{_datadir}/file} | |
284 | ||
285 | %{__make} install \ | |
286 | DESTDIR=$RPM_BUILD_ROOT | |
287 | ||
288 | mv $RPM_BUILD_ROOT%{_libdir}/libmagic.so.* $RPM_BUILD_ROOT/%{_lib} | |
289 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libmagic.so.*.*.*) \ | |
290 | $RPM_BUILD_ROOT%{_libdir}/libmagic.so | |
291 | ||
292 | %if %{with python} | |
293 | cd python | |
294 | python setup.py install \ | |
295 | --root=$RPM_BUILD_ROOT \ | |
296 | --optimize=2 | |
297 | cd .. | |
298 | %endif | |
299 | ||
300 | install -D magic/Localstuff $RPM_BUILD_ROOT%{_sysconfdir}/magic | |
301 | ||
302 | cat magic/Header magic/Magdir/* %{SOURCE2} %{SOURCE3} >$RPM_BUILD_ROOT%{_datadir}/file/magic | |
303 | awk -f %{SOURCE4} <$RPM_BUILD_ROOT%{_datadir}/file/magic >$RPM_BUILD_ROOT%{_datadir}/file/magic.mime | |
304 | ||
305 | bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir} | |
306 | ||
307 | # somebody forgot about patching in tarball | |
308 | mv -f $RPM_BUILD_ROOT%{_mandir}/pt_BR/man{4,5} | |
309 | sed -e 's/MAGIC 4/MAGIC 5/' $RPM_BUILD_ROOT%{_mandir}/pt_BR/man5/magic.4 \ | |
310 | > $RPM_BUILD_ROOT%{_mandir}/pt_BR/man5/magic.5 | |
311 | rm -f $RPM_BUILD_ROOT%{_mandir}/pt_BR/man5/magic.4 | |
312 | ||
313 | src/file -m $RPM_BUILD_ROOT%{_datadir}/file/magic -c -C | |
314 | ||
315 | rm -f $RPM_BUILD_ROOT%{_mandir}/README.file-non-english-man-pages | |
316 | rm -f $RPM_BUILD_ROOT%{_mandir}/file-magic4.diff | |
317 | ||
318 | %clean | |
319 | rm -rf $RPM_BUILD_ROOT | |
320 | ||
321 | %post -n libmagic -p /sbin/ldconfig | |
322 | %postun -n libmagic -p /sbin/ldconfig | |
323 | ||
324 | %files | |
325 | %defattr(644,root,root,755) | |
326 | %doc ChangeLog COPYING README | |
327 | %attr(755,root,root) %{_bindir}/file | |
328 | %{_datadir}/file | |
329 | %{_datadir}/misc/magic | |
330 | %{_datadir}/misc/magic.mgc | |
331 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/magic | |
332 | %{_mandir}/man1/file.1* | |
333 | %{_mandir}/man5/magic.5* | |
334 | %lang(de) %{_mandir}/de/man[15]/* | |
335 | %lang(es) %{_mandir}/es/man[15]/* | |
336 | %lang(fr) %{_mandir}/fr/man[15]/* | |
337 | %lang(hu) %{_mandir}/hu/man[15]/* | |
338 | %lang(it) %{_mandir}/it/man[15]/* | |
339 | %lang(ja) %{_mandir}/ja/man[15]/* | |
340 | %lang(nl) %{_mandir}/nl/man[15]/* | |
341 | %lang(pl) %{_mandir}/pl/man[15]/* | |
342 | %lang(pt_BR) %{_mandir}/pt_BR/man[15]/* | |
343 | ||
344 | %files -n libmagic | |
345 | %defattr(644,root,root,755) | |
346 | %attr(755,root,root) /%{_lib}/libmagic.so.*.*.* | |
347 | %attr(755,root,root) %ghost /%{_lib}/libmagic.so.1 | |
348 | ||
349 | %files -n libmagic-devel | |
350 | %defattr(644,root,root,755) | |
351 | %attr(755,root,root) %{_libdir}/libmagic.so | |
352 | %{_libdir}/libmagic.la | |
353 | %{_includedir}/magic.h | |
354 | %{_mandir}/man3/libmagic.3* | |
355 | ||
356 | %if %{with static_libs} | |
357 | %files -n libmagic-static | |
358 | %defattr(644,root,root,755) | |
359 | %{_libdir}/libmagic.a | |
360 | %endif | |
361 | ||
362 | %if %{with python} | |
363 | %files -n python-magic | |
364 | %defattr(644,root,root,755) | |
365 | %attr(755,root,root) %{py_sitedir}/magic.so | |
366 | %{py_sitedir}/Magic_file_extensions-*.egg-info | |
367 | %endif |