%define major 1 %define libname %mklibname magic %{major} %define develname %mklibname -d magic %define staticname %mklibname -d -s magic Summary: A utility for determining file types Name: file Version: 5.09 Release: %mkrel 1 License: BSD Group: File tools URL: http://www.darwinsys.com/file/ Source0: ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz Patch3: file-4.24-selinux.patch Patch4: file-5.04-oracle.patch Patch7: file-5.05-dump.patch Patch8: file-4.24-berkeleydb.patch Patch9: file-4.20-xen.patch Patch13: file-5.05-images.patch Patch14: file-4.20-apple.patch Patch19: file-5.00-format-strings.patch Requires: %{libname} = %{version} BuildRequires: zlib-devel BuildRequires: python-devel Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %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. %package -n %{libname} Group: System/Libraries Summary: Shared library for handling magic files %description -n %{libname} 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. Libmagic is a library for handlig the so called magic files the 'file' command is based on. %package -n %develname Summary: Development files to build applications that handle magic files Group: Development/C Requires: %{libname} = %{version} Provides: libmagic-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: magic-devel = %{version}-%{release} Obsoletes: %mklibname -d magic 1 %description -n %develname 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. Libmagic is a library for handlig the so called magic files the 'file' command is based on. %package -n %staticname Summary: Static library to build applications that handle magic files Group: Development/C Requires: %develname = %{version} Provides: libmagic-static-devel = %{version}-%{release} Provides: magic-static-devel = %{version}-%{release} Obsoletes: %mklibname -s -d magic 1 %description -n %staticname 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. Libmagic is a library for handlig the so called magic files the 'file' command is based on. %package -n python-magic Summary: Python module to use libmagic Group: Development/Python BuildArch: noarch Requires: %name >= %version-%release %description -n python-magic Libmagic is a library for handlig the so called magic files the 'file' command is based on. This package contains the python binding for libmagic. %prep %setup -q %patch3 -p1 -b .selinux~ %patch4 -p1 -b .oracle~ %patch7 -p1 -b .dump~ %patch8 -p1 -b .berkeley~ %patch9 -p1 -b .xen~ %patch13 -p1 -b .images~ %patch14 -p0 -b .apple~ #patch 3 autoreconf -fi #cp %{SOURCE1} magic.mime %build CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \ %configure2_5x %make cd python python setup.py build cd - %install rm -rf %{buildroot} %makeinstall_std # install one missing header file install -m0644 src/file.h %{buildroot}%{_includedir}/ cd python python setup.py install --prefix=%{buildroot}/%{_prefix} cd - %if %mdkversion < 200900 %post -n %{libname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %{libname} -p /sbin/ldconfig %endif %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc README MAINT ChangeLog %{_bindir}/* %{_datadir}/misc/* %{_mandir}/man1/* %{_mandir}/man4/* %files -n %{libname} %defattr(-,root,root) %{_libdir}/*.so.%{major}* %files -n %develname %defattr(-,root,root) %{_libdir}/*.so %attr(644,root,root) %{_libdir}/*.la %{_includedir}/* %{_mandir}/man3/* %files -n %staticname %defattr(-,root,root) %{_libdir}/*.a %files -n python-magic %defattr(-,root,root) %doc python/README python/example.py %{py_puresitedir}/* %changelog * Sat Sep 17 2011 Götz Waschk <waschk@mandriva.org> 5.09-1 + Revision: 700175 - new version * Fri Aug 05 2011 Götz Waschk <waschk@mandriva.org> 5.08-1 + Revision: 693271 - new version * Wed May 11 2011 Funda Wang <fwang@mandriva.org> 5.07-1 + Revision: 673470 - new version 5.07 * Sat Apr 16 2011 Funda Wang <fwang@mandriva.org> 5.06-1 + Revision: 653256 - New version 5.06 use upstream provided lzma and xz detection * Wed Jan 19 2011 Götz Waschk <waschk@mandriva.org> 5.05-1 + Revision: 631671 - new version - drop patches 0,6,12,16 - rediff patches 7,13,17,18 - make python module noarch * Fri Oct 29 2010 Michael Scherer <misc@mandriva.org> 5.04-2mdv2011.0 + Revision: 590006 - rebuild for python 2.7 * Sat Jan 23 2010 Funda Wang <fwang@mandriva.org> 5.04-1mdv2010.1 + Revision: 495189 - rediff oracle patch - New version 5.04 - rediff ooffice patch * Sun Oct 11 2009 Frederik Himpe <fhimpe@mandriva.org> 5.03-3mdv2010.0 + Revision: 456632 - Bump release so that it's higher than the one in 2009.1 updates + Götz Waschk <waschk@mandriva.org> - fix URL * Wed May 27 2009 Götz Waschk <waschk@mandriva.org> 5.03-2mdv2010.0 + Revision: 380178 - fix data dir (blino) * Thu May 07 2009 Frederik Himpe <fhimpe@mandriva.org> 5.03-1mdv2010.0 + Revision: 373023 - update to new version 5.03 * Tue May 05 2009 Oden Eriksson <oeriksson@mandriva.com> 5.02-1mdv2010.0 + Revision: 372197 - 5.02 (fixes CVE-2009-1515) * Sun May 03 2009 Frederik Himpe <fhimpe@mandriva.org> 5.01-1mdv2010.0 + Revision: 371017 - Update to new version 5.01 - Rediff lzma patch + Per Ãyvind Karlsen <peroyvind@mandriva.org> - add '~' at end of patch suffixes to avoid possible confusions and ensure proper 'ls' coloring * Wed Feb 04 2009 Götz Waschk <waschk@mandriva.org> 5.00-1mdv2009.1 + Revision: 337343 - new version - update patch 19 + Per Ãyvind Karlsen <peroyvind@mandriva.org> - new lzma format has been renamed to xz, update magic accordingly * Fri Dec 26 2008 Oden Eriksson <oeriksson@mandriva.com> 4.26-2mdv2009.1 + Revision: 319173 - rediffed some fuzzy pathes - fix build with -Werror=format-security (P19) * Mon Sep 01 2008 Frederik Himpe <fhimpe@mandriva.org> 4.26-1mdv2009.0 + Revision: 278536 - update to new version 4.26 * Wed Jul 16 2008 Götz Waschk <waschk@mandriva.org> 4.25-1mdv2009.0 + Revision: 236251 - new version - drop patch 10 + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Wed Apr 09 2008 Götz Waschk <waschk@mandriva.org> 4.24-1mdv2009.0 + Revision: 192489 - new version - drop source 1 - update patches 3,6,7,8,10,16 - drop patches 5,15 - update file list * Wed Jan 16 2008 David Walluck <walluck@mandriva.org> 4.23-2mdv2008.1 + Revision: 153586 - Provides: magic-devel and magic-static-devel * Sun Jan 13 2008 Götz Waschk <waschk@mandriva.org> 4.23-1mdv2008.1 + Revision: 151056 - new version - new devel name - update patches 7,15,18 - drop patch 11 + Thierry Vignaud <tv@mandriva.org> - rebuild - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <blino@mandriva.org> - restore BuildRoot + Per Ãyvind Karlsen <peroyvind@mandriva.org> - update lzma patch with an improved one from Anders F Bj?\195?\182rklund * Fri Jun 08 2007 Per Ãyvind Karlsen <peroyvind@mandriva.org> 4.21-2mdv2008.0 + Revision: 37591 - fix path in P18 (I suck) - add support for future LZMA format (P18) * Sun Jun 03 2007 Götz Waschk <waschk@mandriva.org> 4.21-1mdv2008.0 + Revision: 34950 - new version - rediff patches 4,12 - drop patch 2 + Per Ãyvind Karlsen <peroyvind@mandriva.org> - add lzma support (P17)