File pigeon.spec of Package pigeon
#
# spec file for package golang
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: pigeon
Version: 1.3.0
Release: 0
Summary: CLI tool to generate parsers in Go from a PEG grammar
License: BSD-3-Clause
Url: https://github.com/mna/pigeon
Source0: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: golang(API) >= 1.22
%description
The pigeon command generates parsers based on a parsing expression grammar
(PEG). Its grammar and syntax is inspired by the PEG.js project, while the
implementation is loosely based on the parsing expression grammar for C# 3.0
article.
%prep
%autosetup -a 1
%build
%ifnarch ppc64
export GOFLAGS="-buildmode=pie"
%endif
go build
%install
install -D -m 0755 %{name} %{buildroot}/%{_bindir}/%{name}
%check
# make sure the binary is pristine and at least runs,
# there are no checks to run...
./%{name} --help
%files
%{_bindir}/%{name}
%doc README.md CONTRIBUTING.md
%license LICENSE
%changelog