diff --git a/protoc-gen-validate-0.6.7.tar.gz b/protoc-gen-validate-0.6.7.tar.gz new file mode 100644 index 0000000..12ebd20 Binary files /dev/null and b/protoc-gen-validate-0.6.7.tar.gz differ diff --git a/protoc-gen-validate.spec b/protoc-gen-validate.spec new file mode 100644 index 0000000..cd9a239 --- /dev/null +++ b/protoc-gen-validate.spec @@ -0,0 +1,48 @@ +%global debug_package %{nil} +%define src_install_dir /usr/src/%{name} + +Name: protoc-gen-validate +Version: 0.6.7 +Release: 1 +Summary: Protoc plugin to generate polyglot message validators +License: Apache-2.0 +URL: https://github.com/bufbuild/protoc-gen-validate +Source0: https://github.com/bufbuild/protoc-gen-validate/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: fdupes + +%description +protoc-gen-validate is a protoc plugin to generate polyglot message validators. +While protocol buffers effectively guarantee the types of structured data, they +cannot enforce semantic rules for values. This plugin adds support to +protoc-generated code to validate such constraints. + +%package source +Summary: Source code of protoc-gen-validate +BuildArch: noarch + +%description source +protoc-gen-validate is a protoc plugin to generate polyglot message validators. +While protocol buffers effectively guarantee the types of structured data, they +cannot enforce semantic rules for values. This plugin adds support to +protoc-generated code to validate such constraints. + +This package contains source code for protoc-gen-validate. + +%prep +%autosetup -p1 -n %{name}-%{version} + +%build + +%install +mkdir -p %{buildroot}%{src_install_dir} +tar -xf %{SOURCE0} --strip-components=1 -C %{buildroot}%{src_install_dir} +%fdupes %{buildroot}%{_prefix} + +%files source +%license LICENSE +%doc README.md +%{src_install_dir} + +%changelog +* Mon Apr 07 2025 xinghe - 0.6.7-1 +- Init Package diff --git a/protoc-gen-validate.yaml b/protoc-gen-validate.yaml new file mode 100644 index 0000000..77e329c --- /dev/null +++ b/protoc-gen-validate.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: bufbuild/protoc-gen-validate +tag_prefix: ^v +separator: .