2022-01-25 17:45:56 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package wire
|
|
|
|
|
#
|
2024-02-19 17:30:55 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2022-01-25 17:45:56 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2022-02-08 20:49:02 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2022-01-25 17:45:56 +00:00
|
|
|
#
|
2022-02-15 18:04:16 +00:00
|
|
|
|
|
|
|
|
|
2022-02-14 18:55:13 +00:00
|
|
|
%if 0%{?rhel} == 8
|
|
|
|
|
%global debug_package %{nil}
|
|
|
|
|
%endif
|
2022-01-25 17:45:56 +00:00
|
|
|
|
2022-02-14 18:55:13 +00:00
|
|
|
%if 0%{?rhel}
|
|
|
|
|
# Fix ERROR: No build ID note found in
|
|
|
|
|
%undefine _missing_build_ids_terminate_build
|
|
|
|
|
%endif
|
2022-01-25 17:45:56 +00:00
|
|
|
|
|
|
|
|
Name: wire
|
2024-02-19 17:30:55 +00:00
|
|
|
Version: 0.6.0
|
2022-01-25 17:45:56 +00:00
|
|
|
Release: 0
|
2022-02-08 20:49:02 +00:00
|
|
|
Summary: Compile-time Dependency Injection for Go
|
2022-01-25 17:45:56 +00:00
|
|
|
License: Apache-2.0
|
|
|
|
|
Group: Development/Languages/Go
|
2022-02-08 20:49:02 +00:00
|
|
|
URL: https://github.com/google/wire
|
2022-01-25 17:45:56 +00:00
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
|
Source1: vendor.tar.gz
|
2024-02-19 17:30:55 +00:00
|
|
|
Patch1: update_go_version.patch
|
2024-02-20 13:16:44 +00:00
|
|
|
BuildRequires: golang(API) >= 1.22
|
2022-01-25 17:45:56 +00:00
|
|
|
%{?systemd_ordering}
|
2022-06-17 15:31:52 +00:00
|
|
|
ExcludeArch: s390
|
2022-01-25 17:45:56 +00:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Wire is a code generation tool that automates connecting components using
|
|
|
|
|
dependency injection. Dependencies between components are represented in Wire
|
|
|
|
|
as function parameters, encouraging explicit initialization instead of global
|
|
|
|
|
variables. Because Wire operates without runtime state or reflection, code
|
|
|
|
|
written to be used with Wire is useful even for hand-written initialization.
|
|
|
|
|
|
|
|
|
|
%prep
|
2024-02-20 16:24:50 +00:00
|
|
|
%autosetup -a 1
|
2022-01-25 17:45:56 +00:00
|
|
|
|
|
|
|
|
%build
|
2024-02-20 16:24:50 +00:00
|
|
|
%ifnarch ppc64
|
|
|
|
|
export GOFLAGS="-buildmode=pie"
|
|
|
|
|
%endif
|
|
|
|
|
go build ./cmd/%{name}
|
2022-01-25 17:45:56 +00:00
|
|
|
|
|
|
|
|
%install
|
2024-02-20 16:24:50 +00:00
|
|
|
install -D -m 0755 %{name} "%{buildroot}/%{_bindir}/%{name}"
|
2022-01-25 17:45:56 +00:00
|
|
|
|
2022-02-14 18:55:13 +00:00
|
|
|
%if 0%{?rhel} == 8
|
|
|
|
|
%check
|
|
|
|
|
# Fix OBS debug_package execution.
|
|
|
|
|
rm -f %{buildroot}/usr/lib/debug/%{_bindir}/%{name}-%{version}-*.debug
|
|
|
|
|
%endif
|
|
|
|
|
|
2022-01-25 17:45:56 +00:00
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc README.md
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
|
|
|
|
|
%changelog
|