Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > ed485100764b5c157a4bec2d2d16da5e > files > 15

file-4.26-1mdv2009.0.src.rpm

%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:	4.26
Release:	%mkrel 1
License:	BSD 
Group:		File tools
URL:		ftp://ftp.astron.com/pub/file/
Source0:	ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
# gw fix python linkage
Patch0:		file-4.16-python.patch
Patch3:		file-4.24-selinux.patch
Patch4:		file-4.21-oracle.patch
Patch6:         file-4.24-ooffice.patch
Patch7:		file-4.24-dump.patch
Patch8:		file-4.24-berkeleydb.patch
Patch9:		file-4.20-xen.patch
Patch12:	file-4.21-svn.patch
Patch13:	file-4.20-images.patch
Patch14:	file-4.20-apple.patch
Patch16:	file-4.24-audio.patch
Patch17:	file-4.20-add-lzma.patch
Patch18:	file-4.23-lzma-cointainer.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

%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
%patch0 -p1
%patch3 -p1 -b .selinux
%patch4 -p1 -b .oracle
%patch6 -p1 -b .ooffice
%patch7 -p1 -b .dump
%patch8 -p1 -b .berkeley
%patch9 -p1 -b .xen
%patch12 -p1 -b .svn
%patch13 -p1 -b .images
%patch14 -p1 -b .apple
%patch16 -p1 -b .audio
%patch17 -p1 -b .lzma
%patch18 -p1 -b .lzma_container

#patch 3
autoreconf

#cp %{SOURCE1} magic.mime

%build
CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \
%configure2_5x \
    --datadir=%{_datadir}/misc

%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_platsitedir}/*



%changelog
* 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 <tvignaud@mandriva.com>
    - rebuild
    - kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - 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)


* Sat Mar 10 2007 Giuseppe Ghibò <ghibo@mandriva.com> 4.20-1mdv2007.1
+ Revision: 140963
- Release 4.20.
- Removed Patch1 (merged upstream).
- Added Patch2 (merged from ftp://ftp.astron.com/pub/file/)
- Merged Patch3 (selinux), Patch4 (oracle filesystem), Patch5 (powerpoint), Patch6 (openoffice, RH#223297), Patch7 (dump, RH#149868), Patch8 (cracklib, RH#168917), Patch9 (xen), Patch10 (clamav, RH#192406), Patch11 (bash, RH#202185), Patch12 (svn), Patch13 (images), Patch14 (apple) from Fedora, Patch15 (misc/magic) from Fedora/Debian.
- Partially merged Patch16 (audio) from OpenSUSE.

* Tue Jan 09 2007 Götz Waschk <waschk@mandriva.org> 4.19-1mdv2007.1
+ Revision: 106412
- new version

* Thu Dec 14 2006 Nicolas Lécureuil <neoclust@mandriva.org> 4.17-6mdv2007.1
+ Revision: 96895
- Rebuild against new python

* Wed Dec 13 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 4.17-5mdv2007.1
+ Revision: 96413
- Recognize Cell SPU objects. Cosmetics for 64-bit PowerPC.

* Tue Oct 31 2006 Oden Eriksson <oeriksson@mandriva.com> 4.17-4mdv2007.1
+ Revision: 74556
- rebuild
- bzip2 cleanup
- bunzip patches and sources
- Import file

* Mon May 15 2006 Stefan van der Eijk <stefan@eijk.nu> 4.17-2mdk
- rebuild for sparc

* Thu Mar 16 2006 Götz Waschk <waschk@mandriva.org> 4.17-1mdk
- drop patch 2

* Thu Mar 16 2006 Götz Waschk <waschk@mandriva.org> 4.17-1mdk
- New release 4.17

* Fri Feb 10 2006 Götz Waschk <waschk@mandriva.org> 4.16-3mdk
- fix python linkage

* Thu Feb 09 2006 Michael Scherer <misc@mandriva.org> 4.16-2mdk
- mkrel
- create python subpackage

* Wed Oct 19 2005 Götz Waschk <waschk@mandriva.org> 4.16-1mdk
- New release 4.16

* Sun Oct 02 2005 Abel Cheung <deaddog@mandriva.org> 4.15-1mdk
- New release 4.15
- Drop upstream patches

* Sat Jul 09 2005 Götz Waschk <waschk@mandriva.org> 4.14-2mdk
- add patch for bug 16740

* Thu Jul 07 2005 Götz Waschk <waschk@mandriva.org> 4.14-1mdk
- New release 4.14

* Thu Jun 02 2005 Abel Cheung <deaddog@mandriva.org> 4.13-2mdk
- Drop Patch1 (already merged)
- Source2: mup support I submitted upstream
- Remove rpmlint warnings

* Mon Feb 14 2005 Götz Waschk <waschk@linux-mandrake.com> 4.13-1mdk
- New release 4.13

* Thu Nov 25 2004 Goetz Waschk <waschk@linux-mandrake.com> 4.12-1mdk
- New release 4.12

* Wed Nov 24 2004 Goetz Waschk <waschk@linux-mandrake.com> 4.11-1mdk
- New release 4.11

* Tue Sep 21 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.10-2mdk
- fix broken mklibname introduced in 4.07-1mdk

* Fri Aug 06 2004 Michael Scherer <misc@mandrake.org> 4.10-1mdk
- New release 4.10

* Mon May 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.09-2mdk
- add one missing header file
- misc spec file fixes

* Sat May 08 2004 Götz Waschk <waschk@linux-mandrake.com> 4.09-1mdk
- add source URL
- New release 4.09

* Sun Apr 04 2004 Götz Waschk <waschk@linux-mandrake.com> 4.08-1mdk
- new version