2006-12-19 00:15:53 +01:00
|
|
|
#
|
2011-06-30 13:08:33 +02:00
|
|
|
# spec file for package file
|
2006-12-19 00:15:53 +01:00
|
|
|
#
|
2011-06-30 13:08:33 +02:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2006-12-19 00:15:53 +01:00
|
|
|
#
|
2008-08-21 18:07:05 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2006-12-19 00:15:53 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-03-21 01:40:23 +01:00
|
|
|
|
2006-12-19 00:15:53 +01:00
|
|
|
Name: file
|
2007-12-06 00:11:22 +01:00
|
|
|
BuildRequires: findutils zlib-devel
|
|
|
|
Url: http://www.darwinsys.com/file/
|
2008-12-15 12:29:51 +01:00
|
|
|
License: BSD 2 Clause
|
2006-12-19 00:15:53 +01:00
|
|
|
Group: Productivity/File utilities
|
2007-12-06 00:11:22 +01:00
|
|
|
AutoReqProv: on
|
2008-11-02 15:40:05 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: file-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2008-04-20 20:36:09 +02:00
|
|
|
# Set Version also in python-magic.spec
|
2011-08-23 16:56:34 +02:00
|
|
|
Version: 5.08
|
|
|
|
Release: 1
|
2006-12-19 00:15:53 +01:00
|
|
|
Summary: A Tool to Determine File Types
|
2011-08-23 16:56:34 +02:00
|
|
|
Source: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
|
2009-12-16 08:52:53 +01:00
|
|
|
Source2: baselibs.conf
|
2006-12-19 00:15:53 +01:00
|
|
|
Patch: file-%{version}.dif
|
2011-06-14 19:53:47 +02:00
|
|
|
Patch1: file-5.07-misc.dif
|
|
|
|
Patch3: file-5.07-exec.dif
|
2008-04-14 19:32:36 +02:00
|
|
|
Patch4: file-4.24-autoconf.dif
|
2006-12-19 00:15:53 +01:00
|
|
|
Patch5: file-4.03-tex.dif
|
2007-03-22 12:06:16 +01:00
|
|
|
Patch7: file-4.20-ssd.dif
|
|
|
|
Patch8: file-4.20-xen.dif
|
2011-06-14 19:53:47 +02:00
|
|
|
Patch9: file-5.07-elf.dif
|
2007-03-22 12:06:16 +01:00
|
|
|
Patch10: file-4.18-printf.dif
|
2011-07-18 12:03:46 +02:00
|
|
|
Patch11: file-5.07-zip.dif
|
2011-06-14 19:53:47 +02:00
|
|
|
Patch12: file-5.07-option.dif
|
2007-08-29 22:26:43 +02:00
|
|
|
Patch13: file-4.21-scribus.dif
|
2007-12-06 00:11:22 +01:00
|
|
|
Patch15: file-4.21-xcursor.dif
|
2008-04-14 19:32:36 +02:00
|
|
|
Patch20: file-4.24-mips.dif
|
|
|
|
Patch22: file-4.24-cromfs.dif
|
2008-05-06 22:19:07 +02:00
|
|
|
Patch24: file-4.24-warn.dif
|
2009-05-06 18:38:39 +02:00
|
|
|
Patch25: file-5.02-javacheck.dif
|
2008-11-28 14:59:05 +01:00
|
|
|
Patch26: file-4.24-solv.dif
|
2011-06-14 19:53:47 +02:00
|
|
|
Patch27: file-5.07-zip2.0.dif
|
|
|
|
Patch28: file-5.07-iso9660.dif
|
|
|
|
Patch29: file-5.07-llvm.dif
|
|
|
|
Patch30: file-5.07-visibility.patch
|
|
|
|
Patch31: file-5.07-biorad.dif
|
|
|
|
Patch32: file-5.07-clicfs.dif
|
2006-12-19 00:15:53 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2007-12-06 00:11:22 +01:00
|
|
|
%global _sysconfdir /etc
|
|
|
|
%global _miscdir %{_datadir}/misc
|
2006-12-19 00:15:53 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
With the file command, you can obtain information on the file type of a
|
|
|
|
specified file. File type recognition is controlled by the file
|
|
|
|
/etc/magic, which contains the classification criteria. This command is
|
|
|
|
used by apsfilter to permit automatic printing of different file types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Mark Moraes <moraes@deshaw.com>
|
|
|
|
Christos Zoulas <christos@deshaw.com>
|
|
|
|
|
|
|
|
%package -n file-devel
|
2008-04-10 14:12:56 +02:00
|
|
|
License: Other uncritical OpenSource License
|
2006-12-19 00:15:53 +01:00
|
|
|
Summary: Include Files and Libraries mandatory for Development
|
2007-12-06 00:11:22 +01:00
|
|
|
Group: Development/Libraries/Other
|
2006-12-19 00:15:53 +01:00
|
|
|
Provides: file:/usr/include/magic.h
|
2009-10-28 01:34:16 +01:00
|
|
|
Requires: file = %{version} glibc-devel
|
2007-12-06 00:11:22 +01:00
|
|
|
AutoReqProv: on
|
2006-12-19 00:15:53 +01:00
|
|
|
|
|
|
|
%description -n file-devel
|
|
|
|
This package contains all necessary include files and libraries needed
|
|
|
|
to develop applications that require the magic "file" interface.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Mark Moraes <moraes@deshaw.com>
|
|
|
|
Christos Zoulas <christos@deshaw.com>
|
|
|
|
|
|
|
|
%prep
|
2008-01-29 01:36:02 +01:00
|
|
|
%setup -q -n file-%{version}
|
2006-12-19 00:15:53 +01:00
|
|
|
%patch1 -p0 -b .misc
|
|
|
|
%patch3 -p0 -b .exec
|
|
|
|
%patch4 -p0 -b .conf
|
|
|
|
%patch5 -p0 -b .tex
|
2007-03-22 12:06:16 +01:00
|
|
|
%patch7 -p0 -b .ssd
|
|
|
|
%patch8 -p0 -b .xen
|
|
|
|
%patch9 -p0 -b .elf
|
|
|
|
%patch10 -p0 -b .prtf
|
2011-07-18 12:03:46 +02:00
|
|
|
%patch11 -p0 -b .zip
|
2007-08-29 22:26:43 +02:00
|
|
|
%patch12 -p0 -b .opt
|
|
|
|
%patch13 -p0 -b .scri
|
2007-12-06 00:11:22 +01:00
|
|
|
%patch15 -p0 -b .xcur
|
2006-12-19 00:15:53 +01:00
|
|
|
%ifarch mips
|
2007-03-22 12:06:16 +01:00
|
|
|
%patch20 -p0 -b .mips
|
2006-12-19 00:15:53 +01:00
|
|
|
%endif
|
2008-04-14 19:32:36 +02:00
|
|
|
%patch22 -p0 -b .cromfs
|
2008-05-06 22:19:07 +02:00
|
|
|
%patch24 -p0 -b .warn
|
2008-08-21 18:07:05 +02:00
|
|
|
%patch25 -p0 -b .javacheck
|
2008-11-28 14:59:05 +01:00
|
|
|
%patch26 -p0 -b .solv
|
2009-05-15 22:42:44 +02:00
|
|
|
%patch27 -p0 -b .zip2.0
|
2009-10-28 01:34:16 +01:00
|
|
|
%patch28 -p0 -b .iso9600
|
2010-04-23 19:10:34 +02:00
|
|
|
%patch29 -p0 -b .llvm
|
2010-11-24 13:22:14 +01:00
|
|
|
%patch30 -p0 -b .vis
|
|
|
|
%patch31 -p0 -b .biorad
|
2011-06-14 19:53:47 +02:00
|
|
|
%patch32 -p0 -b .clicfs
|
2011-08-23 16:56:34 +02:00
|
|
|
%patch -b .0
|
2011-06-14 19:53:47 +02:00
|
|
|
|
2006-12-19 00:15:53 +01:00
|
|
|
%build
|
|
|
|
export LANG=POSIX
|
|
|
|
export LC_ALL=POSIX
|
|
|
|
rm -f Magdir/*,v Magdir/*~
|
|
|
|
rm -f ltcf-c.sh ltconfig ltmain.sh
|
2009-01-29 23:06:12 +01:00
|
|
|
autoreconf -fiv
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS -DHOWMANY=69632"
|
|
|
|
%configure --datadir=%{_miscdir} --disable-static --with-pic --enable-fsect-man5
|
2010-06-28 23:26:43 +02:00
|
|
|
%{__make} %{?_smp_mflags} pkgdatadir='$(datadir)'
|
2008-01-29 01:36:02 +01:00
|
|
|
%if 0%{?build_python_bindings:1}
|
2007-12-06 00:11:22 +01:00
|
|
|
pushd python
|
|
|
|
python setup.py build
|
|
|
|
popd
|
|
|
|
%endif
|
2006-12-19 00:15:53 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
export LANG=POSIX
|
|
|
|
export LC_ALL=POSIX
|
2007-12-06 00:11:22 +01:00
|
|
|
mkdir %{buildroot}/etc
|
|
|
|
make DESTDIR=%{buildroot} install pkgdatadir='$(datadir)'
|
|
|
|
rm -vf %{buildroot}%{_sysconfdir}/magic
|
|
|
|
echo '# Localstuff: file(1) magic(5) for locally observed files' > %{buildroot}%{_sysconfdir}/magic
|
|
|
|
echo '# global magic file is %{_miscdir}/magic(.mgc)' >> %{buildroot}%{_sysconfdir}/magic
|
|
|
|
#install -s dcore %{buildroot}%{_bindir}
|
|
|
|
# Check out that the binary does not bail out:
|
|
|
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
find %{buildroot}%{_bindir}/file %{_bindir}/ /%{_lib}/ %{_libdir}/ | \
|
|
|
|
xargs %{buildroot}%{_bindir}/file -m %{buildroot}%{_miscdir}/magic
|
|
|
|
unset LD_LIBRARY_PATH
|
2009-01-29 23:06:12 +01:00
|
|
|
%{__rm} -f %{buildroot}%{_libdir}/*.la
|
2007-12-06 00:11:22 +01:00
|
|
|
|
2009-01-29 23:06:12 +01:00
|
|
|
%post -p /sbin/ldconfig
|
2007-12-06 00:11:22 +01:00
|
|
|
|
2009-01-29 23:06:12 +01:00
|
|
|
%postun -p /sbin/ldconfig
|
2006-12-19 00:15:53 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr (644,root,root,755)
|
2007-12-06 00:11:22 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/magic
|
|
|
|
#%{_bindir}/dcore
|
|
|
|
%attr(755,root,root) %{_bindir}/file
|
2006-12-19 00:15:53 +01:00
|
|
|
%{_libdir}/lib*.so.*
|
2007-12-06 00:11:22 +01:00
|
|
|
%{_miscdir}/magic
|
|
|
|
%{_miscdir}/magic.mgc
|
2006-12-19 00:15:53 +01:00
|
|
|
%attr(644,root,root) %{_mandir}/man1/file.1.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man5/magic.5.gz
|
|
|
|
|
|
|
|
%files -n file-devel
|
|
|
|
%defattr (644,root,root,755)
|
|
|
|
%{_libdir}/lib*.so
|
2007-12-06 00:11:22 +01:00
|
|
|
%{_includedir}/magic.h
|
2006-12-19 00:15:53 +01:00
|
|
|
%attr(644,root,root) %{_mandir}/man3/libmagic.3.gz
|
|
|
|
|
2007-03-07 01:46:08 +01:00
|
|
|
%changelog
|