Group :: File tools
RPM: file
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Name: file
Version: 4.26
Release: alt2
Summary: A utility for determining file types
License: BSD-style
Group: File tools
Url: http://www.darwinsys.com/file/
Packager: Dmitry V. Levin <ldv at altlinux.org>
Summary(ru_RU.KOI8-R): Утилита для определения типов файлов
Requires: libmagic = %version-%release
BuildPreReq: zlib-devel
# ftp://ftp.astron.com/pub/file/file-%version.tar.gz
Source: file-%version.tar
Source1: magic.local
Patch: file-%version-%release.patch
%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
%patch -p1
bzip2 -9k ChangeLog
%build
autoreconf -fisv
%configure --enable-fsect-man5 %{subst_enable static}
grep -FZl sparc magic/Magdir/* |
xargs -r0 sed -i 's/sparc/SPARC/g' --
# SMP-incompatible build.
%make
%make -k check
%install
%makeinstall
install -pDm644 doc/magic.5 %buildroot%_man5dir/magic.5
install -pDm644 %_sourcedir/magic.local %buildroot%_sysconfdir/magic
# Test for correct identification of Perl modules
find /usr/*/perl5 -type f -name '*.p[lmh]' |
LD_LIBRARY_PATH=%buildroot%_libdir %buildroot%_bindir/file \
-m %buildroot%_datadir/file/magic -f - >test.out
grep -q ' [Pp]erl.* text' test.out
grep -v ' text' test.out && exit 1
# Provide %_datadir/magic/ for compatibility.
mkdir -p %buildroot%_datadir/magic
ln -s ../file/magic %buildroot%_datadir/magic/
%files
%config(noreplace) %_sysconfdir/magic
%_bindir/*
%_datadir/%name
%_datadir/magic
%_man1dir/*
%_man5dir/*
%doc ChangeLog.bz2 COPYING 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.26
Release: alt2
Summary: A utility for determining file types
License: BSD-style
Group: File tools
Url: http://www.darwinsys.com/file/
Packager: Dmitry V. Levin <ldv at altlinux.org>
Summary(ru_RU.KOI8-R): Утилита для определения типов файлов
Requires: libmagic = %version-%release
BuildPreReq: zlib-devel
# ftp://ftp.astron.com/pub/file/file-%version.tar.gz
Source: file-%version.tar
Source1: magic.local
Patch: file-%version-%release.patch
%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
%patch -p1
bzip2 -9k ChangeLog
%build
autoreconf -fisv
%configure --enable-fsect-man5 %{subst_enable static}
grep -FZl sparc magic/Magdir/* |
xargs -r0 sed -i 's/sparc/SPARC/g' --
# SMP-incompatible build.
%make
%make -k check
%install
%makeinstall
install -pDm644 doc/magic.5 %buildroot%_man5dir/magic.5
install -pDm644 %_sourcedir/magic.local %buildroot%_sysconfdir/magic
# Test for correct identification of Perl modules
find /usr/*/perl5 -type f -name '*.p[lmh]' |
LD_LIBRARY_PATH=%buildroot%_libdir %buildroot%_bindir/file \
-m %buildroot%_datadir/file/magic -f - >test.out
grep -q ' [Pp]erl.* text' test.out
grep -v ' text' test.out && exit 1
# Provide %_datadir/magic/ for compatibility.
mkdir -p %buildroot%_datadir/magic
ln -s ../file/magic %buildroot%_datadir/magic/
%files
%config(noreplace) %_sysconfdir/magic
%_bindir/*
%_datadir/%name
%_datadir/magic
%_man1dir/*
%_man5dir/*
%doc ChangeLog.bz2 COPYING 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