09a13b7
Name: argbash
bc19b31
Version: 2.10.0
36dedcf
Release: %autorelease
09a13b7
Summary: Bash argument parsing code generator
09a13b7
License: BSD
09a13b7
URL: https://argbash.io
09a13b7
Source0: https://github.com/matejak/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
09a13b7
09a13b7
BuildArch: noarch
09a13b7
09a13b7
BuildRequires: autoconf
09a13b7
BuildRequires: coreutils
09a13b7
BuildRequires: make
09a13b7
BuildRequires: bash
7df4fac
BuildRequires: bash-completion
d758eef
BuildRequires: python%{python3_pkgversion}-docutils
0f8a4c2
05e2fd5
%if 0%{?fedora} >= 27
0f8a4c2
BuildRequires: ShellCheck
0f8a4c2
%endif
0f8a4c2
09a13b7
Requires: autoconf
09a13b7
Requires: bash
09a13b7
Requires: coreutils
09a13b7
Requires: grep
09a13b7
Requires: sed
09a13b7
7df4fac
%if !0%{?rhel} || 0%{?rhel} > 7
7df4fac
Recommends: bash-completion
7df4fac
%endif
7df4fac
b43789d
# Submitted upstream: https://github.com/matejak/argbash/pull/177
b43789d
Patch: 0001-Disable-shellcheck-warnings.patch
b43789d
b43789d
09a13b7
%description
09a13b7
Argbash helps your shell scripts to accept arguments.
09a13b7
You declare what arguments you want your script to accept and Argbash
09a13b7
generates the shell code that parses them from the command-line and exposes
09a13b7
passed values as shell variables.
09a13b7
09a13b7
Help message is also generated, and helpful error messages are dispatched
09a13b7
if the script is called with arguments that conflict with the interface.
09a13b7
09a13b7
%prep
7df4fac
%autosetup -p1
09a13b7
09a13b7
%build
09a13b7
09a13b7
%install
7df4fac
cd resources && \
7df4fac
    ROOT=%{buildroot} \
7df4fac
    PREFIX=%{_prefix} \
7df4fac
    PREFIXED_LIBDIR=%{_datarootdir} \
7df4fac
    SYSCONFDIR=%{_sysconfdir} \
7df4fac
    INSTALL_COMPLETION=yes \
7d8728f
    BASH_COMPLETION_DIRECTORY=%{_datarootdir}/bash-completion/completions \
7df4fac
    make install
09a13b7
09a13b7
%check
b43789d
cd resources && %{make_build} check
09a13b7
09a13b7
%files
09a13b7
%license LICENSE
09a13b7
%doc README.md ChangeLog
8df11b5
%{_mandir}/man1/argbash*
09a13b7
09a13b7
%{_bindir}/argbash
09a13b7
%{_bindir}/argbash-1to2
09a13b7
%{_bindir}/argbash-init
09a13b7
%{_datarootdir}/argbash/
7d8728f
%{_datarootdir}/bash-completion/completions/argbash
09a13b7
09a13b7
%changelog
36dedcf
%autochangelog