8
0
Files
perl-File-LibMagic/perl-File-LibMagic.spec
Stephan Kulow 7795f5f05f Accepting request 42246 from home:jnweiger:perl
Copy from home:jnweiger:perl/perl-File-LibMagic via accept of submit request 42246 revision 6.
Request was accepted with message:
Reviewed ok

OBS-URL: https://build.opensuse.org/request/show/42246
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-File-LibMagic?expand=0&rev=1
2010-06-29 18:56:11 +00:00

76 lines
2.0 KiB
RPMSpec

Name: perl-File-LibMagic
Version: 0.96
Release: 0%{?dist}
License: GPL+ or Artistic
Group: Development/Libraries/Perl
Summary: Perlwrapper for libmagic (file-4.x or file-5.x)
Source: http://search.cpan.org/CPAN/authors/id/F/FI/FITZNER/File-LibMagic-%{version}.tgz
Url: http://search.cpan.org/dist/File-LibMagic
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl = %(eval "`%{__perl} -V:version`"; echo $version)
BuildRequires: zlib-devel file-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
%prep
%setup -q -n File-LibMagic-%{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
%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
%check
if [ -f Build.PL ]; then
./Build test
else
make test
fi
%clean
rm -rf %{buildroot}
%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes README example
%changelog
* Sat Jun 26 2010 %{packager} 0.96-0
- initial SUSE packaging
- generated with cpan2dist (CPANPLUS::Dist::SUSE version 0.0.8)