%define debug_package %{nil} %define _build_id_links none Name: tree-sitter Version: 0.26.13 Release: %autorelease Summary: An incremental parsing system for programming tools License: MIT URL: https://tree-sitter.github.io/ Source0: https://github.com/tree-sitter/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: make %description Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. %package -n lib%{name} Summary: Incremental parsing library for programming tools %description -n lib%{name} Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. This is the package with the dynamically linked C library. %package -n lib%{name}-devel Summary: Development files for %{name} Requires: lib%{name}%{?_isa} = %{version}-%{release} %description -n lib%{name}-devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %autosetup -p1 %build %set_build_flags export PREFIX='%{_prefix}' LIBDIR='%{_libdir}' %make_build %install export PREFIX='%{_prefix}' LIBDIR='%{_libdir}' INCLUDEDIR='%{_includedir}' %make_install find %{buildroot}%{_libdir} -type f \( -name "*.la" -o -name "*.a" \) -delete -print install -d %{buildroot}%{_datadir}/tree-sitter/queries %files -n lib%{name} %dir %{_datadir}/tree-sitter %dir %{_datadir}/tree-sitter/queries %{_libdir}/libtree-sitter.so.0* %files -n lib%{name}-devel %{_includedir}/tree_sitter %{_libdir}/libtree-sitter.so %{_libdir}/pkgconfig/tree-sitter.pc %changelog %autochangelog