From 9b237dbf8de22e146251fd18d680e9eb88e9f9f8e8833c162599d7b031c5b75e Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 21 Jun 2024 14:17:29 +0000 Subject: [PATCH] New dependency for neovim. I would rather not maintain this package, as I am only trying to fix #1225887 OBS-URL: https://build.opensuse.org/package/show/editors/tree-sitter-markdown?expand=0&rev=1 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + _service | 15 +++++++ tree-sitter-markdown-0.2.3.obscpio | 3 ++ tree-sitter-markdown.changes | 4 ++ tree-sitter-markdown.obsinfo | 4 ++ tree-sitter-markdown.spec | 71 ++++++++++++++++++++++++++++++ 7 files changed, 121 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 tree-sitter-markdown-0.2.3.obscpio create mode 100644 tree-sitter-markdown.changes create mode 100644 tree-sitter-markdown.obsinfo create mode 100644 tree-sitter-markdown.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..477df26 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + https://github.com/tree-sitter-grammars/tree-sitter-markdown.git + git + refs/tags/v0.2.3 + @PARENT_TAG@ + v(.*) + + + + *.tar + xz + + + diff --git a/tree-sitter-markdown-0.2.3.obscpio b/tree-sitter-markdown-0.2.3.obscpio new file mode 100644 index 0000000..300eee8 --- /dev/null +++ b/tree-sitter-markdown-0.2.3.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ab2b47ab74db56b99921a03fe518437490d1a153bdc9987538e57ed36061ae0 +size 5488141 diff --git a/tree-sitter-markdown.changes b/tree-sitter-markdown.changes new file mode 100644 index 0000000..cc42680 --- /dev/null +++ b/tree-sitter-markdown.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Fri Jun 21 11:23:55 UTC 2024 - Richard Rahl + +- initial packaging diff --git a/tree-sitter-markdown.obsinfo b/tree-sitter-markdown.obsinfo new file mode 100644 index 0000000..fca3087 --- /dev/null +++ b/tree-sitter-markdown.obsinfo @@ -0,0 +1,4 @@ +name: tree-sitter-markdown +version: 0.2.3 +mtime: 1711101125 +commit: 62516e8c78380e3b51d5b55727995d2c511436d8 diff --git a/tree-sitter-markdown.spec b/tree-sitter-markdown.spec new file mode 100644 index 0000000..b667d00 --- /dev/null +++ b/tree-sitter-markdown.spec @@ -0,0 +1,71 @@ +# +# spec file for package tree-sitter-markdown +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define _name markdown +Name: tree-sitter-%{_name} +Version: 0.7.1 +Release: 0 +Summary: Markdown grammar for tree-sitter +License: MIT +URL: https://github.com/ikatyang/tree-sitter-markdown +Source: %{name}-%{version}.tar.xz +BuildRequires: tree-sitter + +%description +The parser is designed to read markdown according to the CommonMark Spec, but +some extensions to the spec from different sources such as Github flavored +markdown are also included. These can be toggled on or off at compile time. + +%package devel +Summary: Devel files for %{name} + +%description devel +Development files for %{name}. + +%prep +%autosetup -p1 +cd tree-sitter-markdown +tree-sitter generate --no-bindings src/grammar.json +cd .. +cd tree-sitter-markdown-inline +tree-sitter generate --no-bindings src/grammar.json +cd .. + +%build +%make_build + +%install +%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} +mv %{buildroot}%{_libdir}/libtree-sitter-markdown.so.0.2 %{buildroot}%{_libdir}/libtree-sitter-markdown.so +mv %{buildroot}%{_libdir}/libtree-sitter-markdown-inline.so.0.2 %{buildroot}%{_libdir}/libtree-sitter-markdown-inline.so +#remove unncessary stuff +rm -rf %{buildroot}%{_prefix}/lib +rm %{buildroot}%{_libdir}/libtree-sitter-markdown{.so.0,-inline.so.0} +rm %{buildroot}%{_libdir}/libtree-sitter-{markdown-inline.a,markdown.a} + +%files +%license LICENSE +%doc README.md +%{_libdir}/libtree-sitter-markdown.so +%{_libdir}/libtree-sitter-markdown-inline.so + +%files devel +%{_includedir}/tree_sitter +%{_libdir}/pkgconfig/tree-sitter-markdown* + +%changelog