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