file/file.spec

356 lines
12 KiB
RPMSpec

%define pymagic_version 0.1
Name: file
Version: 5.36
Release: 1mamba
Summary: An utility for determining file types
Group: Applications/File
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.darwinsys.com/file
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
Source1: file-magic_local
Patch0: file-4.21-pybuild.patch
Patch1: file-5.00-devdrv.patch
Patch2: file-5.00-mdmp.patch
Patch3: file-5.04-ulaw-segfault.patch
Patch4: file-5.04-ruby-modules.patch
Patch5: file-5.04-core-trim.patch
Patch6: file-5.04-html-regression.patch
Patch7: file-5.04-zmachine-magic-update.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
Requires: libmagic = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%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 libmagic
Summary: A library used by the file utility for determinig file types
Group: Development/Libraries
%description -n libmagic
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.
This package contains the libmagic library.
%package -n libmagic-devel
Summary: The development files for application which use file
Group: Development/Libraries
Requires: libmagic = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes: file-devel
Provides: file-devel = %{?epoch:%epoch:}%{version}-%{release}
%description -n libmagic-devel
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.
This package contains static libraries and header files need for development.
%if "%{stage1}" != "1"
%package -n python-magic
Summary: Python bindings for the libmagic API
Group: Development/Libraries/Python
Requires: libmagic = %{?epoch:%epoch:}%{version}-%{release}
Requires: python >= %python_version
%description -n python-magic
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.
This package contains the Python bindings to allow access to the libmagic API.
%endif
%debug_package
%prep
%setup -q
#%patch0 -p1
#463809
#%patch1 -p1
#485835
#%patch2 -p1
#533245
#%patch3 -p1
#562840
#%patch4 -p1
#566305
#%patch5 -p1
#%patch6 -p1
#%patch7 -p1
#for p in $(find . -name "*.py"); do
# sed -i 's|#!/usr/local/bin/python2.1|#!%{__python}|' $p
# sed -i 's|#!/usr/local/bin/python|#!%{__python}|' $p
#done
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
# --disable-libseccomp: fix "Bad system call" crash with -p option (autospec)
%configure \
--enable-fsect-man5 \
--disable-libseccomp
%make
#cd python
#CFLAGS="%{optflags}" %{__python} setup.py build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeoldinstall
install -D -m 0644 %{S:1} %{buildroot}%{_sysconfdir}/magic
mkdir -p %{buildroot}%{_datadir}/file
cat magic/Magdir/* > %{buildroot}%{_datadir}/misc/magic
ln -s misc/magic %{buildroot}%{_datadir}/magic
#ln -s file/magic.mime %{buildroot}%{_datadir}/magic.mime
ln -s ../magic %{buildroot}%{_datadir}/file/magic
#%if "%{stage1}" != "1"
#cd python
#%{__python} setup.py install -O1 --skip-build --root %{buildroot}
#%endif
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/file
%{_mandir}/man1/*
#%{_mandir}/man4/*
%{_mandir}/man5/magic.5.gz
%{_datadir}/file/magic
%{_datadir}/magic
%{_datadir}/misc/magic
%{_datadir}/misc/magic.mgc
%doc ChangeLog MAINT README
%files -n libmagic
%defattr(-,root,root)
%{_sysconfdir}/magic
%{_libdir}/libmagic.so.*
%files -n libmagic-devel
%defattr(-,root,root)
%{_includedir}/magic.h
%{_libdir}/libmagic.la
%{_libdir}/libmagic.so
%{_mandir}/man3/*
#%if "%{stage1}" != "1"
#%files -n python-magic
#%defattr(-,root,root)
#%{python_sitelib}/Magic_file_extensions-*-py%{python_version}.egg-info
#%{python_sitelib}/magic.py*
#%doc python/README COPYING python/example.py
#%endif
%changelog
* Wed Feb 20 2019 Automatic Build System <autodist@mambasoft.it> 5.36-1mamba
- automatic version update by autodist
* Sat Oct 27 2018 Automatic Build System <autodist@mambasoft.it> 5.35-1mamba
- automatic version update by autodist
* Wed Jul 25 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 5.34-2mamba
- disable libseccomp to fix 'Bad system call' error with option -p (autospec)
* Wed Jul 25 2018 Automatic Build System <autodist@mambasoft.it> 5.34-1mamba
- automatic version update by autodist
* Mon Apr 16 2018 Automatic Build System <autodist@mambasoft.it> 5.33-1mamba
- automatic version update by autodist
* Thu Sep 07 2017 Automatic Build System <autodist@mambasoft.it> 5.32-1mamba
- automatic version update by autodist
* Thu Jun 01 2017 Automatic Build System <autodist@mambasoft.it> 5.31-1mamba
- automatic version update by autodist
* Sun Feb 12 2017 Automatic Build System <autodist@mambasoft.it> 5.30-1mamba
- automatic version update by autodist
* Wed Oct 26 2016 Automatic Build System <autodist@mambasoft.it> 5.29-1mamba
- automatic version update by autodist
* Tue Jun 14 2016 Automatic Build System <autodist@mambasoft.it> 5.28-1mamba
- automatic version update by autodist
* Sat May 14 2016 Automatic Build System <autodist@mambasoft.it> 5.27-1mamba
- automatic version update by autodist
* Sun Apr 17 2016 Automatic Build System <autodist@mambasoft.it> 5.26-1mamba
- automatic version update by autodist
* Sun Dec 13 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 5.25-2mamba
- don't build python-magic in favour of python-magic stand-alone distribution
* Thu Sep 17 2015 Automatic Build System <autodist@mambasoft.it> 5.25-1mamba
- automatic version update by autodist
* Fri Jul 10 2015 Automatic Build System <autodist@mambasoft.it> 5.24-1mamba
- automatic version update by autodist
* Thu Jun 11 2015 Automatic Build System <autodist@mambasoft.it> 5.23-1mamba
- automatic version update by autodist
* Sat Jan 03 2015 Automatic Build System <autodist@mambasoft.it> 5.22-1mamba
- automatic version update by autodist
* Thu Dec 11 2014 Automatic Build System <autodist@mambasoft.it> 5.21-1mamba
- automatic version update by autodist
* Sat Oct 11 2014 Automatic Build System <autodist@mambasoft.it> 5.20-1mamba
- automatic version update by autodist
* Fri Jun 13 2014 Automatic Build System <autodist@mambasoft.it> 5.19-1mamba
- automatic version update by autodist
* Thu Mar 27 2014 Automatic Build System <autodist@mambasoft.it> 5.18-1mamba
- automatic version update by autodist
* Thu Feb 13 2014 Automatic Build System <autodist@mambasoft.it> 5.17-1mamba
- automatic version update by autodist
* Mon Dec 02 2013 Automatic Build System <autodist@mambasoft.it> 5.16-1mamba
- automatic version update by autodist
* Tue Sep 24 2013 Automatic Build System <autodist@mambasoft.it> 5.15-1mamba
- automatic version update by autodist
* Mon Mar 25 2013 Automatic Build System <autodist@mambasoft.it> 5.14-1mamba
- automatic version update by autodist
* Fri Feb 22 2013 Automatic Build System <autodist@mambasoft.it> 5.13-1mamba
- automatic version update by autodist
* Sun Jan 13 2013 Automatic Build System <autodist@mambasoft.it> 5.12-1mamba
- automatic version update by autodist
* Wed Feb 22 2012 Automatic Build System <autodist@mambasoft.it> 5.11-1mamba
- automatic version update by autodist
* Sat Dec 31 2011 Automatic Build System <autodist@mambasoft.it> 5.10-1mamba
- automatic version update by autodist
* Sat Sep 17 2011 Automatic Build System <autodist@mambasoft.it> 5.09-1mamba
- automatic version update by autodist
* Thu Aug 04 2011 Automatic Build System <autodist@mambasoft.it> 5.08-1mamba
- automatic version update by autodist
* Thu May 12 2011 Automatic Build System <autodist@mambasoft.it> 5.07-1mamba
- automatic update by autodist
* Fri Apr 15 2011 Automatic Build System <autodist@mambasoft.it> 5.06-1mamba
- automatic update by autodist
* Thu Feb 17 2011 Automatic Build System <autodist@mambasoft.it> 5.05-1mamba
- automatic update by autodist
* Thu Aug 05 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 5.04-4mamba
- port from devel-gil to devel
- replaced occurrencies of python26 missing macros and requirements into python
* Tue Jul 27 2010 gil <puntogil@libero.it> 5.04-3mamba
- added new sub package python-magic
- edit spec file
* Thu Jul 01 2010 gil <puntogil@libero.it> 5.04-2mamba
- rebuilt (milestone 1)
* Sat Jan 23 2010 Automatic Build System <autodist@mambasoft.it> 5.04-1mamba
- automatic update to 5.04 by autodist
* Thu May 07 2009 Automatic Build System <autodist@mambasoft.it> 5.03-1mamba
- update to 5.03
* Thu Feb 05 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 5.00-1mamba
- automatic update to 5.00 by autodist
* Mon Sep 01 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 4.26-1mamba
- update to 4.26
* Sat Jul 05 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 4.25-1mamba
- update to 4.25
* Tue Jun 03 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 4.24-1mamba
- update to 4.24
* Mon Dec 31 2007 Aleph0 <aleph0@openmamba.org> 4.23-1mamba
- update to 4.23
* Fri Dec 28 2007 Aleph0 <aleph0@openmamba.org> 4.22-1mamba
- update to 4.22
* Fri May 25 2007 Aleph0 <aleph0@openmamba.org> 4.21-1mamba
- update to 4.21
* Fri Mar 02 2007 Davide Madrisan <davide.madrisan@qilinux.it> 4.20-1qilnx
- update to version 4.20 by autospec (security update)
* Sun Jan 28 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19-2qilnx
- put libmagic into a separate package
* Thu Dec 14 2006 Davide Madrisan <davide.madrisan@qilinux.it> 4.19-1qilnx
- update to version 4.19 by autospec
- added %{_sysconfdir}/magic
- man page for libmagic moved to the devel package
* Thu Nov 02 2006 Davide Madrisan <davide.madrisan@qilinux.it> 4.18-1qilnx
- update to version 4.18 by autospec
* Fri Mar 17 2006 Davide Madrisan <davide.madrisan@qilinux.it> 4.17-1qilnx
- update to version 4.17 by autospec
* Thu Sep 29 2005 Stefano Cotta Ramusino <stefano.cotta@qilinux.it> 4.15-1qilnx
- update to version 4.15 by autospec
* Wed Jun 29 2005 Davide Madrisan <davide.madrisan@qilinux.it> 4.14-1qilnx
- update to version 4.14 by autospec
* Mon May 02 2005 Davide Madrisan <davide.madrisan@qilinux.it> 4.13-1qilnx
- update to version 4.13 by autospec
* Tue Dec 14 2004 Davide Madrisan <davide.madrisan@qilinux.it> 4.12-1qilnx
- update to version 4.12 by autospec
- also fixes security issue QSA-2004-062
* Tue Nov 23 2004 Davide Madrisan <davide.madrisan@qilinux.it> 4.11-1qilnx
- update to version 4.11 by autospec
* Tue Jul 27 2004 Davide Madrisan <davide.madrisan@qilinux.it> 4.10-1qilnx
- update to 4.10
* Thu Apr 08 2004 Davide Madrisan <davide.madrisan@qilinux.it> 4.09-1qilnx
- new version rebuild
* Wed Mar 24 2004 Davide Madrisan <davide.madrisan@qilinux.it> 4.08-1qilnx
- new version rebuild
* Wed Feb 25 2004 Davide Madrisan <davide.madrisan@qilinux.it> 4.07-1qilnx
- new version rebuild
* Mon Apr 14 2003 Mirko Cortillaro <mirko.cortillaro@qinet.it> 4.02-1qilnx
- modified file list
* Fri Apr 04 2003 Mirko Cortillaro <mirko.cortillaro@qinet.it>
- write a spec file for file