File hauler.spec of Package hauler
#
# spec file for package eib
#
# 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/
#
%define project github.com/rancherfederal/hauler
%define revision 3f6491409714997f40b124844f9c59e25a7f22cd
Name: hauler
Version: 1.0.5
Release: 0
Summary: Airgap Swiss Army Knife
License: Apache-2.0
URL: https://github.com/rancherfederal/hauler
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: golang-packaging
BuildRequires: cosign
%description
%prep
%setup -q
%build
%goprep %{project}
tar -xf %{SOURCE1}
mkdir cmd/hauler/binaries
cp `which cosign` cmd/hauler/binaries/cosign-linux-%{go_arch}
go build -mod=vendor -buildmode=pie -o hauler ./cmd/hauler
%install
install -D -m 0755 hauler %{buildroot}%{_bindir}/hauler
%files
%doc README.md
%{_bindir}/hauler
%changelog