Name: gstr Version: 3.0.1 Release: 2%{?dist} Summary: Single-header UTF-8 grapheme string library for C License: MIT URL: https://github.com/deths74r/gstr Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: pkgconfig # Header-only library produces no debuginfo %global debug_package %{nil} %description gstr is a single-header UTF-8 string library for C providing grapheme-aware functions that operate on what users perceive as characters, not bytes. %package devel Summary: Development files for %{name} BuildArch: noarch Provides: %{name}-static = %{version}-%{release} %description devel gstr is a single-header UTF-8 string library for C providing grapheme-aware functions that operate on what users perceive as characters, not bytes. Handles emoji, CJK, combining marks, and all Unicode correctly using UAX #29 grapheme cluster segmentation and Unicode 17.0.0 character property tables. Zero dependencies. 61 functions in two layers: UTF-8 layer (15): utf8_decode, utf8_encode, utf8_valid, utf8_next, utf8_prev, utf8_cpcount, utf8_next_grapheme, utf8_prev_grapheme, utf8_cpwidth, utf8_charwidth, utf8_is_zerowidth, utf8_is_wide, utf8_truncate, gstr_is_unicode_punctuation, gstr_is_whitespace_cp Grapheme layer (46): gstrlen, gstrnlen, gstrwidth, gstroff, gstrat, gstrcmp, gstrncmp, gstrcasecmp, gstrncasecmp, gstrstartswith, gstrendswith, gstrchr, gstrrchr, gstrstr, gstrrstr, gstrcasestr, gstrcount, gstrspn, gstrcspn, gstrpbrk, gstrsub, gstrcpy, gstrncpy, gstrcat, gstrncat, gstrdup, gstrndup, gstrsep, gstrltrim, gstrrtrim, gstrtrim, gstrrev, gstrreplace, gstrlower, gstrupper, gstrellipsis, gstrfill, gstrlpad, gstrrpad, gstrpad, gstrwtrunc, gstrwlpad, gstrwrpad, gstrwpad, gstr_is_whitespace, gstr_is_whitespace_ascii %prep %autosetup %build # Header-only library, nothing to compile. Generate the pkg-config file. sed -e 's|@PREFIX@|%{_prefix}|g' \ -e 's|@VERSION@|%{version}|g' \ gstr.pc.in > gstr.pc %check # Run the assertion-based test suites (they use the shared test_macros.h, need # test/ on the include path, and return non-zero on failure). The grapheme-walk # binary is intentionally excluded: it is a diagnostic visualization tool that # always exits 0 (so it gates nothing) and prints raw, deliberately invalid # UTF-8 to demonstrate malformed-input handling, which aborts the # unbuffer/expect wrapper that COPR runs the build under. for t in test_gstr test_utf8_layer test_edge_cases \ test_mcdc_grapheme_break test_unicode_punct; do gcc %{optflags} -I include -I test -o $t test/$t.c ./$t done %install install -d -m 0755 %{buildroot}%{_includedir} install -p -m 0644 include/gstr.h %{buildroot}%{_includedir}/gstr.h install -d -m 0755 %{buildroot}%{_datadir}/pkgconfig install -p -m 0644 gstr.pc %{buildroot}%{_datadir}/pkgconfig/gstr.pc %files devel %license LICENSE %doc README.md %{_includedir}/gstr.h %{_datadir}/pkgconfig/gstr.pc %changelog * Thu Jun 25 2026 Edward J Edmonds - 3.0.1-2 - Drop the grapheme-walk diagnostic from %%check: it always exits 0 (gates nothing) and prints raw invalid UTF-8 that aborts COPR's unbuffer/expect build wrapper. The five assertion suites still run and gate the build. * Thu Jun 25 2026 Edward J Edmonds - 3.0.1-1 - Update to 3.0.1 (packaging metadata fix; library header unchanged from 3.0.0) - Upstream now ships the canonical project URL in gstr.pc.in, so drop the spec-side URL override when generating the pkg-config file * Thu Jun 25 2026 Edward J Edmonds - 3.0.0-1 - Update to 3.0.0 - Add Unicode punctuation/symbol classification (gstr_is_unicode_punctuation, CommonMark 0.31.2 definition) and Unicode White_Space classification (gstr_is_whitespace, gstr_is_whitespace_ascii, gstr_is_whitespace_cp) - Update Unicode character property tables to Unicode 17.0.0 - Ship a pkg-config file (provides pkgconfig(gstr)) - Use the canonical project URL (github.com/deths74r/gstr) for URL, Source0, and the generated pkg-config file - Run the full test suite (6 suites) in %%check - Drop obsolete gstr-zig removal from %%prep (no longer present in the source) * Wed Feb 11 2026 Edward J Edmonds - 2.0.2-3 - Make main package archful so tests run on all architectures in koji - Move detailed description to devel subpackage - Add %%{optflags} to test compilation in %%check - Disable debuginfo generation (header-only library has no compiled binaries) - Add SPDX license headers to source files and README.md * Fri Jan 23 2026 Edward J Edmonds - 2.0.0-1 - Initial package