Name: tree-sitter-cmake Version: 0.5.0 %global libname lib%{name} %global summary CMake grammar for Tree-sitter %global desc Add support for CMake to Tree-sitter, an incremental parsing system for \ programming tools. Release: %autorelease Summary: %{summary} License: MIT URL: https://github.com/uyha/%{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.rst %{_libdir}/%{libname}.so.* %files -n %{libname}-devel %{_includedir}/* %{_libdir}/%{libname}.so %{_libdir}/pkgconfig/*.pc %changelog %autochangelog