Group :: File tools
RPM: file
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Name: file
Version: 4.13
Release: alt1
Summary: A utility for determining file types
License: BSD-like
Group: File tools
Source: ftp://ftp.astron.com/pub/%name/%name-%version.tar.bz2
Source1: magic.local
Patch1: file-4.13-deb-4.12-1-alt.patch
Patch11: file-4.02-rh-magic-selinux.patch
Patch12: file-4.10-rh-alt-elf.patch
Patch13: file-4.13-rh-alt-compress.patch
Patch21: file-4.07-alt-magic-mcrypt.patch
Patch22: file-4.07-alt-magic-mng.patch
Patch23: file-4.10-alt-magic-macintosh.patch
Patch24: file-4.12-alt-magic-perl.patch
Patch25: file-4.10-alt-magic-audio.patch
Patch26: file-4.07-mdk-alt-magic2mime.patch
Patch27: file-4.10-alt-fixes.patch
Patch28: file-4.07-alt-mcheck-regcomp.patch
Patch29: file-4.10-alt-configure.patch
Summary(ru_RU.KOI8-R): Утилита для определения типов файлов
Requires: libmagic = %version-%release
BuildPreReq: zlib-devel
%def_enable static
%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.
%package -n libmagic
Summary: Shared library for handling magic files
Group: System/Libraries
%description -n libmagic
This package contains shared library for handling magic files.
%package -n libmagic-devel
Summary: Development files to build applications that handle magic files
Group: Development/C
Requires: libmagic = %version-%release
%description -n libmagic-devel
This package contains development files to build applications that handle
magic files.
%package -n libmagic-devel-static
Summary: Static library to build statically linked applications that handle magic files
Group: Development/C
Requires: libmagic-devel = %version-%release
%description -n libmagic-devel-static
This package contains static library to build statically linked
applications that handle magic files.
%prep
%setup -q
%patch1 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
find -type f -name \*.orig -delete -print
%build
%{?_disable_static:export lt_cv_prog_cc_static_works=no}
%{?_enable_static:export lt_cv_prog_cc_static_works=yes}
autoreconf -fisv
%configure --enable-fsect-man5 %{subst_enable static}
%__grep -FZl sparc magic/Magdir/* |
xargs -r0 %__subst -p 's/sparc/SPARC/g' --
# SMP-incompatible build.
%make
%install
%makeinstall
%__install -pDm644 doc/magic.5 $RPM_BUILD_ROOT%_man5dir/magic.5
%__install -pDm644 $RPM_SOURCE_DIR/magic.local $RPM_BUILD_ROOT%_sysconfdir/magic
# Test for correct identification of Perl scripts
if [ -r "%_libdir/perl5" ] &&
find "%_libdir/perl5" -type f -name '*.p[lmh]' |
$RPM_BUILD_ROOT%_bindir/file -m "$RPM_BUILD_ROOT%_datadir/file/magic" -b -f - 2>/dev/null |
%__grep -vq text
then
cat >&2 <<EOF
This version of find appears to misclassify some Perl scripts
as binary files. Please fix this and try again.
EOF
exit 1
fi
# Provide %_datadir/magic/ for compatibility.
%__mkdir_p $RPM_BUILD_ROOT%_datadir/magic
%__ln_s ../file/magic{,.mime} $RPM_BUILD_ROOT%_datadir/magic/
%post -n libmagic -p %post_ldconfig
%postun -n libmagic -p %postun_ldconfig
%files
%config(noreplace) %_sysconfdir/magic
%_bindir/*
%_datadir/%name
%_datadir/magic
%_man1dir/*
%_man5dir/*
%doc ChangeLog LEGAL.NOTICE MAINT README
%files -n libmagic
%_libdir/*.so.*
%files -n libmagic-devel
%_libdir/*.so
%_includedir/*
%_man3dir/*
%if_enabled static
%files -n libmagic-devel-static
%_libdir/*.a
%endif
%changelog
…
Full changelog you can see here
Version: 4.13
Release: alt1
Summary: A utility for determining file types
License: BSD-like
Group: File tools
Source: ftp://ftp.astron.com/pub/%name/%name-%version.tar.bz2
Source1: magic.local
Patch1: file-4.13-deb-4.12-1-alt.patch
Patch11: file-4.02-rh-magic-selinux.patch
Patch12: file-4.10-rh-alt-elf.patch
Patch13: file-4.13-rh-alt-compress.patch
Patch21: file-4.07-alt-magic-mcrypt.patch
Patch22: file-4.07-alt-magic-mng.patch
Patch23: file-4.10-alt-magic-macintosh.patch
Patch24: file-4.12-alt-magic-perl.patch
Patch25: file-4.10-alt-magic-audio.patch
Patch26: file-4.07-mdk-alt-magic2mime.patch
Patch27: file-4.10-alt-fixes.patch
Patch28: file-4.07-alt-mcheck-regcomp.patch
Patch29: file-4.10-alt-configure.patch
Summary(ru_RU.KOI8-R): Утилита для определения типов файлов
Requires: libmagic = %version-%release
BuildPreReq: zlib-devel
%def_enable static
%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.
%package -n libmagic
Summary: Shared library for handling magic files
Group: System/Libraries
%description -n libmagic
This package contains shared library for handling magic files.
%package -n libmagic-devel
Summary: Development files to build applications that handle magic files
Group: Development/C
Requires: libmagic = %version-%release
%description -n libmagic-devel
This package contains development files to build applications that handle
magic files.
%package -n libmagic-devel-static
Summary: Static library to build statically linked applications that handle magic files
Group: Development/C
Requires: libmagic-devel = %version-%release
%description -n libmagic-devel-static
This package contains static library to build statically linked
applications that handle magic files.
%prep
%setup -q
%patch1 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
find -type f -name \*.orig -delete -print
%build
%{?_disable_static:export lt_cv_prog_cc_static_works=no}
%{?_enable_static:export lt_cv_prog_cc_static_works=yes}
autoreconf -fisv
%configure --enable-fsect-man5 %{subst_enable static}
%__grep -FZl sparc magic/Magdir/* |
xargs -r0 %__subst -p 's/sparc/SPARC/g' --
# SMP-incompatible build.
%make
%install
%makeinstall
%__install -pDm644 doc/magic.5 $RPM_BUILD_ROOT%_man5dir/magic.5
%__install -pDm644 $RPM_SOURCE_DIR/magic.local $RPM_BUILD_ROOT%_sysconfdir/magic
# Test for correct identification of Perl scripts
if [ -r "%_libdir/perl5" ] &&
find "%_libdir/perl5" -type f -name '*.p[lmh]' |
$RPM_BUILD_ROOT%_bindir/file -m "$RPM_BUILD_ROOT%_datadir/file/magic" -b -f - 2>/dev/null |
%__grep -vq text
then
cat >&2 <<EOF
This version of find appears to misclassify some Perl scripts
as binary files. Please fix this and try again.
EOF
exit 1
fi
# Provide %_datadir/magic/ for compatibility.
%__mkdir_p $RPM_BUILD_ROOT%_datadir/magic
%__ln_s ../file/magic{,.mime} $RPM_BUILD_ROOT%_datadir/magic/
%post -n libmagic -p %post_ldconfig
%postun -n libmagic -p %postun_ldconfig
%files
%config(noreplace) %_sysconfdir/magic
%_bindir/*
%_datadir/%name
%_datadir/magic
%_man1dir/*
%_man5dir/*
%doc ChangeLog LEGAL.NOTICE MAINT README
%files -n libmagic
%_libdir/*.so.*
%files -n libmagic-devel
%_libdir/*.so
%_includedir/*
%_man3dir/*
%if_enabled static
%files -n libmagic-devel-static
%_libdir/*.a
%endif
%changelog
…
Full changelog you can see here