File geth.spec of Package geth

#
# spec file for package geth
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# 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:           geth
Version:        1.17.0
Release:        0
Summary:        P2P digital currency
License:        LGPL-3.0-only
Group:          Productivity/Networking/Other
URL:            https://%{name}.ethereum.org
Source0:        %{name}-%{version}.tar.xz
Source1:        vendor.tar.gz
Source2:        blst-0.3.16.tar.xz
Source3:        c-kzg-4844-2.1.3.tar.xz
Source4:        hid-v1.0.1-0.20240306101548-573246063e52.tar.xz
BuildRequires:  go >= 1.24
BuildRequires:  libhidapi-devel
BuildRequires:  libusb-devel

%description
Go implementation of the Ethereum protocol.

%prep
%setup -q
%setup -q -T -D -a 1
%{__tar} -C vendor/github.com/supranational -xf %{S:2}
%{__tar} -C vendor/github.com/ethereum -xf %{S:3}
%{__tar} -C vendor/github.com/karalabe -xf %{S:4}
%{__rm} -fr rm -fr vendor/github.com/ethereum/c-kzg-4844/v2/*
%{__mv} vendor/github.com/ethereum/c-kzg-4844/[A-Za-u]* vendor/github.com/ethereum/c-kzg-4844/v2/

%build
%{__make} %{?_smp_mflags} all GOFLAGS="-mod=vendor -buildmode=pie"
%{__strip} -s build/bin/*

%install
%__install -D -m 0755 -t %{buildroot}%{_bindir} build/bin/*

%check

%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/abidump
%attr(755,root,root) %{_bindir}/abigen
%attr(755,root,root) %{_bindir}/blsync
%attr(755,root,root) %{_bindir}/clef
%attr(755,root,root) %{_bindir}/devp2p
%attr(755,root,root) %{_bindir}/era
%attr(755,root,root) %{_bindir}/ethkey
%attr(755,root,root) %{_bindir}/evm
%attr(755,root,root) %{_bindir}/%{name}
%attr(755,root,root) %{_bindir}/rlpdump
%attr(755,root,root) %{_bindir}/workload
%doc AUTHORS README.md SECURITY.md
%license COPYING COPYING.LESSER

%changelog
openSUSE Build Service is sponsored by