source: projects/specs/branches/6/f/file/file-vl.spec @ 10710

Revision 10710, 12.2 KB checked in by tomop, 8 years ago (diff)

file-5.28-1

Line 
1%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
2%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
3%define __libtoolize :
4
5Summary: A utility for determining file types.
6Summary(ja): ファイルの種類を判別するユーティリティー
7Name: file
8Version: 5.28
9Release: 1%{?_dist_release}
10License: BSD
11Group: Applications/System
12Obsoletes: file-static
13
14Source0: ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
15
16# Addtional magic file for Vine
17Source10: magic.printer-j
18
19# Upstream says it's up to distributions to add a way to support local-magic.
20Patch0: file-localmagic.patch
21# sent upstream
22Patch1: file-5.10-strength.patch
23Patch3: file-4.17-rpm-name.patch
24Patch4: file-5.04-volume_key.patch
25Patch5: file-5.04-man-return-code.patch
26Patch6: file-5.04-generic-msdos.patch
27Patch7: file-5.14-x86boot.patch
28Patch8: file-5.14-perl.patch
29Patch14: file-5.19-cafebabe.patch
30Patch15: file-5.22-awk-perl.patch
31Patch17: file-5.24-varied.patch
32
33# https://github.com/file/file/pull/8
34Patch100: file-5.28-compress-sigsegv.patch
35
36# Vine
37Patch1000: file-5.14-magicbuild-fix.patch
38
39# Security
40#  none
41
42Buildroot: %{_tmppath}/%{name}-%{version}-root
43#BuildRequires: automake
44#BuildRequires: autoconf
45BuildRequires: zlib-devel
46
47Vendor: Project Vine
48Distribution: Vine Linux
49Packager: daisuke
50
51%description
52The file command is used to identify a particular file according to the
53type of data contained by the file.  File can identify many different
54file types, including ELF binaries, system libraries, RPM packages, and
55different graphics formats.
56
57You should install the file package, since the file command is such a
58useful utility.
59
60%description -l ja
61file コマンドは、ファイルに含まれるデータの種類によって各ファイルが
62どのようなファイルかを判定するために使います。file は ELF バイナリ、シ
63ステムライブラリ、RPM パッケージ、そして様々なグラフィックフォーマット
64を含む、多くの異なるファイルの種類を見分けることができます。
65
66
67%package devel
68Summary:  Libraries and header files for file development
69Summary(ja): libmagic の開発用ファイル
70Group:    Development/Libraries
71Requires: %{name} = %{version}-%{release}
72
73%description devel
74The file-devel package contains the header files and libmagic library
75necessary for developing programs using libmagic.
76
77%package -n python-magic
78Summary: Python bindings for the libmagic API
79Group:   Development/Libraries
80BuildRequires: python-devel python-setuptools
81Requires: %{name} = %{version}-%{release}
82
83%description -n python-magic
84This package contains the Python bindings to allow access to the
85libmagic API. The libmagic library is also used by the familiar
86file(1) command.
87
88
89%prep
90%setup -q
91# Don't use -b -- it will lead to problems when compiling magic file!
92%patch0 -p1
93%patch1 -p1
94%patch3 -p1
95%patch4 -p1
96%patch5 -p1
97%patch6 -p1
98%patch7 -p1
99%patch8 -p1
100%patch14 -p1
101%patch15 -p1
102%patch17 -p1
103
104%patch100 -p1
105
106# Vine
107%patch1000 -p1
108
109# Security
110#  none
111
112cat %{SOURCE10} >> ./magic/Localstuff
113
114iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
115touch -r doc/libmagic.man doc/libmagic.man_
116mv doc/libmagic.man_ doc/libmagic.man
117
118%build
119autoreconf
120CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \
121%configure --enable-fsect-man5 --disable-rpath
122# remove hardcoded library paths from local libtool
123sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
124sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
125export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{name}-%{version}/src/.libs
126make
127
128cd python
129CFLAGS="%{optflags}" %{__python} setup.py build
130
131%install
132rm -rf $RPM_BUILD_ROOT
133mkdir -p $RPM_BUILD_ROOT%{_bindir}
134mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
135mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
136mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5
137mkdir -p $RPM_BUILD_ROOT%{_datadir}/misc
138mkdir -p $RPM_BUILD_ROOT%{_datadir}/file
139
140make install DESTDIR=$RPM_BUILD_ROOT
141
142cat magic/Magdir/* > ${RPM_BUILD_ROOT}%{_datadir}/misc/magic
143ln -s misc/magic ${RPM_BUILD_ROOT}%{_datadir}/magic
144##ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime
145ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/file/magic
146
147cd python
148%{__python} setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT}
149%{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/%{name}
150
151
152# LIBTOOL=/usr/bin/libtool
153#ln -s file/magic ${RPM_BUILD_ROOT}%{_datadir}/magic
154#ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime
155
156#ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/misc/magic
157
158#{ cd ${RPM_BUILD_ROOT}
159#  strip .%{_bindir}/file
160#  cp %SOURCE1 .%{_datadir}/magic.mime
161#}
162
163# remove unuse files
164rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
165
166%clean
167rm -rf $RPM_BUILD_ROOT
168
169%post -p /sbin/ldconfig
170
171%postun -p /sbin/ldconfig
172
173
174%files
175%defattr(-,root,root)
176%doc COPYING ChangeLog README
177%{_bindir}/*
178%{_libdir}/libmagic.so.*
179%{_datadir}/file/*
180%{_datadir}/magic*
181%{_datadir}/misc/*
182%{_mandir}/man[15]/*
183
184%files devel
185%defattr(-,root,root,-)
186%{_libdir}/*.so
187%{_includedir}/magic.h
188%{_mandir}/man3/*
189
190%files -n python-magic
191%defattr(-, root, root, -)
192%doc python/README COPYING python/example.py
193%{python_sitelib}/magic.py
194%{python_sitelib}/magic.pyc
195%{python_sitelib}/magic.pyo
196%{python_sitelib}/*egg-info
197
198
199%changelog
200* Thu Jul 28 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.28-1
201- new upstream release.
202- dropped Patch200: fixed in upstream.
203- updated patches.
204- imported Patch15,17 and 100.
205
206* Sat Nov 15 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 5.20-1
207- new upstream release
208- update/drop patches based on fc22
209
210* Fri Oct 24 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 5.14-7
211- reflected 6.0 updates and bumped release
212  * Thu Sep 11 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 5.14-6
213  - drop patch230 (moved to patch320)
214  - add Patch240 for fix CVE-2014-0207
215  - add Patch250 for fix CVE-2014-0237
216  - add Patch260 for fix CVE-2014-0238
217  - add Patch270 for fix CVE-2014-3478
218  - add Patch280 for fix CVE-2014-3479
219  - add Patch290 for fix CVE-2014-3480
220  - add Patch300 for fix CVE-2014-3487
221  - add Patch310 for fix CVE-2014-3538
222  - add Patch320 for fix CVE-2014-3587
223    These patches are from debian/ubuntu, thanks.
224  * Thu Aug 28 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 5.14-5
225  - add patch230 for fix CVE-2014-3587 (cdf_read_property_info)
226  * Thu Mar 27 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 5.14-4
227  - add patch110,220 for fix regression of CVE-2014-2270
228  * Wed Mar 12 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 5.14-3
229  - add patch210 for fix CVE-2014-2270
230  * Thu Feb 20 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 5.14-2
231  - add patch200 for fix CVE-2014-1943
232
233* Sun Jul 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.14-2
234- rebuild with VineSeed environment
235
236* Sun Sep 22 2013 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 5.14-1
237- new upstream reelase
238- add patch100 to fix build error
239- remove -static subpackage and add Obs: file-static
240- fix old changelog date...
241
242* Thu Nov 29 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 5.11-1
243- new upstream reelase
244- drop all local patches
245- import fedora patches
246
247* Wed Feb 15 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.05-3
248- rebuild with python-2.7.2
249
250* Sun Feb 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.05-2
251- rebuild package
252- fix Patch100
253
254* Sat Feb 12 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.05-1
255- new upstream release
256- updated Vine patches (but Patch100 has not been ported yet...)
257- split to devel and static subpackcages
258
259* Mon Sep 27 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.21-3
260- rebuilt with rpm-4.8.1
261- add environment variable LIBTOOL for make command
262
263* Fri Sep 26 2008 Shu KONNO <owa@bg.wakwak.com> 4.21-2
264- spec in utf-8
265- removed *.la
266
267* Mon May 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.21-1
268- applied new versioning policy
269
270* Tue Dec 11 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 4.21-0vl1
271- new upstream release
272- import debian/fedora patches
273- drop obsolete vine magic.
274
275* Thu Jun 14 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl3
276- rebuild for VineSeed with new tool chain
277
278* Thu May 31 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl2.2
279- add patch110 for fix CVE-2007-2799
280- add zlib-devel to BuildPreReq tag
281
282* Mon Mar 26 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl2.1
283- add patch100 for fix CVE-2007-1536
284
285* Sun Sep 10 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.09-0vl2
286- changed Group to Applications/System
287
288* Sun Apr 18 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 4.09-0vl1
289- new upstream release
290- update vine patches
291
292* Wed Sep 10 2003 Tomoya TAKA <taka@vinelinux.org> 4.03-0vl2
293- update Patch10, use 'size_t' in src/jcode.[ch]
294
295* Tue Sep 09 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.03-0vl1
296- update to 4.03
297- update Patch0, 1, 10 for 4.03
298- s/Copyright/License/
299
300* Mon May 12 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.02-1vl1
301- update to 4.02
302- update Vine patches for 4.02
303
304* Sun Mar  9 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 3.41-0vl1
305- new upstream release
306  - fixed security bug (http://www.idefense.com/advisory/03.04.03.txt)
307- remove unneeded patches.
308- update Vine patches for 3.41
309
310* Mon Apr  1 2002 Jun Nishii <jun@vinelinux.org> 3.37-0vl2
311- added NPDL2 data [Vine:02348]
312
313* Fri Feb 08 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 3.37-0vl1
314- update to 3.37
315
316* Sun Jul 15 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
317- 3.35-0vl3
318- disable some entries in elf for problems on big-endian archs
319
320* Wed Jun  6 2001 Jun Nishii <jun@vinelinux.org>
321- file-3.35-0vl1
322- ver.up
323- added %doc
324
325* Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
326- file-3.33-1vl4
327- more fix and clean up jtext patch (file-3.33-vinejtext.patch)
328
329* Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
330- file-3.33-1vl3
331- fix again jtext patch (file-3.33-vinejtext.patch)
332- added file-3.33-vinenames.patch to avoid miss-judgement
333
334* Wed Jan 10 2001 Jun Nishii <jun@vinelinux.org>
335- file-3.33-1vl2
336- update jtext patch (file-3.33-vinejtext.patch)
337
338* Mon Jan  8 2001 Jun Nishii <jun@vinelinux.org>
339- file-3.33-1vl1
340- modify description-ja and spec
341
342* Sun Jul 09 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
343- file-3.28-2vl2
344- fixed %files section to handle compressed man pages
345
346* Tue Jun 13 2000 Lisa Sagami <czs14350@nifty.ne.jp>
347- marged RH 3.28-2 and Vine 3.27-3vl3
348
349* Wed Feb 16 2000 Cristian Gafton <gafton@redhat.com>
350- add ia64 patch from rth
351
352* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
353- handle compressed manpages
354- update to 3.28
355
356* Mon Sep 6 1999 Norihito Ohmori <ohmori@flatout.org>
357- Japanese Text detection bug fix. (by Toru Hoshina <hoshina@best.com>)
358
359* Fri Aug 27 1999 Norihito Ohmori <ohmori@flatout.org>
360- patch  dues not apply bug.
361
362* Thu Aug 26 1999 Norihito Ohmori <ohmori@flatout.org>
363- not need kcc (Thanks for Toru Hoshina <hoshina@best.com>)
364- ASCII data and Shift JIS data detected in Japanese Text Detection bug fix.
365
366* Mon Aug 23 1999 Jeff Johnson <jbj@redhat.com>
367- identify ELF stripped files correctly (#4665).
368- use SPARC (not sparc) consistently throughout (#4665).
369- add entries for MS Office files (#4665).
370
371* Thu Aug 12 1999 Jeff Johnson <jbj@redhat.com>
372- diddle magic so that *.tfm files are identified correctly.
373
374* Tue Jul  6 1999 Jeff Johnson <jbj@redhat.com>
375- update to 3.27.
376
377* Mon Mar 22 1999 Preston Brown <pbrown@redhat.com>
378- experimental support for realmedia files added
379
380* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
381- auto rebuild in the new build environment (release 5)
382
383* Fri Mar 19 1999 Jeff Johnson <jbj@redhat.com>
384- strip binary.
385
386* Fri Nov 27 1998 Jakub Jelinek <jj@ultra.linux.cz>
387- add SPARC V9 magic.
388
389* Tue Nov 10 1998 Jeff Johnson <jbj@redhat.com>
390- update to 3.26.
391
392* Mon Aug 24 1998 Jeff Johnson <jbj@redhat.com>
393- update to 3.25.
394- detect gimp XCF versions.
395
396* Thu May 07 1998 Prospector System <bugs@redhat.com>
397- translations modified for de, fr, tr
398
399* Wed Apr 08 1998 Erik Troan <ewt@redhat.com>
400- updated to 3.24
401- buildrooted
402
403* Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
404- built against glibc
405
406* Mon Mar 31 1997 Erik Troan <ewt@redhat.com>
407- Fixed problems caused by 64 bit time_t.
408
409* Thu Mar 06 1997 Michael K. Johnson <johnsonm@redhat.com>
410- Improved recognition of Linux kernel images.
Note: See TracBrowser for help on using the repository browser.