%define __libtoolize : Summary: A utility for determining file types. Summary(ja): ファイルの種類を判別するユーティリティー Name: file Version: 5.43 Release: 1%{?_dist_release} Group: system Vendor: Project Vine Distribution: Vine Linux Packager: daisuke License: BSD URL: http://www.darwinsys.com/file/ # master site is toooooooooooooooooo slow Source0: http://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz # Addtional magic file for Vine Source10: magic.printer-j # Upstream says it's up to distributions to add a way to support local-magic. Patch0: file-localmagic.patch # not yet upstream Patch1: file-4.17-rpm-name.patch Patch2: file-5.04-volume_key.patch # Vine Patch1000: file-5.14-magicbuild-fix.patch Buildroot: %{_tmppath}/%{name}-%{version}-root #BuildRequires: automake #BuildRequires: autoconf BuildRequires: zlib-devel Obsoletes: file-static %description The file command is used to identify a particular file according to the type of data contained by the file. File can identify many different file types, including ELF binaries, system libraries, RPM packages, and different graphics formats. You should install the file package, since the file command is such a useful utility. %description -l ja file コマンドは、ファイルに含まれるデータの種類によって各ファイルが どのようなファイルかを判定するために使います。file は ELF バイナリ、シ ステムライブラリ、RPM パッケージ、そして様々なグラフィックフォーマット を含む、多くの異なるファイルの種類を見分けることができます。 %package devel Summary: Libraries and header files for file development Summary(ja): libmagic の開発用ファイル Group: programming Requires: %{name} = %{version}-%{release} %description devel The file-devel package contains the header files and libmagic library necessary for developing programs using libmagic. %package -n python-magic Summary: Python bindings for the libmagic API Group: programming BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: python-rpm-macros Requires: %{name} = %{version}-%{release} %description -n python-magic This package contains the Python bindings to allow access to the libmagic API. The libmagic library is also used by the familiar file(1) command. %package -n python3-magic Summary: Python bindings for the libmagic API Group: programming BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-rpm-macros Requires: %{name} = %{version}-%{release} %description -n python3-magic This package contains the Python bindings to allow access to the libmagic API. The libmagic library is also used by the familiar file(1) command. %debug_package %prep %setup -q %autopatch -p1 cat %{SOURCE10} >> ./magic/Localstuff iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_ touch -r doc/libmagic.man doc/libmagic.man_ mv doc/libmagic.man_ doc/libmagic.man %build autoreconf -fiv CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \ %configure --enable-fsect-man5 --disable-rpath # remove hardcoded library paths from local libtool sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{name}-%{version}/src/.libs make cd python %py_build %py3_build %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5 mkdir -p $RPM_BUILD_ROOT%{_datadir}/misc mkdir -p $RPM_BUILD_ROOT%{_datadir}/file make install DESTDIR=$RPM_BUILD_ROOT cat magic/Magdir/* > ${RPM_BUILD_ROOT}%{_datadir}/misc/magic ln -s misc/magic ${RPM_BUILD_ROOT}%{_datadir}/magic ##ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/file/magic cd python %py_install %py3_install %{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/%{name} # LIBTOOL=/usr/bin/libtool #ln -s file/magic ${RPM_BUILD_ROOT}%{_datadir}/magic #ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime #ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/misc/magic #{ cd ${RPM_BUILD_ROOT} # strip .%{_bindir}/file # cp %SOURCE1 .%{_datadir}/magic.mime #} # remove unused files rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la %ifarch x86_64 %check export LD_LIBRARY_PATH=$PWD/src/.libs make -C tests check %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %license COPYING %doc ChangeLog README %{_bindir}/* %{_libdir}/libmagic.so.* %{_datadir}/file/* %{_datadir}/magic* %{_datadir}/misc/* %{_mandir}/man[15]/* %files devel %defattr(-,root,root,-) %{_libdir}/*.so %{_libdir}/pkgconfig/* %{_includedir}/magic.h %{_mandir}/man3/* %files -n python-magic %defattr(-, root, root, -) %license python/LICENSE %doc python/README* python/example.py %{python_sitelib}/magic.py %{python_sitelib}/magic.pyc %{python_sitelib}/magic.pyo %{python_sitelib}/*egg-info %files -n python3-magic %defattr(-, root, root, -) %license python/LICENSE %doc python/README* python/example.py %{python3_sitelib}/* %changelog * Sun Oct 02 2022 Tomohiro "Tomo-p" KATO 5.43-1 - new upstream release. * Thu Aug 12 2021 Tomohiro "Tomo-p" KATO 5.40-2 - renumbered patches. - imported Patch3-5 from upstream. * Wed Apr 21 2021 Tomohiro "Tomo-p" KATO 5.40-1 - new upstream release. - dropped ldconfig scriptlets. * Wed Feb 17 2021 Tomohiro "Tomo-p" KATO 5.39-1 - new upstream release. - dropped Patch14 and 9000: fixed in upstream. * Sun Oct 27 2019 Tomohiro "Tomo-p" KATO 5.37-2 - added Patch9000. * Sat Oct 19 2019 Tomohiro "Tomo-p" KATO 5.37-1 - new upstream release. - added python3 support. - updated Patch0. - dropped Patch1, 5-17 and 100: fixed in upstream. - imported Patch14 from rawhide. * Thu Jul 28 2016 Tomohiro "Tomo-p" KATO 5.28-1 - new upstream release. - dropped Patch200: fixed in upstream. - updated patches. - imported Patch15,17 and 100. * Sat Nov 15 2014 Satoshi IWAMOTO 5.20-1 - new upstream release - update/drop patches based on fc22 * Fri Oct 24 2014 Ryoichi INAGAKI 5.14-7 - reflected 6.0 updates and bumped release * Thu Sep 11 2014 Satoshi IWAMOTO 5.14-6 - drop patch230 (moved to patch320) - add Patch240 for fix CVE-2014-0207 - add Patch250 for fix CVE-2014-0237 - add Patch260 for fix CVE-2014-0238 - add Patch270 for fix CVE-2014-3478 - add Patch280 for fix CVE-2014-3479 - add Patch290 for fix CVE-2014-3480 - add Patch300 for fix CVE-2014-3487 - add Patch310 for fix CVE-2014-3538 - add Patch320 for fix CVE-2014-3587 These patches are from debian/ubuntu, thanks. * Thu Aug 28 2014 Satoshi IWAMOTO 5.14-5 - add patch230 for fix CVE-2014-3587 (cdf_read_property_info) * Thu Mar 27 2014 Satoshi IWAMOTO 5.14-4 - add patch110,220 for fix regression of CVE-2014-2270 * Wed Mar 12 2014 Satoshi IWAMOTO 5.14-3 - add patch210 for fix CVE-2014-2270 * Thu Feb 20 2014 Satoshi IWAMOTO 5.14-2 - add patch200 for fix CVE-2014-1943 * Sun Jul 20 2014 Yoji TOYODA 5.14-2 - rebuild with VineSeed environment * Sun Sep 22 2013 Satoshi IWAMOTO 5.14-1 - new upstream reelase - add patch100 to fix build error - remove -static subpackage and add Obs: file-static - fix old changelog date... * Thu Nov 29 2012 Daisuke SUZUKI 5.11-1 - new upstream reelase - drop all local patches - import fedora patches * Wed Feb 15 2012 Yoji TOYODA 5.05-3 - rebuild with python-2.7.2 * Sun Feb 20 2011 Yoji TOYODA 5.05-2 - rebuild package - fix Patch100 * Sat Feb 12 2011 Ryoichi INAGAKI 5.05-1 - new upstream release - updated Vine patches (but Patch100 has not been ported yet...) - split to devel and static subpackcages * Mon Sep 27 2010 Yoji TOYODA 4.21-3 - rebuilt with rpm-4.8.1 - add environment variable LIBTOOL for make command * Fri Sep 26 2008 Shu KONNO 4.21-2 - spec in utf-8 - removed *.la * Mon May 12 2008 Ryoichi INAGAKI 4.21-1 - applied new versioning policy * Tue Dec 11 2007 Daisuke SUZUKI 4.21-0vl1 - new upstream release - import debian/fedora patches - drop obsolete vine magic. * Thu Jun 14 2007 Satoshi IWAMOTO 4.09-0vl3 - rebuild for VineSeed with new tool chain * Thu May 31 2007 Satoshi IWAMOTO 4.09-0vl2.2 - add patch110 for fix CVE-2007-2799 - add zlib-devel to BuildPreReq tag * Mon Mar 26 2007 Satoshi IWAMOTO 4.09-0vl2.1 - add patch100 for fix CVE-2007-1536 * Sun Sep 10 2006 Ryoichi INAGAKI 4.09-0vl2 - changed Group to Applications/System * Sun Apr 18 2004 Daisuke SUZUKI 4.09-0vl1 - new upstream release - update vine patches * Wed Sep 10 2003 Tomoya TAKA 4.03-0vl2 - update Patch10, use 'size_t' in src/jcode.[ch] * Tue Sep 09 2003 Ryoichi INAGAKI 4.03-0vl1 - update to 4.03 - update Patch0, 1, 10 for 4.03 - s/Copyright/License/ * Mon May 12 2003 Ryoichi INAGAKI 4.02-1vl1 - update to 4.02 - update Vine patches for 4.02 * Sun Mar 9 2003 Daisuke SUZUKI 3.41-0vl1 - new upstream release - fixed security bug (http://www.idefense.com/advisory/03.04.03.txt) - remove unneeded patches. - update Vine patches for 3.41 * Mon Apr 1 2002 Jun Nishii 3.37-0vl2 - added NPDL2 data [Vine:02348] * Fri Feb 08 2002 Daisuke SUZUKI 3.37-0vl1 - update to 3.37 * Sun Jul 15 2001 MATSUBAYASHI 'Shaolin' Kohji - 3.35-0vl3 - disable some entries in elf for problems on big-endian archs * Wed Jun 6 2001 Jun Nishii - file-3.35-0vl1 - ver.up - added %doc * Thu Jan 11 2001 Jun Nishii - file-3.33-1vl4 - more fix and clean up jtext patch (file-3.33-vinejtext.patch) * Thu Jan 11 2001 Jun Nishii - file-3.33-1vl3 - fix again jtext patch (file-3.33-vinejtext.patch) - added file-3.33-vinenames.patch to avoid miss-judgement * Wed Jan 10 2001 Jun Nishii - file-3.33-1vl2 - update jtext patch (file-3.33-vinejtext.patch) * Mon Jan 8 2001 Jun Nishii - file-3.33-1vl1 - modify description-ja and spec * Sun Jul 09 2000 MATSUBAYASHI 'Shaolin' Kohji - file-3.28-2vl2 - fixed %files section to handle compressed man pages * Tue Jun 13 2000 Lisa Sagami - marged RH 3.28-2 and Vine 3.27-3vl3 * Wed Feb 16 2000 Cristian Gafton - add ia64 patch from rth * Mon Feb 7 2000 Bill Nottingham - handle compressed manpages - update to 3.28 * Mon Sep 6 1999 Norihito Ohmori - Japanese Text detection bug fix. (by Toru Hoshina ) * Fri Aug 27 1999 Norihito Ohmori - patch dues not apply bug. * Thu Aug 26 1999 Norihito Ohmori - not need kcc (Thanks for Toru Hoshina ) - ASCII data and Shift JIS data detected in Japanese Text Detection bug fix. * Mon Aug 23 1999 Jeff Johnson - identify ELF stripped files correctly (#4665). - use SPARC (not sparc) consistently throughout (#4665). - add entries for MS Office files (#4665). * Thu Aug 12 1999 Jeff Johnson - diddle magic so that *.tfm files are identified correctly. * Tue Jul 6 1999 Jeff Johnson - update to 3.27. * Mon Mar 22 1999 Preston Brown - experimental support for realmedia files added * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 5) * Fri Mar 19 1999 Jeff Johnson - strip binary. * Fri Nov 27 1998 Jakub Jelinek - add SPARC V9 magic. * Tue Nov 10 1998 Jeff Johnson - update to 3.26. * Mon Aug 24 1998 Jeff Johnson - update to 3.25. - detect gimp XCF versions. * Thu May 07 1998 Prospector System - translations modified for de, fr, tr * Wed Apr 08 1998 Erik Troan - updated to 3.24 - buildrooted * Mon Jun 02 1997 Erik Troan - built against glibc * Mon Mar 31 1997 Erik Troan - Fixed problems caused by 64 bit time_t. * Thu Mar 06 1997 Michael K. Johnson - Improved recognition of Linux kernel images.