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

Revision 5701, 10.1 KB checked in by Takemikaduchi, 12 years ago (diff)

python-2.7.2

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