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