## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 6; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: gram_grep Summary: Search text using a grammar, lexer, or straight regex Version: 0.10.2 Release: %autorelease # Since dependencies lexertl17, parsertl17, and wildcardtl are header-only, we # must treat them as static libraries, and their licenses contribute to the # license of the binary RPM. All three are BSL-1.0. License: BSL-1.0 URL: https://github.com/BenHanson/gram_grep Source0: %{url}/archive/%{version}/gram_grep-%{version}.tar.gz # Man page hand-written for Fedora in groff_man(7) format based on --help Source1: gram_grep.1 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildSystem: cmake BuildRequires: gcc-c++ BuildRequires: dos2unix BuildRequires: boost-devel # https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries BuildRequires: lexertl17-static BuildRequires: parsertl17-static BuildRequires: wildcardtl-static %description Search text using a grammar, lexer, or straight regex. Chain searches for greater refinement. %prep -a # Fix line terminations (particularly for files that may be installed) find . -type f -exec file '{}' '+' | grep --extended-regexp '\bCRLF\b' | cut --delimiter=':' --fields1 | xargs --no-run-if-empty dos2unix --keepdate # Remove include paths for unbundled header-only library dependencies sed --regexp-extended --in-place \ 's@^([[:blank:]]*)(include_directories.*"\.\./)@\1# \2@' \ CMakeLists.txt %install # The CMake build system has no provision for installing the program, so # %%cmake_install would do nothing. We must install the executable manually. install -D --preserve-timestamps \ --target='%{buildroot}%{_bindir}' '%{_vpath_builddir}/gram_grep' install -D --preserve-timestamps --mode=0644 \ --target='%{buildroot}%{_mandir}/man1' '%{SOURCE1}' %check # Upstream does not provide any tests. We use the “Printing a Reversed List” # example from README.md as a “smoke test.” # Make sure the program can at least print its help text and exit successfully %{buildroot}%{_bindir}/gram_grep --help >/dev/null assert_same() { # Parameters: actual, expected set -o nounset set -o errexit if [ "${1}" != "${2}" ] then cat 1>&2 < test.txt expected='d::c::b::a' assert_same "$(set -o errexit %{buildroot}%{_bindir}/gram_grep --config=sample_configs/rev.g test.txt )" "${expected}" %files %license LICENCE.txt %doc README.md %doc sample_configs/ %{_bindir}/gram_grep %{_mandir}/man1/gram_grep.1* %changelog ## START: Generated by rpmautospec * Thu Jul 16 2026 Fedora Release Engineering - 0.10.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Fri Jun 19 2026 Benjamin A. Beasley - 0.10.2-5 - Rebuilt with lexertl17 1.3.1 * Tue May 19 2026 Benjamin A. Beasley - 0.10.2-4 - Use various long options * Sun May 17 2026 Benjamin A. Beasley - 0.10.2-3 - Use the cmake declarative buildsystem * Sat Apr 18 2026 Benjamin A. Beasley - 0.10.2-2 - Rebuilt with lexertl17 1.3.0, upgrading lexing to Unicode 17 * Sun Apr 12 2026 Benjamin A. Beasley - 0.10.2-1 - Update to 0.10.2 (close RHBZ#2457583) * Thu Mar 26 2026 Benjamin A. Beasley - 0.10.0-1 - Update to 0.10.0 (close RHBZ#2451568) * Sat Mar 14 2026 Benjamin A. Beasley - 0.9.12-2 - The ninja backend is the default now; don’t bother specifying it * Thu Feb 12 2026 Benjamin A. Beasley - 0.9.12-1 - Update to 0.9.12 (close RHBZ#2439420) * Fri Jan 16 2026 Fedora Release Engineering - 0.9.11-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Fri Nov 28 2025 Benjamin A. Beasley - 0.9.11-2 - Rebuilt with lexertl17 1.2.11 * Fri Nov 28 2025 Benjamin A. Beasley - 0.9.11-1 - Update to 0.9.11 (close RHBZ#2417562) * Fri Oct 10 2025 Benjamin A. Beasley - 0.9.10-4 - Rebuilt with lexertl17 1.2.10 * Sat Sep 20 2025 Benjamin A. Beasley - 0.9.10-3 - Rebuilt with lexerl17 1.2.9 * Thu Sep 18 2025 Benjamin A. Beasley - 0.9.10-1 - Update to 0.9.10 (close RHBZ#2396283) * Sun Aug 31 2025 Benjamin A. Beasley - 0.9.9-4 - Rebuilt with parsertl17 1.2.1 * Thu Aug 21 2025 Benjamin A. Beasley - 0.9.9-3 - Rebuilt with lexertl17 1.2.5 * Thu Jul 24 2025 Fedora Release Engineering - 0.9.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Thu Jun 12 2025 Benjamin A. Beasley - 0.9.9-1 - Update to 0.9.9 * Thu Jun 12 2025 Benjamin A. Beasley - 0.9.8-2 - Patch for lexertl17 1.2.x * Sun May 11 2025 Benjamin A. Beasley - 0.9.8-1 - Update to 0.9.8 * Sat Apr 05 2025 Benjamin A. Beasley - 0.9.7-1 - Update to 0.9.7 (close RHBZ#2357570) * Thu Mar 13 2025 Benjamin A. Beasley - 0.9.5-1 - Update to 0.9.5 (close RHBZ#2351789) * Wed Feb 26 2025 Benjamin A. Beasley - 0.9.4-1 - Update to 0.9.4 (close RHBZ#2348431) * Thu Feb 20 2025 Benjamin A. Beasley - 0.9.3-1 - Update to 0.9.3 (close RHBZ#2346745) * Mon Feb 17 2025 Benjamin A. Beasley - 0.9.2-1 - Update to 0.9.2 (close RHBZ#2346003) * Sun Feb 09 2025 Benjamin A. Beasley - 0.9.1-1 - Update to 0.9.1 (close RHBZ#2344499) * Sat Feb 01 2025 Benjamin A. Beasley - 0.9.0-4 - Do not build for i686 (leaf package) * Sat Feb 01 2025 Benjamin A. Beasley - 0.9.0-3 - Switch from plain makefiles to CMake * Sat Feb 01 2025 Benjamin A. Beasley - 0.9.0-2 - Add some messy but useful “smoke tests” based on documented examples * Sat Feb 01 2025 Benjamin A. Beasley - 0.9.0-1 - Initial package (close RHBZ#2264773) ## END: Generated by rpmautospec