File bcm2-utils.spec of Package bcm2-utils
#
# spec file for package bcm2-utils
#
# 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/
#
Name: bcm2-utils
Version: 0.9.8
Release: 0
Summary: Utilities for Broadcom-based cable modems
License: GPL-3.0-only
Group: Hardware/Modem
URL: https://github.com/jclehner/bcm2-utils
Source: %{name}-%{version}.tar.xz
BuildRequires: boost-devel
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libopenssl-devel
BuildRequires: make
BuildRequires: net-snmp-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Utilities for Broadcom-based cable modems.
* bcm2dump: A utility to dump ram/flash, primarily intended as a
firmware dump tool for cable modems based on a Broadcom SoC.
Works over serial connection (bootloader, firmware) and telnet
(firmware).
* bcm2cfg: A utility to modify/encrypt/decrypt the configuration
file (aka GatewaySettings.bin), but also NVRAM images.
%prep
%setup -q
%build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
make %{?_smp_mflags} WITH_SNMP="1" VERSION="v%{version}" PREFIX="%{_prefix}"
%install
mkdir -p %{buildroot}%{_bindir}
%make_install PREFIX="%{buildroot}%{_prefix}"
%check
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
make %{?_smp_mflags} WITH_SNMP="1" VERSION="v%{version}" check
%files
%defattr(-,root,root)
%license LICENSE
%doc FORMAT.md FIRMWARE.md README.md
%{_bindir}/bcm2cfg
%{_bindir}/bcm2dump
%{_bindir}/psextract
%changelog