diff --git a/Fix-print-Syntax-error.patch b/Fix-print-Syntax-error.patch new file mode 100644 index 0000000..b4cc8a4 --- /dev/null +++ b/Fix-print-Syntax-error.patch @@ -0,0 +1,32 @@ +From 35d1dda680842ac33f9f963e0fc149731f145f3c Mon Sep 17 00:00:00 2001 +From: Acccll +Date: Sat, 15 Mar 2025 14:33:10 +0800 +Subject: [PATCH] Fix print Syntax error + +--- + tools/migration/crosstool_query.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tools/migration/crosstool_query.py b/tools/migration/crosstool_query.py +index af3f7fa..3ef7cde 100644 +--- a/tools/migration/crosstool_query.py ++++ b/tools/migration/crosstool_query.py +@@ -41,12 +41,12 @@ def main(unused_argv): + continue + for field, value in toolchain.ListFields(): + if print_field == field.name: +- print value ++ print(value) + + if not toolchain_found: +- print "toolchain_identifier %s not found, valid values are:" % identifier ++ print("toolchain_identifier %s not found, valid values are:" % identifier) + for toolchain in crosstool.toolchain: +- print " " + toolchain.toolchain_identifier ++ print(" " + toolchain.toolchain_identifier) + + + if __name__ == "__main__": +-- +2.33.0 + diff --git a/rules_cc-0.0.6.tar.gz b/rules_cc-0.0.6.tar.gz new file mode 100644 index 0000000..cb067d5 Binary files /dev/null and b/rules_cc-0.0.6.tar.gz differ diff --git a/rules_cc.spec b/rules_cc.spec new file mode 100644 index 0000000..79c09b5 --- /dev/null +++ b/rules_cc.spec @@ -0,0 +1,49 @@ + +%define debug_package %{nil} +%define src_install_dir /usr/src/%{name} + +Name: rules_cc +Version: 0.0.6 +Release: 1 +Summary: C++ rules for Bazel +License: Apache-2.0 +Url: https://github.com/bazelbuild/%{name} +Source0: https://github.com/bazelbuild/%{name}/releases/download/0.0.6/%{name}-%{version}.tar.gz +Patch0: Fix-print-Syntax-error.patch +BuildRequires: fdupes +BuildArch: noarch + +%description +Bazel rules which support building software written in C++. + +%package source +Summary: Source code of bazel-rules-cc +Group: Development/Sources +BuildArch: noarch + + +%description source +Bazel rules which support building software written in C++. + +This package contains source code of bazel-rules-cc. + + +%prep +%autosetup -p1 + +%build + +%install +mkdir -p %{buildroot}%{src_install_dir} +cp -R * %{buildroot}%{src_install_dir} +fdupes %{buildroot}%{src_install_dir} + + +%files source +%license LICENSE +%doc README.md +%{src_install_dir} + +%changelog +* Sat Mar 15 2025 Acccll - 0.0.6-1 +- package init diff --git a/rules_cc.yaml b/rules_cc.yaml new file mode 100644 index 0000000..023756d --- /dev/null +++ b/rules_cc.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: bazelbuild/rules_cc +tag_prefix: ^v +separator: .