diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2021-04-17 19:35:56 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-03-28 17:03:06 +0100 |
commit | 95af3dc1bb19c66ce29cf928782bae4f545247e9 (patch) | |
tree | f2d68c5abb3ecabfa4535d8009893a4cf6cd8bfb /snippets/spec.json | |
parent | fd4b6f4870ff10351a85dbc1269ec9f542bac94f (diff) | |
download | vim-suse-changes-95af3dc1bb19c66ce29cf928782bae4f545247e9.tar.gz |
feat(snippets): change snippets from vim-snippets to VSCode format
Diffstat (limited to 'snippets/spec.json')
-rw-r--r-- | snippets/spec.json | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/snippets/spec.json b/snippets/spec.json new file mode 100644 index 0000000..b8425be --- /dev/null +++ b/snippets/spec.json @@ -0,0 +1,81 @@ +// snippet sedpy +// sed -i -e '1s@/usr/bin/env python@/usr/bin/python@' +// +// snippet nopy +// %define skip_python2 1 +// +// snippet pycache +// %pycache_only %{python_sitelib}/__pycache__ +// +// snippet pyc +// $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/ +// $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/ + +{ + "lic" : { + "prefix" : "lic", + "body" : [ + "%{?!license:%define license %doc}" + ], + "description" : "Missing definition of %license" + }, + "fdup" : { + "prefix" : "fdup", + "body" : [ + "%python_expand %fdupes %{buildroot}%{\$python_sitelib}" + ], + "description" : "Deduplication" + }, + "patch" : { + "prefix" : "patch", + "body" : [ + "# PATCH-{FIX|FEATURE}-{OPENSUSE|SLE|UPSTREAM} ${1:filename} ${2:bugno} mcepl@suse.com", + "# this patch makes things totally awesome", + "Patch0: $1" + ], + "description" : "Patch definition" + }, + "alt" : { + "prefix" : "alt", + "body" : [ + "Requires(post): update-alternatives", + "Requires(postun): update-alternatives", + "%python_clone -a ${1:execname}", + "%post", + "%python_install_alternative $1", + "", + "%postun", + "%python_uninstall_alternative $1" + ], + "description" : "configuration of alternatives" + }, + "multi" : { + "prefix" : "multi", + "body" : [ + "%global flavor @BUILD_FLAVOR@%{nil}", + "%if \"%{flavor}\" == \"test\"", + "%define psuffix -test", + "%bcond_without test", + "%else", + "%define psuffix %{nil}", + "%bcond_with test", + "%endif", + "Name: python-${1:name}%{psuffix}" + ], + "description" : "configuration of multibuild" + }, + "ghurl" : { + "prefix" : "ghurl", + "body" : [ + "Source: https://github.com/XXX/%{modname}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz" + ], + "description" : "URL of the upstream tarball on GitHub" + }, + "pyurl" : { + "prefix" : "pyurl", + "body" : [ + "Source: https://files.pythonhosted.org/packages/source/XXX/%{modname}/%{modname}-%{version}.tar.gz" + ], + "description" : "URL of the upstream tarball on PyPI" + } +} |