File perl-CDDB-Fake.spec of Package perl-CDDB-Fake

#
# spec file for package perl-CDDB-Fake
#
# Copyright (c) 2016 SUSE LINUX 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-CDDB-Fake
Version:        2.00
Release:        0
%define cpan_name CDDB-Fake
Summary:        Fake CDDB entries if you have none
License:        This program is free software and you can redistribute it and/or modify it under the terms of the Perl Artistic License or the GNU General Public License as published by the Free Software Foundation and either version 2 of the License, or (at your option) any later version.
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/CDDB-Fake/
Source0:        http://www.cpan.org/authors/id/J/JV/JV/%{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
%{perl_requires}

%description
Sometimes there's no CDDB file available for a piece of music. For example,
when you created a collection of tracks from other albums. In this case, a
text file containing the name of the artist / album, followed by a mere
list of the track titles can be used as a fall-back.

CDDB::Fake implements a part of the CDDB::File API based on manually
crafted fall-back files.

I've adopted the convention to name files with CDDB data '.cddb', and the
fake data '.nocddb'.

For example, you can cut the results of a search at Gracenote (cddb.com)
and paste it into the file .nocddb. For example:

    Birelli Lagrene / Standards

       1. C'est Si Bon
       2. Softly, As in a Morning Sunrise
       3. Days of Wine and Roses
      ...
      12. Nuages

The track titles may be optionally followed by trailing TABs (not spaces)
and a MM:SS time indicator (which may have a leading space if it's M:SS).

Extra track information can be passed on lines that follow the track title.
These lines must start with whitespace, and may not begin with a number.
Anything that follows the list of tracks is considered extra disc
information. For example:

    Birelli Lagrene / Standards

       1. C'est Si Bon
          Original version
       2. Softly, As in a Morning Sunrise
          Live recording.
          Probably incomplete.
       3. Days of Wine and Roses
      ...
      12. Nuages

    This album was recorded in the Olympia Studios in Paris.

Multiple lines of additional info are concatenated with newlines inbetween.
However, if one of the lines contains '\n' (that's backslash-n), all lines
are conctenated using a single whitespace, and the '\n''s are turned into
real newlines.

A tool is included to generate a fake file from the names of the files in
the directory.

*WARNING:* CDDB::Fake implements only a part of the CDDB::File API.

%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes CHANGES README

%changelog
openSUSE Build Service is sponsored by