diff --git a/rules_go-v0.27.0.tar.gz b/rules_go-v0.27.0.tar.gz new file mode 100644 index 0000000..621b37c Binary files /dev/null and b/rules_go-v0.27.0.tar.gz differ diff --git a/rules_go.spec b/rules_go.spec new file mode 100644 index 0000000..191fbd4 --- /dev/null +++ b/rules_go.spec @@ -0,0 +1,66 @@ +%define debug_package %{nil} +%define src_install_dir /usr/src/%{name} + +Name: rules_go +Version: 0.27.0 +Release: 1 +Summary: Go rules for Bazel +License: Apache-2.0 +Group: Development/Tools/Building +URL: https://github.com/bazelbuild/rules_go +Source0: https://github.com/bazelbuild/rules_go/releases/download/v%{version}/%{name}-v%{version}.tar.gz +BuildRequires: fdupes + +%description +Bazel rules which support building software written in Go, specifically: +- building libraries +- building binaries +- executing tests +- vendoring +- cgo builds +- cross compilation +- auto generating Bazel BUILD files +- build-time code analysis via nogo + +%package source +Summary: Source code of bazel-rules-go +Group: Development/Sources +BuildArch: noarch + +%description source +Bazel rules which support building software written in Go, specifically: +- building libraries +- building binaries +- executing tests +- vendoring +- cgo builds +- cross compilation +- auto generating Bazel BUILD files +- build-time code analysis via nogo + +This package contains source code of bazel-rules-go. + +%prep +%setup -q -c -n %{name}-v%{version} + +%build + +%install +mkdir -p %{buildroot}%{src_install_dir} +cp -R * %{buildroot}%{src_install_dir} +# Fix hidden-dile-or-dir warning. +find %{buildroot}%{src_install_dir} -name ".*" -exec rm -rf "{}" + +# Fix env-script-interpreter error. +find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!/usr/bin/env python|#!/usr/bin/python3|' "{}" + +find %{buildroot}%{src_install_dir} -type f -name "*.sh" -exec sed -i 's|#!/usr/bin/env bash|#!/bin/bash|' "{}" + + +%fdupes %{buildroot}%{src_install_dir} + +%files source +%license LICENSE.txt +%doc README.rst +%{src_install_dir} + +%changelog +* Mon Mar 17 2025 Acccll -0.27.0-1 +- package init diff --git a/rules_go.yaml b/rules_go.yaml new file mode 100644 index 0000000..0d76349 --- /dev/null +++ b/rules_go.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: bazelbuild/rules_go +tag_prefix: ^v +separator: .