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