File kpcli.spec of Package kpcli

#
# spec file for package kpcli
#
# Copyright (c) 2025 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/
#


Name:           kpcli
Version:        4.1.3
Release:	0
License:        Artistic-1.0 or GPL-2.0-or-later
Summary:        Command Line Interface to KeePass Database Files
Url:            https://kpcli.sourceforge.net/
Group:          Productivity/Security
Source0:        https://downloads.sourceforge.net/%{name}/%{name}-%{version}.pl
Source1:        https://downloads.sourceforge.net/%{name}/README
Source100:      %{name}.changes
### Don't fail if only perl::Term::ReadLine::Stub is available
Patch0:         %{name}-4.1.3-readline_stub.patch
BuildRequires:  perl
Requires:       perl(Crypt::Rijndael)
Requires:       perl(File::KeePass)
Requires:       perl(Sort::Naturally)
Requires:       perl(Term::ReadKey)
Requires:       perl(Term::ShellUI)
Requires:       perl(Clone)
Recommends:     perl(Capture::Tiny)
Recommends:     perl(Clipboard)
Recommends:     perl(Term::ReadLine::Gnu)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%{perl_requires}

%description
A command line interface (interactive shell) to work with KeePass
database files (https://en.wikipedia.org/wiki/KeePass).

%prep
cp %{SOURCE0} .
cp %{SOURCE1} .
%patch0 -p0

%build
pod2man %{SOURCE0} > %{name}.1

%install
install -Dm 0755 %{name}-%{version}.pl %{buildroot}%{_bindir}/%{name}
install -Dm 0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1

%files
%defattr(-,root,root,-)
%doc README
%{_bindir}/%{name}
%doc %{_mandir}/man1/%{name}.*

%changelog
openSUSE Build Service is sponsored by