]> git.pld-linux.org Git - packages/file.git/blob - file.spec
up to 5.14, release intended to fix 5.13 bugs
[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 %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.14
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:  c26625f1d6773ad4bc5a87c0e315632c
37 Source1:        http://ftp1.pld-linux.org/people/glen/%{name}-non-english-man-pages.tar.bz2
38 # Source1-md5:  6a45bcaefd19b94db36a1b2b7c5b806b
39 Source2:        %{name}-zisofs.magic
40 Source3:        %{name}-mscompress.magic
41 Source4:        %{name}-magic.mime-gen.awk
42 Patch0:         %{name}-sparc.patch
43 Patch1:         %{name}-selinux.patch
44 Patch2:         searchpath.patch
45 Patch3:         automake.patch
46 Patch4:         sticky-bit.patch
47 URL:            http://www.darwinsys.com/file/
48 BuildRequires:  autoconf >= 2.50
49 BuildRequires:  automake
50 BuildRequires:  libtool >= 2:2.0
51 BuildRequires:  rpmbuild(macros) >= 1.453
52 %if %{with python}
53 BuildRequires:  python-devel
54 BuildRequires:  python-modules
55 BuildRequires:  rpm-pythonprov
56 %endif
57 BuildRequires:  zlib-devel
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 Requires:       zlib-devel
206
207 %description -n libmagic-devel
208 Library of functions which operate on magic database file.
209
210 This package contains the header files needed to develop programs that
211 use these libmagic.
212
213 %description -n libmagic-devel -l pl.UTF-8
214 Biblioteka funkcji operujących na pliku bazy danych magic.
215
216 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
217 używających libmagic.
218
219 %package -n libmagic-static
220 Summary:        Static libmagic library
221 Summary(pl.UTF-8):      Statyczna biblioteka libmagic
222 Group:          Development/Libraries
223 Requires:       libmagic-devel = %{version}-%{release}
224
225 %description -n libmagic-static
226 Library of functions which operate on magic database file.
227
228 This package contains the static libmagic.
229
230 %description -n libmagic-static -l pl.UTF-8
231 Biblioteka funkcji operujących na pliku bazy danych magic.
232
233 Ten pakiet zawiera statyczną wersję biblioteki.
234
235 %package -n python-magic
236 Summary:        Python bindings for libmagic
237 Summary(pl.UTF-8):      Wiązania Pythona dla libmagic
238 Group:          Libraries/Python
239 Requires:       libmagic = %{version}-%{release}
240 %pyrequires_eq  python-libs
241
242 %description -n python-magic
243 Python bindings for libmagic.
244
245 %description -n python-magic -l pl.UTF-8
246 Wiązania Pythona dla libmagic.
247
248 %prep
249 %setup -q
250 %patch0 -p1
251 %patch1 -p1
252 %patch2 -p1
253 %patch3 -p1
254 %patch4 -p1
255
256 %if "%{cc_version}" < "3.4"
257 %{__sed} -i -e 's,-Wextra,,' configure.ac
258 %endif
259
260 cp -p %{SOURCE3} magic/Magdir/mscompress
261 cp -p %{SOURCE2} magic/Magdir/zisofs
262
263 rm -f magic/Magdir/{*.orig,*~}
264
265 %build
266 %{__libtoolize}
267 %{__aclocal}
268 %{__autoheader}
269 %{__autoconf}
270 %{__automake}
271 %configure \
272         --disable-silent-rules \
273         --enable-fsect-man5 \
274         %{?with_static_libs:--enable-static}
275
276 %{__make}
277
278 %if %{with python}
279 cd python
280 %{__python} setup.py build
281 cd ..
282 %endif
283
284 %if %{with tests}
285 %{__make} check
286 %endif
287
288 %install
289 rm -rf $RPM_BUILD_ROOT
290 install -d $RPM_BUILD_ROOT/%{_lib}
291
292 %{__make} install \
293         DESTDIR=$RPM_BUILD_ROOT
294
295 mv $RPM_BUILD_ROOT%{_libdir}/libmagic.so.* $RPM_BUILD_ROOT/%{_lib}
296 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libmagic.so.*.*.*) \
297         $RPM_BUILD_ROOT%{_libdir}/libmagic.so
298
299 %if %{with python}
300 cd python
301 %{__python} setup.py install \
302         --root=$RPM_BUILD_ROOT \
303         --optimize=2
304 cd ..
305 %py_postclean
306 %endif
307
308 awk -f %{SOURCE4} < $RPM_BUILD_ROOT%{_datadir}/misc/magic > $RPM_BUILD_ROOT%{_datadir}/misc/magic.mime
309 ln -s misc $RPM_BUILD_ROOT%{_datadir}/file
310
311 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
312 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.file-non-english-man-pages
313 %{__rm} $RPM_BUILD_ROOT%{_mandir}/file-magic4.diff
314
315 %clean
316 rm -rf $RPM_BUILD_ROOT
317
318 %post   -n libmagic -p /sbin/ldconfig
319 %postun -n libmagic -p /sbin/ldconfig
320
321 %pretrans
322 # it used to be directory
323 if [ -d %{_datadir}/file -a ! -L %{_datadir}/file ]; then
324         mv -b %{_datadir}/file{,.dir}
325         ln -sn misc %{_datadir}/file
326 %banner -e %{name} <<EOF
327 Check %{_datadir}/file.dir for your own files and remove it when done.
328 EOF
329 fi
330
331 %files
332 %defattr(644,root,root,755)
333 %doc ChangeLog COPYING README
334 %attr(755,root,root) %{_bindir}/file
335 %{_datadir}/file
336 %{_datadir}/misc/magic
337 %{_datadir}/misc/magic.mgc
338 %{_datadir}/misc/magic.mime
339 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/magic
340 %{_mandir}/man1/file.1*
341 %{_mandir}/man5/magic.5*
342 %lang(de) %{_mandir}/de/man[15]/*
343 %lang(es) %{_mandir}/es/man[15]/*
344 %lang(fr) %{_mandir}/fr/man[15]/*
345 %lang(hu) %{_mandir}/hu/man[15]/*
346 %lang(it) %{_mandir}/it/man[15]/*
347 %lang(ja) %{_mandir}/ja/man[15]/*
348 %lang(nl) %{_mandir}/nl/man[15]/*
349 %lang(pl) %{_mandir}/pl/man[15]/*
350 %lang(pt_BR) %{_mandir}/pt_BR/man[15]/*
351
352 %files -n libmagic
353 %defattr(644,root,root,755)
354 %attr(755,root,root) /%{_lib}/libmagic.so.*.*.*
355 %attr(755,root,root) %ghost /%{_lib}/libmagic.so.1
356
357 %files -n libmagic-devel
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_libdir}/libmagic.so
360 %{_libdir}/libmagic.la
361 %{_includedir}/magic.h
362 %{_mandir}/man3/libmagic.3*
363
364 %if %{with static_libs}
365 %files -n libmagic-static
366 %defattr(644,root,root,755)
367 %{_libdir}/libmagic.a
368 %endif
369
370 %if %{with python}
371 %files -n python-magic
372 %defattr(644,root,root,755)
373 %doc python/README python/example.py
374 %if "%{py_ver}" > "2.4"
375 %{py_sitescriptdir}/Magic_file_extensions-*.egg-info
376 %endif
377 %{py_sitescriptdir}/magic.py[co]
378 %endif
This page took 0.088418 seconds and 3 git commands to generate.