[2679] | 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)")} |
---|
[521] | 3 | %define __libtoolize : |
---|
[2679] | 4 | |
---|
[521] | 5 | Summary: A utility for determining file types. |
---|
| 6 | Summary(ja): ファイルの種類を判別するユーティリティー |
---|
| 7 | Name: file |
---|
[2679] | 8 | Version: 5.05 |
---|
[2730] | 9 | Release: 2%{?_dist_release} |
---|
[2679] | 10 | |
---|
| 11 | License: BSD |
---|
[521] | 12 | Group: Applications/System |
---|
| 13 | |
---|
[2679] | 14 | Source0: ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz |
---|
[521] | 15 | |
---|
[2679] | 16 | # Addtional magic file for Vine |
---|
| 17 | Source10: magic.printer-j |
---|
[521] | 18 | |
---|
[2679] | 19 | Patch1: file-5.04-zip64.patch |
---|
| 20 | Patch2: file-5.05-python-magic.patch |
---|
| 21 | Patch3: file-5.05-images-magic.patch |
---|
| 22 | |
---|
[521] | 23 | # Vine patch |
---|
[2679] | 24 | Patch100: file-5.05-jtext.patch |
---|
| 25 | Patch120: file-5.05-vinenames.patch |
---|
[521] | 26 | |
---|
| 27 | Buildroot: %{_tmppath}/%{name}-%{version}-root |
---|
[2679] | 28 | #BuildRequires: automake |
---|
| 29 | #BuildRequires: autoconf |
---|
| 30 | BuildRequires: zlib-devel |
---|
[521] | 31 | |
---|
| 32 | Vendor: Project Vine |
---|
| 33 | Distribution: Vine Linux |
---|
| 34 | |
---|
| 35 | %description |
---|
| 36 | The file command is used to identify a particular file according to the |
---|
| 37 | type of data contained by the file. File can identify many different |
---|
| 38 | file types, including ELF binaries, system libraries, RPM packages, and |
---|
| 39 | different graphics formats. |
---|
| 40 | |
---|
| 41 | You should install the file package, since the file command is such a |
---|
| 42 | useful utility. |
---|
| 43 | |
---|
| 44 | %description -l ja |
---|
[2679] | 45 | file コマンドは、ファイルに含まれるデータの種類によって各ファイルが |
---|
[521] | 46 | どのようなファイルかを判定するために使います。file は ELF バイナリ、シ |
---|
| 47 | ステムライブラリ、RPM パッケージ、そして様々なグラフィックフォーマット |
---|
| 48 | を含む、多くの異なるファイルの種類を見分けることができます。 |
---|
| 49 | |
---|
| 50 | |
---|
[2679] | 51 | %package devel |
---|
| 52 | Summary: Libraries and header files for file development |
---|
| 53 | Summary(ja): libmagic の開発用ファイル |
---|
| 54 | Group: Development/Libraries |
---|
| 55 | Requires: %{name} = %{version}-%{release} |
---|
| 56 | |
---|
| 57 | %description devel |
---|
| 58 | The file-devel package contains the header files and libmagic library |
---|
| 59 | necessary for developing programs using libmagic. |
---|
| 60 | |
---|
| 61 | %package static |
---|
| 62 | Summary: Static library for file development |
---|
| 63 | Summary(ja): libmagic のスタティックライブラリ |
---|
| 64 | Group: Development/Libraries |
---|
| 65 | Requires: %{name} = %{version}-%{release} |
---|
| 66 | |
---|
| 67 | %description static |
---|
| 68 | The file-static package contains the static version of |
---|
| 69 | the libmagic library. |
---|
| 70 | |
---|
| 71 | %package -n python-magic |
---|
| 72 | Summary: Python bindings for the libmagic API |
---|
| 73 | Group: Development/Libraries |
---|
| 74 | BuildRequires: python-devel |
---|
| 75 | Requires: %{name} = %{version}-%{release} |
---|
| 76 | |
---|
| 77 | %description -n python-magic |
---|
| 78 | This package contains the Python bindings to allow access to the |
---|
| 79 | libmagic API. The libmagic library is also used by the familiar |
---|
| 80 | file(1) command. |
---|
| 81 | |
---|
| 82 | |
---|
[521] | 83 | %prep |
---|
| 84 | %setup -q |
---|
| 85 | |
---|
[2679] | 86 | #fixes #637785 |
---|
| 87 | %patch1 -p1 |
---|
| 88 | #keeps compatibility with older python-magic versions |
---|
| 89 | %patch2 -p1 |
---|
| 90 | %patch3 -p1 |
---|
[521] | 91 | |
---|
[2679] | 92 | # Patch100 working now |
---|
| 93 | #patch100 -p1 -b .vinejtext |
---|
[521] | 94 | %patch120 -p1 -b .vinenames |
---|
| 95 | |
---|
[2679] | 96 | cat %{SOURCE10} >> ./magic/Localstuff |
---|
[521] | 97 | |
---|
[2679] | 98 | iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_ |
---|
| 99 | touch -r doc/libmagic.man doc/libmagic.man_ |
---|
| 100 | mv doc/libmagic.man_ doc/libmagic.man |
---|
| 101 | |
---|
[521] | 102 | %build |
---|
[2679] | 103 | #autoreconf |
---|
[521] | 104 | CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \ |
---|
[2679] | 105 | %configure --enable-fsect-man5 --disable-rpath |
---|
| 106 | # remove hardcoded library paths from local libtool |
---|
| 107 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
---|
| 108 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
---|
| 109 | export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{name}-%{version}/src/.libs |
---|
| 110 | make |
---|
[521] | 111 | |
---|
[2679] | 112 | cd python |
---|
| 113 | CFLAGS="%{optflags}" %{__python} setup.py build |
---|
| 114 | |
---|
[521] | 115 | %install |
---|
[2679] | 116 | rm -rf $RPM_BUILD_ROOT |
---|
| 117 | mkdir -p $RPM_BUILD_ROOT%{_bindir} |
---|
| 118 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 |
---|
| 119 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3 |
---|
| 120 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5 |
---|
| 121 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/misc |
---|
| 122 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/file |
---|
[521] | 123 | |
---|
[2679] | 124 | make install DESTDIR=$RPM_BUILD_ROOT |
---|
[521] | 125 | |
---|
[2679] | 126 | cat magic/Magdir/* > ${RPM_BUILD_ROOT}%{_datadir}/misc/magic |
---|
| 127 | ln -s misc/magic ${RPM_BUILD_ROOT}%{_datadir}/magic |
---|
| 128 | ##ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime |
---|
| 129 | ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/file/magic |
---|
[521] | 130 | |
---|
[2679] | 131 | cd 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 |
---|
[521] | 148 | rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la |
---|
| 149 | |
---|
| 150 | %clean |
---|
[2679] | 151 | rm -rf $RPM_BUILD_ROOT |
---|
[521] | 152 | |
---|
[2679] | 153 | %post -p /sbin/ldconfig |
---|
| 154 | |
---|
| 155 | %postun -p /sbin/ldconfig |
---|
| 156 | |
---|
| 157 | |
---|
[521] | 158 | %files |
---|
| 159 | %defattr(-,root,root) |
---|
[2679] | 160 | %doc COPYING ChangeLog README |
---|
[521] | 161 | %{_bindir}/* |
---|
| 162 | %{_libdir}/libmagic.so.* |
---|
| 163 | %{_datadir}/file/* |
---|
| 164 | %{_datadir}/magic* |
---|
| 165 | %{_datadir}/misc/* |
---|
| 166 | %{_mandir}/man[15]/* |
---|
| 167 | |
---|
[2679] | 168 | %files devel |
---|
| 169 | %defattr(-,root,root,-) |
---|
| 170 | %{_libdir}/*.so |
---|
[521] | 171 | %{_includedir}/magic.h |
---|
| 172 | %{_mandir}/man3/* |
---|
| 173 | |
---|
[2679] | 174 | %files static |
---|
| 175 | %defattr(-,root,root,-) |
---|
| 176 | %{_libdir}/*.a |
---|
[521] | 177 | |
---|
[2679] | 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 | |
---|
[521] | 187 | %changelog |
---|
[2730] | 188 | * Sun Feb 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.05-2 |
---|
| 189 | - rebuild package |
---|
| 190 | - fix Patch100 |
---|
| 191 | |
---|
[2679] | 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 | |
---|
[1926] | 197 | * Mon Sep 27 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.21-3 |
---|
[2679] | 198 | - rebuilt with rpm-4.8.1 |
---|
[1926] | 199 | - add environment variable LIBTOOL for make command |
---|
| 200 | |
---|
[521] | 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. |
---|