This commit is contained in:
Acccll 2025-04-07 17:08:13 +08:00
parent 2c4430f6c6
commit 2eaf838f2e
3 changed files with 70 additions and 0 deletions

BIN
rules_go-v0.27.0.tar.gz Normal file

Binary file not shown.

66
rules_go.spec Normal file
View File

@ -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 <mail1521@163.com> -0.27.0-1
- package init

4
rules_go.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: bazelbuild/rules_go
tag_prefix: ^v
separator: .