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
|
|
|
#
|
2012-01-16 15:23:30 +01:00
|
|
|
# Copyright (c) 2012 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/
|
|
|
|
#
|
|
|
|
|
2011-10-02 16:37:56 +02:00
|
|
|
|
2006-12-19 00:15:53 +01:00
|
|
|
Name: file
|
2012-03-23 15:41:17 +01:00
|
|
|
BuildRequires: findutils
|
2011-10-02 16:37:56 +02:00
|
|
|
BuildRequires: libtool
|
2012-03-23 15:41:17 +01:00
|
|
|
BuildRequires: zlib-devel
|
2007-12-06 00:11:22 +01:00
|
|
|
Url: http://www.darwinsys.com/file/
|
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
|
2012-03-23 15:41:17 +01:00
|
|
|
Version: 5.11
|
|
|
|
Release: 0
|
2006-12-19 00:15:53 +01:00
|
|
|
Summary: A Tool to Determine File Types
|
2012-03-23 15:41:17 +01:00
|
|
|
License: BSD-2-Clause
|
|
|
|
Group: Productivity/File utilities
|
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
|
2012-03-23 15:41:17 +01:00
|
|
|
Patch: file-5.10.dif
|
2011-06-14 19:53:47 +02:00
|
|
|
Patch1: file-5.07-misc.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
|
2012-01-16 15:23:30 +01:00
|
|
|
Patch30: file-5.10-visibility.patch
|
2011-06-14 19:53:47 +02:00
|
|
|
Patch31: file-5.07-biorad.dif
|
|
|
|
Patch32: file-5.07-clicfs.dif
|
2011-11-05 21:03:46 +01:00
|
|
|
Patch33: file-ocloexec.patch
|
2012-08-16 19:40:37 +02:00
|
|
|
Patch34: file-endian.patch
|
2012-09-18 13:01:25 +02:00
|
|
|
Patch35: file-5.11-nitpick.dif
|
2012-11-26 16:30:11 +01:00
|
|
|
Patch36: file-5.11-extfs-minix.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.
|
|
|
|
|
2012-10-30 14:31:55 +01:00
|
|
|
%package -n libmagic-data
|
|
|
|
Summary: The magic files for libmagic to use
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
|
|
|
|
%description -n libmagic-data
|
|
|
|
This package contains the basic magic files that libmagic reads and uses
|
|
|
|
to estimate a file's type.
|
|
|
|
|
|
|
|
%package -n libmagic1
|
|
|
|
Summary: Library with file's functionality
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
Requires: libmagic-data = %{version}
|
|
|
|
|
|
|
|
%description -n libmagic1
|
|
|
|
This library reads magic files and detects file types. Used by file command
|
|
|
|
|
2006-12-19 00:15:53 +01:00
|
|
|
%package -n file-devel
|
|
|
|
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
|
2012-03-23 15:41:17 +01:00
|
|
|
Requires: glibc-devel
|
2012-10-30 14:31:55 +01:00
|
|
|
Requires: libmagic1 = %{version}
|
2011-10-02 16:37:56 +02:00
|
|
|
|
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.
|
|
|
|
|
|
|
|
%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
|
|
|
|
%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
|
2012-01-16 15:23:30 +01:00
|
|
|
%patch33 -p0 -b .clexe
|
2012-09-18 13:01:25 +02:00
|
|
|
%patch34 -p0 -b .endian
|
|
|
|
%patch35 -p0 -b .nitpick
|
2012-11-26 16:30:11 +01:00
|
|
|
%patch36 -p0 -b .extnotminix
|
2011-08-23 16:56:34 +02:00
|
|
|
%patch -b .0
|
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"
|
2011-11-05 21:03:46 +01:00
|
|
|
%configure --disable-silent-rules --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
|
2012-08-22 16:36:44 +02:00
|
|
|
%{nil install -s dcore %{buildroot}%{_bindir}}
|
2007-12-06 00:11:22 +01:00
|
|
|
# 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
|
|
|
|
2012-10-30 14:31:55 +01:00
|
|
|
%post -n libmagic1 -p /sbin/ldconfig
|
2007-12-06 00:11:22 +01:00
|
|
|
|
2012-10-30 14:31:55 +01:00
|
|
|
%postun -n libmagic1 -p /sbin/ldconfig
|
2006-12-19 00:15:53 +01:00
|
|
|
|
2012-10-30 14:31:55 +01:00
|
|
|
%files -n libmagic1
|
2006-12-19 00:15:53 +01:00
|
|
|
%defattr (644,root,root,755)
|
|
|
|
%{_libdir}/lib*.so.*
|
2012-10-30 14:31:55 +01:00
|
|
|
|
|
|
|
%files -n libmagic-data
|
|
|
|
%defattr (644,root,root,755)
|
|
|
|
%config(noreplace) %{_sysconfdir}/magic
|
2007-12-06 00:11:22 +01:00
|
|
|
%{_miscdir}/magic
|
|
|
|
%{_miscdir}/magic.mgc
|
2012-08-22 16:36:44 +02:00
|
|
|
%doc %{_mandir}/man5/magic.5.gz
|
2012-10-30 14:31:55 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr (644,root,root,755)
|
|
|
|
%{nil %{_bindir}/dcore}
|
|
|
|
%attr(755,root,root) %{_bindir}/file
|
|
|
|
%doc %{_mandir}/man1/file.1.gz
|
2012-09-18 13:01:25 +02:00
|
|
|
%doc COPYING AUTHORS NEWS ChangeLog
|
2006-12-19 00:15:53 +01:00
|
|
|
|
|
|
|
%files -n file-devel
|
|
|
|
%defattr (644,root,root,755)
|
|
|
|
%{_libdir}/lib*.so
|
2007-12-06 00:11:22 +01:00
|
|
|
%{_includedir}/magic.h
|
2012-08-22 16:36:44 +02:00
|
|
|
%doc %{_mandir}/man3/libmagic.3.gz
|
|
|
|
%doc README COPYING AUTHORS NEWS ChangeLog
|
2006-12-19 00:15:53 +01:00
|
|
|
|
2007-03-07 01:46:08 +01:00
|
|
|
%changelog
|