[packages/tree-sitter-query] new

atler atler at pld-linux.org
Wed Jun 26 21:07:25 CEST 2024


commit 7cf693f143ec7d99a10ccf1567765267cd814c82
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Jun 26 20:54:54 2024 +0200

    new

 tree-sitter-query.spec | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)
---
diff --git a/tree-sitter-query.spec b/tree-sitter-query.spec
new file mode 100644
index 0000000..955a55a
--- /dev/null
+++ b/tree-sitter-query.spec
@@ -0,0 +1,92 @@
+Summary:	A tree-sitter parser for tree-sitter query files
+Name:		tree-sitter-query
+Version:	0.4.0
+Release:	1
+License:	MIT
+Group:		Libraries
+Source0:	https://github.com/tree-sitter-grammars/tree-sitter-query/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	7181d19e0b01420f33ec67584246a47c
+URL:		https://github.com/tree-sitter-grammars/tree-sitter-query
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		ts_query_soname	libtree-sitter-query.so.0
+
+%description
+A tree-sitter query file parser for tree-sitter.
+
+%package devel
+Summary:	Header files for tree-sitter-query
+Group:		Development/Libraries
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Header files for tree-sitter-query.
+
+%package static
+Summary:	Static tree-sitter-query library
+Group:		Development/Libraries
+Requires:	%{name}-devel%{?_isa} = %{version}-%{release}
+
+%description static
+Static tree-sitter-query library.
+
+%package -n neovim-parser-query
+Summary:	tree-sitter query file parser for Neovim
+Group:		Applications/Editors
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+
+%description -n neovim-parser-query
+tree-sitter query file parser for Neovim.
+
+%prep
+%setup -q
+
+%build
+%{__make} \
+	PREFIX="%{_prefix}" \
+	INCLUDEDIR="%{_includedir}" \
+	LIBDIR="%{_libdir}" \
+	PCLIBDIR="%{_pkgconfigdir}" \
+	CC="%{__cc}" \
+	CFLAGS="%{rpmcppflags} %{rpmcflags}" \
+	LDFLAGS="%{rpmldflags}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_libdir}/nvim/parser
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	PREFIX="%{_prefix}" \
+	INCLUDEDIR="%{_includedir}" \
+	LIBDIR="%{_libdir}" \
+	PCLIBDIR="%{_pkgconfigdir}"
+
+%{__ln_s} %{_libdir}/%{ts_query_soname} $RPM_BUILD_ROOT%{_libdir}/nvim/parser/query.so
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post   -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%attr(755,root,root) %{_libdir}/libtree-sitter-query.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/%{ts_query_soname}
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libtree-sitter-query.so
+%{_includedir}/tree_sitter/tree-sitter-query.h
+%{_pkgconfigdir}/tree-sitter-query.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libtree-sitter-query.a
+
+%files -n neovim-parser-query
+%defattr(644,root,root,755)
+%{_libdir}/nvim/parser/query.so
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tree-sitter-query.git/commitdiff/7cf693f143ec7d99a10ccf1567765267cd814c82



More information about the pld-cvs-commit mailing list