Name:tree-sitter-json Version: 0.21.0 %global libname lib%{name} %global summary JSON grammar for Tree-sitter %global desc Add support for JSON to Tree-sitter, an incremental parsing system for \ programming tools. Release: %autorelease Summary: %{summary} License: MIT URL: https://github.com/tree-sitter/%{name} Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: libtree-sitter-devel BuildRequires: make %description %{desc} %package -n %{libname} Summary: %{summary} Recommends: libtree-sitter Enhances: libtree-sitter %description -n %{libname} %{desc} %package -n %{libname}-devel Summary: Development files for %{libname} Requires: %{libname}%{?_isa} = %{version}-%{release} %description -n %{libname}-devel Libraries and header files for developing applications that use %{name}. %prep %autosetup %build %make_build all %install %make_install PARSER_REPO_URL=%{url} \ PREFIX=%{_prefix} INCLUDEDIR=%{_includedir} LIBDIR=%{_libdir} find $RPM_BUILD_ROOT -name '*.a' -delete %{?ldconfig_scriptlets} %files -n %{libname} %license LICENSE %doc README.md %{_libdir}/%{libname}.so.* %files -n %{libname}-devel %{_includedir}/* %{_libdir}/%{libname}.so %{_libdir}/pkgconfig/*.pc %changelog %autochangelog