forked from pool/perl-File-LibMagic
76 lines
2.0 KiB
RPMSpec
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)
|
||
|
|