source: projects/specs/trunk/f/file/file-vl.spec @ 9099

Revision 9099, 11.9 KB checked in by iwamoto, 9 years ago (diff)

file: update to 5.20

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