-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtextparser.spec
More file actions
103 lines (79 loc) · 2.84 KB
/
Copy pathtextparser.spec
File metadata and controls
103 lines (79 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
%global git_version %(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo 1.0.12)
Name: textparser
Version: %{?pkg_version}%{!?pkg_version:%{git_version}}
Release: 1%{?dist}
Summary: High-performance, extensible text parsing CLI
License: MIT
URL: https://github.com/bokic/textparser
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake >= 3.15
BuildRequires: ninja-build
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: python3
BuildRequires: pcre2-devel >= 10.42
BuildRequires: json-c-devel
BuildRequires: gtest-devel
Requires: libtextparser%{?_isa} = %{version}-%{release}
Requires: libtextparser-json%{?_isa} = %{version}-%{release}
%description
TextParser is a high-performance, extensible text parsing CLI and library
written in C. It uses regular expressions and native matchers to parse
language grammars and produce hierarchical Abstract Syntax Trees (ASTs).
This package provides the `textparser` CLI tool.
%package -n ccat
Summary: Colorizing cat utility using textparser
Requires: libtextparser%{?_isa} = %{version}-%{release}
%description -n ccat
ccat is a syntax-highlighting colorizing alternative to cat powered by
the textparser library.
%package -n libtextparser
Summary: Core textparser shared library
%description -n libtextparser
Shared library for the TextParser high-performance text parsing engine.
%package -n libtextparser-json
Summary: JSON definition runtime loader for textparser
Requires: libtextparser%{?_isa} = %{version}-%{release}
%description -n libtextparser-json
Shared library providing dynamic JSON grammar definition loading for textparser.
%package -n libtextparser-devel
Summary: Development files for textparser
Requires: libtextparser%{?_isa} = %{version}-%{release}
Requires: libtextparser-json%{?_isa} = %{version}-%{release}
%description -n libtextparser-devel
Header files, pkg-config files, and CMake configuration for developing
applications with libtextparser.
%prep
%autosetup
%build
%cmake -G Ninja \
-DTEXTPARSER_VERSION_TAG="%{version}" \
-DBUILD_TESTS=ON \
-DBUILD_BENCHMARKS=OFF
%cmake_build
%install
%cmake_install
%check
%ctest
%files
%{_bindir}/textparser
%files -n ccat
%{_bindir}/ccat
%files -n libtextparser
%license LICENSE
%doc README.md
%{_libdir}/libtextparser.so.*
%files -n libtextparser-json
%{_libdir}/libtextparser-json.so.*
%files -n libtextparser-devel
%{_includedir}/textparser.h
%{_includedir}/textparser.hpp
%{_includedir}/textparser-json.h
%{_libdir}/libtextparser.so
%{_libdir}/libtextparser-json.so
%{_libdir}/pkgconfig/textparser.pc
%{_libdir}/pkgconfig/textparser-json.pc
%{_libdir}/cmake/textparser/
%changelog
* Sun Aug 30 2026 Boris <boris@example.com> - 1.0.12-1
- Initial Fedora package release with subpackages