File pla-util.spec of Package pla-util
#
# spec file for package pla-util
#
# Copyright (c) 2023-2025 John Serock
#
# 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.
Name: pla-util
Version: 2.1.3
Release: 0
Group: Hardware/Other
Summary: A power line adapter utility
License: GPL-3.0-or-later
URL: https://github.com/serock/%{name}
Source0: https://github.com/serock/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: https://github.com/serock/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz.asc
Source2: https://github.com/serock.gpg#/%{name}.keyring
%if 0%{?sle_version} || 0%{?suse_version}
BuildRequires: gcc-ada
BuildRequires: libpcap-devel
%endif
%if 0%{?fedora}
BuildRequires: gprbuild
BuildRequires: gcc-gnat
BuildRequires: libpcap-devel
%endif
%if 0%{?mageia}
BuildRequires: gcc-gnat
BuildRequires: lib64pcap-devel
%endif
Recommends: libcap-ng-utils
Suggests: bash-completion
%description
Allow Linux users to manage HomePlug AV2 compliant power line adapters that use a Broadcom system-on-a-chip (SoC) such as the BCM60500 or BCM60333.
%prep
%autosetup
%build
%if 0%{?sle_version} || 0%{?suse_version}
make
%endif
%if 0%{?fedora}
gprbuild -p -P pla_util.gpr
%endif
%if 0%{?mageia}
make
%endif
%install
mkdir -p %{buildroot}%{_bindir}
install -m 0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
install -m 0644 completions/%{name} %{buildroot}%{_datadir}/bash-completion/completions/%{name}
%files
%defattr(-,root,root)
%license LICENSE
%doc CHANGELOG.md
%doc README.md
%{_bindir}/%{name}
%{_datadir}/bash-completion/completions/%{name}
%changelog