149 lines
5.5 KiB
RPMSpec
149 lines
5.5 KiB
RPMSpec
#
|
|
# spec file for package perl-CPAN-SQLite
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name CPAN-SQLite
|
|
Name: perl-CPAN-SQLite
|
|
Version: 0.212.0
|
|
Release: 0
|
|
# 0.212 -> normalize -> 0.212.0
|
|
%define cpan_version 0.212
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Maintain and search a minimal CPAN database
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/S/ST/STRO/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(CPAN::DistnameInfo)
|
|
BuildRequires: perl(CPAN::HandleConfig)
|
|
BuildRequires: perl(CPAN::Version)
|
|
BuildRequires: perl(Compress::Zlib)
|
|
BuildRequires: perl(DBD::SQLite)
|
|
BuildRequires: perl(DBI)
|
|
BuildRequires: perl(File::HomeDir)
|
|
BuildRequires: perl(HTTP::Tiny)
|
|
BuildRequires: perl(Test::More) >= 0.94
|
|
BuildRequires: perl(parent)
|
|
Requires: perl(CPAN::DistnameInfo)
|
|
Requires: perl(Compress::Zlib)
|
|
Requires: perl(DBI)
|
|
Requires: perl(File::HomeDir)
|
|
Requires: perl(HTTP::Tiny)
|
|
Requires: perl(parent)
|
|
Provides: perl(CPAN::SQLite) = %{version}
|
|
Provides: perl(CPAN::SQLite::DBI) = %{version}
|
|
Provides: perl(CPAN::SQLite::DBI::Index) = %{version}
|
|
Provides: perl(CPAN::SQLite::DBI::Index::auths)
|
|
Provides: perl(CPAN::SQLite::DBI::Index::chaps)
|
|
Provides: perl(CPAN::SQLite::DBI::Index::dists)
|
|
Provides: perl(CPAN::SQLite::DBI::Index::info)
|
|
Provides: perl(CPAN::SQLite::DBI::Index::mods)
|
|
Provides: perl(CPAN::SQLite::DBI::Search) = %{version}
|
|
Provides: perl(CPAN::SQLite::DBI::Search::auths)
|
|
Provides: perl(CPAN::SQLite::DBI::Search::chaps)
|
|
Provides: perl(CPAN::SQLite::DBI::Search::dists)
|
|
Provides: perl(CPAN::SQLite::DBI::Search::info)
|
|
Provides: perl(CPAN::SQLite::DBI::Search::mods)
|
|
Provides: perl(CPAN::SQLite::Index) = %{version}
|
|
Provides: perl(CPAN::SQLite::Info) = %{version}
|
|
Provides: perl(CPAN::SQLite::META) = %{version}
|
|
Provides: perl(CPAN::SQLite::META::Author)
|
|
Provides: perl(CPAN::SQLite::META::Bundle)
|
|
Provides: perl(CPAN::SQLite::META::Distribution)
|
|
Provides: perl(CPAN::SQLite::META::Module)
|
|
Provides: perl(CPAN::SQLite::Populate) = %{version}
|
|
Provides: perl(CPAN::SQLite::Populate::auths)
|
|
Provides: perl(CPAN::SQLite::Populate::chaps)
|
|
Provides: perl(CPAN::SQLite::Populate::dists)
|
|
Provides: perl(CPAN::SQLite::Populate::info)
|
|
Provides: perl(CPAN::SQLite::Populate::mods)
|
|
Provides: perl(CPAN::SQLite::Search) = %{version}
|
|
Provides: perl(CPAN::SQLite::Search::author)
|
|
Provides: perl(CPAN::SQLite::Search::dist)
|
|
Provides: perl(CPAN::SQLite::Search::module)
|
|
Provides: perl(CPAN::SQLite::State) = %{version}
|
|
Provides: perl(CPAN::SQLite::State::auths)
|
|
Provides: perl(CPAN::SQLite::State::dists)
|
|
Provides: perl(CPAN::SQLite::State::info)
|
|
Provides: perl(CPAN::SQLite::State::mods)
|
|
Provides: perl(CPAN::SQLite::Util) = %{version}
|
|
Provides: perl(CPAN::SQLite::Version) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
This package is used for setting up, maintaining, and searching a CPAN
|
|
database consisting of the information stored in the three main CPAN
|
|
indices: _$CPAN/modules/03modlist.data.gz_,
|
|
_$CPAN/modules/02packages.details.txt.gz_, and
|
|
_$CPAN/authors/01mailrc.txt.gz_. It should be considered at an alpha stage
|
|
of development.
|
|
|
|
One begins by creating the object as
|
|
|
|
my $obj = CPAN::SQLite->new(%args);
|
|
|
|
which accepts the following arguments:
|
|
|
|
* * 'CPAN => '/path/to/CPAN''
|
|
|
|
This specifies the path to where the index files are to be stored. This
|
|
could be a local CPAN mirror, defined here by the presence of a
|
|
_MIRRORED.BY_ file beneath this directory, or a local directory in which to
|
|
store these files from a remote CPAN mirror. In the latter case, the index
|
|
files are fetched from a remote CPAN mirror, using the same list that
|
|
'CPAN.pm' uses, if this is configured, and are updated if they are more
|
|
than one day old.
|
|
|
|
If the 'CPAN' option is not given, it will default to 'cpan_home' of CPAN,
|
|
if this is configured, with the index files found under
|
|
'keep_source_where'. A fatal error results if such a directory isn't found.
|
|
Updates to these index files are assumed here to be handled by 'CPAN.pm'.
|
|
|
|
* * 'db_dir => '/path/to/db/dir''
|
|
|
|
This specifies the path to where the database file is found. If not given,
|
|
it defaults to the 'cpan_home' directory of 'CPAN.pm', if present, or to
|
|
the directory in which the script was invoked. The name of the database
|
|
file is 'cpandb.sql'.
|
|
|
|
There are two main methods available.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
%make_build
|
|
|
|
%check
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Changes README
|
|
%license LICENSE
|
|
|
|
%changelog
|