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