Files
perl-DBI-Shell/perl-DBI-Shell.spec
2025-08-12 18:13:20 +02:00

138 lines
4.4 KiB
RPMSpec

#
# spec file for package perl-DBI-Shell
#
# 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 DBI-Shell
Name: perl-DBI-Shell
Version: 11.980.0
Release: 0
# 11.98 -> normalize -> 11.980.0
%define cpan_version 11.98
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Interactive command shell for the DBI
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/D/DL/DLAMBLEY/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(DBI)
BuildRequires: perl(File::HomeDir) >= 0.50
BuildRequires: perl(IO::Interactive)
BuildRequires: perl(IO::Tee)
BuildRequires: perl(Text::CSV_XS)
BuildRequires: perl(Text::Reform)
Requires: perl(DBI)
Requires: perl(File::HomeDir) >= 0.50
Requires: perl(IO::Interactive)
Requires: perl(IO::Tee)
Requires: perl(Text::CSV_XS)
Requires: perl(Text::Reform)
Provides: perl(DBI::Format) = %{version}
Provides: perl(DBI::Format::Base)
Provides: perl(DBI::Format::Box)
Provides: perl(DBI::Format::CSV) = %{version}
Provides: perl(DBI::Format::HTML)
Provides: perl(DBI::Format::Neat)
Provides: perl(DBI::Format::PartBox)
Provides: perl(DBI::Format::Raw)
Provides: perl(DBI::Format::SQLMinus) = %{version}
Provides: perl(DBI::Format::String)
Provides: perl(DBI::Shell) = %{version}
Provides: perl(DBI::Shell::Base)
Provides: perl(DBI::Shell::Completion) = %{version}
Provides: perl(DBI::Shell::FindSqlFile) = %{version}
Provides: perl(DBI::Shell::SQLMinus) = %{version}
Provides: perl(DBI::Shell::Spool) = %{version}
Provides: perl(DBI::Shell::Std)
Provides: perl(DBI::Shell::Timing) = %{version}
%undefine __perllib_provides
Recommends: perl(Term::ReadKey)
Recommends: perl(Term::ReadLine::Perl5)
%{perl_requires}
%description
The DBI::Shell module (and dbish command, if installed) provide a simple
but effective command line interface for the Perl DBI module.
%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
# MANUAL BEGIN
sed -i "s_/env perl_/perl_" %{buildroot}%{_bindir}/dbish
# MANUAL END
%perl_gen_filelist
%files -f %{name}.files
%doc Changes README ToDo
%license LICENSE
%exclude %{perl_vendorlib}/DBI/Format*
%exclude %{perl_man3dir}/DBI::Format*
%exclude %{_bindir}
%exclude %{_mandir}/man1
%package -n perl-DBI-Format
Summary: A package for displaying result tables
Group: Development/Libraries/Perl
Requires: perl(DBI)
Requires: perl(Text::CSV_XS)
BuildRequires: perl(DBI)
BuildRequires: perl(Text::CSV_XS)
%description -n perl-DBI-Format
This package is used for making the output of DBI::Shell configurable. The idea
is to derive a subclass for any kind of output table you might create.
%package -n dbish
Summary: Interactive command shell for the Perl DBI
Requires: perl(DBI::Shell) = %{version}
Group: Productivity/Databases/Clients
%description -n dbish
This tool is a command wrapper for the DBI::Shell perl module. See DBI::Shell
for full details.
%files -n perl-DBI-Format
%defattr(-,root,root)
%dir %{perl_vendorlib}/DBI
%{perl_vendorlib}/DBI/Format.pm
%dir %{perl_vendorlib}/DBI/Format
%{perl_vendorlib}/DBI/Format/CSV.pm
%{perl_vendorlib}/DBI/Format/SQLMinus.pm
%doc %{perl_man3dir}/DBI::Format.%{perl_man3ext}%{ext_man}
%doc %{perl_man3dir}/DBI::Format::*.%{perl_man3ext}%{ext_man}
%license LICENSE
%files -n dbish
%defattr(-,root,root)
%{_bindir}/dbish
%doc %{_mandir}/man1/dbish.1*
%license LICENSE
%changelog