File perl-Audio-Scan.spec of Package perl-Audio-Scan
#
# spec file for package perl-Audio-Scan
#
# Copyright (c) 2012 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/
#
Name: perl-Audio-Scan
Version: 0.94
Release: 1
Summary: Fast C metadata and tag reader for all common audio file formats
License: GPL-1.0 or GPL-2.0 or GPL-3.0
Group: Development/Libraries/Perl
Source: Audio-Scan-%{version}.tar.bz2
#Url: http://search.cpan.org/dist/Audio-Scan
Url: https://github.com/clivem/Audio-Scan
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl-macros
BuildRequires: zlib-devel
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::CheckManifest)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(Test::Warn)
%description
Audio::Scan is a C-based scanner for audio file metadata and tag
information. It currently supports MP3, MP4, Ogg Vorbis, FLAC, ASF, WAV,
AIFF, Musepack, Monkey's Audio, and WavPack.See below for specific
details about each file format.
%prep
%setup -q -n Audio-Scan-%{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
# FIXME: use ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
# maybe then we would not need to remove the .packlist files :-)
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 ';'
%{_fixperms} %{buildroot}/*
%perl_process_packlist
%perl_gen_filelist
%check
echo >> MANIFEST.SKIP # ensure trailing newline
echo >> MANIFEST.SKIP ^%{name}\\.files\$
if [ -f Build.PL ]; then
./Build test
else
%{__make} test
fi
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && %{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root,-)
%doc README Changes
%changelog