File perl-File-LibMagic.spec of Package perl-File-LibMagic
#
# spec file for package perl-File-LibMagic
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: perl-File-LibMagic
%define cpan_name File-LibMagic
Summary: Perlwrapper for libmagic (file-4.x or file-5.x)
Version: 0.96
Release: 1
License: GPL+ or Artistic
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/File-LibMagic
Source: http://search.cpan.org/CPAN/authors/id/F/FI/FITZNER/File-LibMagic-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: file-devel zlib-devel
#
Requires: zlib file
%description
The 'File::LibMagic' is a simple perlinterface to libmagic from the file-
4.x or file-5.x package from Christos Zoulas
(ftp://ftp.astron.com/pub/file/).You can use the simple Interface like
MagicBuffer() or MagicFile(), use the functions of libmagic(3) or use
the OO-Interface.Simple Interface MagicBuffer() fixme
Authors:
--------
Andreas Fitzner <fitzner@informatik.hu-berlin.de>
Michael Hendricks <michael@ndrix.org>
%prep
%setup -q -n %{cpan_name}-%{version}
%build
if [ -f Build.PL ]; then
%{__perl} Build.PL --installdirs vendor
else
[ -f Makefile.PL ] || exit 2
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
fi
if [ -f Build.PL ]; then
./Build build flags=%{?_smp_mflags}
else
make %{?_smp_mflags}
fi
%check
if [ -f Build.PL ]; then
./Build test
else
make test
fi
%install
if [ -f Build.PL ]; then
./Build pure_install --destdir %{buildroot}
else
make pure_install PERL_INSTALL_ROOT=%{buildroot}
fi
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
mkdir -p %{buildroot}/%{_mandir}/man3/ %{buildroot}/usr/bin
%{_fixperms} %{buildroot}/*
%perl_gen_filelist
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes README example
%changelog