[packages/tree-sitter-c] new
atler
atler at pld-linux.org
Wed Jun 26 20:54:32 CEST 2024
commit fd3c71c72b8f5dff3fd55705ce7a4823c1e92982
Author: Jan Palus <atler at pld-linux.org>
Date: Wed Jun 26 20:40:39 2024 +0200
new
tree-sitter-c.spec | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
---
diff --git a/tree-sitter-c.spec b/tree-sitter-c.spec
new file mode 100644
index 0000000..e81273a
--- /dev/null
+++ b/tree-sitter-c.spec
@@ -0,0 +1,55 @@
+Summary: C grammar for tree-sitter
+Name: tree-sitter-c
+Version: 0.20.7
+Release: 1
+License: MIT
+Group: Libraries
+Source0: https://github.com/tree-sitter/tree-sitter-c/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 221b26911b81e1645447a4d237287682
+URL: https://github.com/tree-sitter/tree-sitter-c
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define ts_c_soname libtree-sitter-c.so.0
+
+%description
+C grammar for tree-sitter.
+
+%package -n neovim-parser-c
+Summary: C parser for Neovim
+Group: Applications/Editors
+Requires: %{name} = %{version}-%{release}
+
+%description -n neovim-parser-c
+C parser for Neovim.
+
+%prep
+%setup -q
+
+%build
+%{__cc} %{rpmcppflags} %{rpmcflags} -fPIC -shared -Wl,-soname,%{ts_c_soname} src/parser.c -o libtree-sitter-c.so.%{version} %{rpmldflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_libdir}/nvim/parser}
+
+cp -p libtree-sitter-c.so.%{version} $RPM_BUILD_ROOT%{_libdir}
+%{__ln_s} libtree-sitter-c.so.%{version} $RPM_BUILD_ROOT%{_libdir}/%{ts_c_soname}
+
+%{__ln_s} %{_libdir}/%{ts_c_soname} $RPM_BUILD_ROOT%{_libdir}/nvim/parser/c.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-c.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/%{ts_c_soname}
+
+%files -n neovim-parser-c
+%defattr(644,root,root,755)
+%{_libdir}/nvim/parser/c.so
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/tree-sitter-c.git/commitdiff/fd3c71c72b8f5dff3fd55705ce7a4823c1e92982
More information about the pld-cvs-commit
mailing list