source: projects/specs/tags/6_0_REL/f/file/file-vl.spec @ 2730

Revision 2730, 10.1 KB checked in by Takemikaduchi, 13 years ago (diff)

rebuild package

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: 2%{?_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* Sun Feb 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.05-2
189- rebuild package
190- fix Patch100
191
192* Sat Feb 12 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.05-1
193- new upstream release
194- updated Vine patches (but Patch100 has not been ported yet...)
195- split to devel and static subpackcages
196
197* Mon Sep 27 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.21-3
198- rebuilt with rpm-4.8.1
199- add environment variable LIBTOOL for make command
200
201* Fri Sep 26 2008 Shu KONNO <owa@bg.wakwak.com> 4.21-2
202- spec in utf-8
203- removed *.la
204
205* Mon May 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.21-1
206- applied new versioning policy
207
208* Tue Dec 11 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 4.21-0vl1
209- new upstream release
210- import debian/fedora patches
211- drop obsolete vine magic.
212
213* Thu Jun 14 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl3
214- rebuild for VineSeed with new tool chain
215
216* Thu May 31 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl2.2
217- add patch110 for fix CVE-2007-2799
218- add zlib-devel to BuildPreReq tag
219
220* Mon Mar 26 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl2.1
221- add patch100 for fix CVE-2007-1536
222
223* Sun Sep 10 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.09-0vl2
224- changed Group to Applications/System
225
226* Sun Apr 18 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 4.09-0vl1
227- new upstream release
228- update vine patches
229
230* Wed Sep 10 2003 Tomoya TAKA <taka@vinelinux.org> 4.03-0vl2
231- update Patch10, use 'size_t' in src/jcode.[ch]
232
233* Tue Sep 09 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.03-0vl1
234- update to 4.03
235- update Patch0, 1, 10 for 4.03
236- s/Copyright/License/
237
238* Mon May 12 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.02-1vl1
239- update to 4.02
240- update Vine patches for 4.02
241
242* Sun Mar  9 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 3.41-0vl1
243- new upstream release
244  - fixed security bug (http://www.idefense.com/advisory/03.04.03.txt)
245- remove unneeded patches.
246- update Vine patches for 3.41
247
248* Mon Apr  1 2002 Jun Nishii <jun@vinelinux.org> 3.37-0vl2
249- added NPDL2 data [Vine:02348]
250
251* Fri Feb 08 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 3.37-0vl1
252- update to 3.37
253
254* Sun Jul 15 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
255- 3.35-0vl3
256- disable some entries in elf for problems on big-endian archs
257
258* Wed Jun  6 2001 Jun Nishii <jun@vinelinux.org>
259- file-3.35-0vl1
260- ver.up
261- added %doc
262
263* Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
264- file-3.33-1vl4
265- more fix and clean up jtext patch (file-3.33-vinejtext.patch)
266
267* Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
268- file-3.33-1vl3
269- fix again jtext patch (file-3.33-vinejtext.patch)
270- added file-3.33-vinenames.patch to avoid miss-judgement
271
272* Wed Jan 10 2001 Jun Nishii <jun@vinelinux.org>
273- file-3.33-1vl2
274- update jtext patch (file-3.33-vinejtext.patch)
275
276* Mon Jan  8 2001 Jun Nishii <jun@vinelinux.org>
277- file-3.33-1vl1
278- modify description-ja and spec
279
280* Sun Jul 09 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
281- file-3.28-2vl2
282- fixed %files section to handle compressed man pages
283
284* Tue Jun 13 2000 Lisa Sagami <czs14350@nifty.ne.jp>
285- marged RH 3.28-2 and Vine 3.27-3vl3
286
287* Wed Feb 16 2000 Cristian Gafton <gafton@redhat.com>
288- add ia64 patch from rth
289
290* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
291- handle compressed manpages
292- update to 3.28
293
294* Mon Sep 6 1999 Norihito Ohmori <ohmori@flatout.org>
295- Japanese Text detection bug fix. (by Toru Hoshina <hoshina@best.com>)
296
297* Fri Aug 27 1999 Norihito Ohmori <ohmori@flatout.org>
298- patch  dues not apply bug.
299
300* Wed Aug 26 1999 Norihito Ohmori <ohmori@flatout.org>
301- not need kcc (Thanks for Toru Hoshina <hoshina@best.com>)
302- ASCII data and Shift JIS data detected in Japanese Text Detection bug fix.
303
304* Mon Aug 23 1999 Jeff Johnson <jbj@redhat.com>
305- identify ELF stripped files correctly (#4665).
306- use SPARC (not sparc) consistently throughout (#4665).
307- add entries for MS Office files (#4665).
308
309* Thu Aug 12 1999 Jeff Johnson <jbj@redhat.com>
310- diddle magic so that *.tfm files are identified correctly.
311
312* Tue Jul  6 1999 Jeff Johnson <jbj@redhat.com>
313- update to 3.27.
314
315* Mon Mar 22 1999 Preston Brown <pbrown@redhat.com>
316- experimental support for realmedia files added
317
318* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
319- auto rebuild in the new build environment (release 5)
320
321* Fri Mar 19 1999 Jeff Johnson <jbj@redhat.com>
322- strip binary.
323
324* Fri Nov 27 1998 Jakub Jelinek <jj@ultra.linux.cz>
325- add SPARC V9 magic.
326
327* Tue Nov 10 1998 Jeff Johnson <jbj@redhat.com>
328- update to 3.26.
329
330* Mon Aug 24 1998 Jeff Johnson <jbj@redhat.com>
331- update to 3.25.
332- detect gimp XCF versions.
333
334* Thu May 07 1998 Prospector System <bugs@redhat.com>
335- translations modified for de, fr, tr
336
337* Wed Apr 08 1998 Erik Troan <ewt@redhat.com>
338- updated to 3.24
339- buildrooted
340
341* Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
342- built against glibc
343
344* Mon Mar 31 1997 Erik Troan <ewt@redhat.com>
345- Fixed problems caused by 64 bit time_t.
346
347* Thu Mar 06 1997 Michael K. Johnson <johnsonm@redhat.com>
348- Improved recognition of Linux kernel images.
Note: See TracBrowser for help on using the repository browser.