2010-07-02 11:12:52 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-File-LibMagic (Version 0.96)
|
|
|
|
#
|
|
|
|
# Copyright (c) 2010 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: 0%{?dist}
|
|
|
|
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
|
2010-12-03 14:05:08 +00:00
|
|
|
%{perl_requires}
|
2010-07-02 11:12:52 +00:00
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
BuildRequires: zlib-devel file-devel
|
|
|
|
#
|
|
|
|
Requires: zlib file
|
2010-06-29 18:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
|
|
|
|
2010-07-02 11:12:52 +00:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Andreas Fitzner <fitzner@informatik.hu-berlin.de>
|
|
|
|
Michael Hendricks <michael@ndrix.org>
|
|
|
|
|
|
|
|
|
2010-06-29 18:56:11 +00:00
|
|
|
%prep
|
2010-07-02 11:12:52 +00:00
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
2010-06-29 18:56:11 +00:00
|
|
|
|
|
|
|
%build
|
2010-07-02 11:12:52 +00:00
|
|
|
if [ -f Build.PL ]; then
|
2010-06-29 18:56:11 +00:00
|
|
|
%{__perl} Build.PL --installdirs vendor
|
|
|
|
else
|
|
|
|
[ -f Makefile.PL ] || exit 2
|
|
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
|
|
|
fi
|
2010-07-02 11:12:52 +00:00
|
|
|
if [ -f Build.PL ]; then
|
2010-06-29 18:56:11 +00:00
|
|
|
./Build build flags=%{?_smp_mflags}
|
|
|
|
else
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
fi
|
|
|
|
|
2010-07-02 11:12:52 +00:00
|
|
|
%check
|
|
|
|
if [ -f Build.PL ]; then
|
|
|
|
./Build test
|
|
|
|
else
|
|
|
|
make test
|
|
|
|
fi
|
|
|
|
|
2010-06-29 18:56:11 +00:00
|
|
|
%install
|
|
|
|
|
|
|
|
if [ -f Build.PL ]; then
|
|
|
|
./Build pure_install --destdir %{buildroot}
|
|
|
|
else
|
|
|
|
make pure_install PERL_INSTALL_ROOT=%{buildroot}
|
|
|
|
fi
|
2010-07-02 11:12:52 +00:00
|
|
|
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 ';'
|
2010-06-29 18:56:11 +00:00
|
|
|
|
2010-07-02 11:12:52 +00:00
|
|
|
mkdir -p %{buildroot}/%{_mandir}/man3/ %{buildroot}/usr/bin
|
2010-06-29 18:56:11 +00:00
|
|
|
|
2010-07-02 11:12:52 +00:00
|
|
|
%{_fixperms} %{buildroot}/*
|
2010-06-29 18:56:11 +00:00
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%clean
|
2010-07-02 11:12:52 +00:00
|
|
|
%{__rm} -rf %{buildroot}
|
2010-06-29 18:56:11 +00:00
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc Changes README example
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|