67 lines
1.8 KiB
RPMSpec
67 lines
1.8 KiB
RPMSpec
%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
|