diff options
Diffstat (limited to 'snippets')
-rw-r--r-- | snippets/changes.json | 12 | ||||
-rw-r--r-- | snippets/changes.snippets | 6 | ||||
-rw-r--r-- | snippets/spec.json | 81 | ||||
-rw-r--r-- | snippets/spec.snippets | 53 |
4 files changed, 93 insertions, 59 deletions
diff --git a/snippets/changes.json b/snippets/changes.json new file mode 100644 index 0000000..b1611d3 --- /dev/null +++ b/snippets/changes.json @@ -0,0 +1,12 @@ +{ + "ch" : { + "prefix" : "ch", + "body" : [ + "-------------------------------------------------------------------", + "${VIM:system('LC_TIME=en_DK date "+%a %b %e %X %Z %Y"|tr -d "\n"')` - `system('rpm --eval "%{packager}"|iconv -f utf-8 -t us-ascii//TRANSLIT')}", + "- $0", + "" + ], + "description" : "New entry of changelog" + } +} diff --git a/snippets/changes.snippets b/snippets/changes.snippets deleted file mode 100644 index 21e002c..0000000 --- a/snippets/changes.snippets +++ /dev/null @@ -1,6 +0,0 @@ -snippet ch - ------------------------------------------------------------------- - `system('LC_TIME=en_DK date "+%a %b %e %X %Z %Y"|tr -d "\n"')` - `system('rpm --eval "%{packager}"|iconv -f utf-8 -t us-ascii//TRANSLIT')` - - - ${0} - `string(\n)` 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" + } +} diff --git a/snippets/spec.snippets b/snippets/spec.snippets deleted file mode 100644 index ed6d4bc..0000000 --- a/snippets/spec.snippets +++ /dev/null @@ -1,53 +0,0 @@ -snippet sedpy - sed -i -e '1s@/usr/bin/env python@/usr/bin/python@' - -snippet fdup - %python_expand %fdupes %{buildroot}%{$python_sitelib} - -snippet nopy - %define skip_python2 1 - -snippet pyurl - Source: https://files.pythonhosted.org/packages/source/X/%{modname}/%{modname}-%{version}.tar.gz - -snippet ghurl - Source: https://github.com/XXX/%{modname}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz - -snippet pycache - %pycache_only %{python_sitelib}/__pycache__ - -snippet pyt - %python_expand py.test-%{$python_bin_suffix} -v - -snippet patch - # PATCH-{FIX|FEATURE}-{OPENSUSE|SLE|UPSTREAM} name-of-file.patch bsc#[0-9]+ mcepl@suse.com - # this patch makes things totally awesome - Patch0: - -snippet pyc - $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/ - $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/ - -snippet lic - %{?!license:%define license %doc} - -snippet multi - %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} - -snippet alt - Requires(post): update-alternatives - Requires(postun): update-alternatives - %python_clone -a execname - %post - %python_install_alternative execname - - %postun - %python_uninstall_alternative execname |