From 3add839596f8364c9f28ad19f9f76518fdd30358 Mon Sep 17 00:00:00 2001 From: "Jeremiah D. Powell" Date: Mon, 24 Aug 2015 01:29:31 -0500 Subject: [PATCH] update with snippets --- CHANGELOG.md | 3 +++ package.json | 4 ++-- snippets/rpm-spec.cson | 29 +++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fb0fcd..527f311 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.7.1 - sneaky snippets +* add snippets for some annoying to remember patterns + ## 0.7.0 - careful commands * common commands detected * %package sections stand out diff --git a/package.json b/package.json index d034a5e..d137c0e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "language-rpm-spec", "main": "./lib/language-rpm-spec", - "version": "0.7.0", + "version": "0.7.1", "description": "Syntax highlighting for RPM Specfiles", "keyswords": [ "rpm", @@ -11,7 +11,7 @@ "specfile" ], "engines": { - "atom": ">=1.0.0 <2.0.0", + "atom": ">=1.0.0", "node": "*" }, "homepage": "http://atom.github.io", diff --git a/snippets/rpm-spec.cson b/snippets/rpm-spec.cson index c57a122..0b3d7e4 100644 --- a/snippets/rpm-spec.cson +++ b/snippets/rpm-spec.cson @@ -13,3 +13,32 @@ # Please submit bugfixes or comments via # https://github.com/waveclaw/language-rpm-spec/issues # +'.source.rpm-spec': + 'subpackage': + 'prefix': '%pack' + 'body': """ + %package $1 + Group: foo + Summary: bar + %description $1 + baz + + %files $1 + """ + 'build': + 'prefix': '%bld' + 'body': """ + %build + %configure + %if %{defined make_jobs} + %{make_jobs} %{?_smp_mflags} + %else + %{__make} %{?_smp_mflags} + %endif + """ + 'install': + 'prefix': '%inst' + 'body': """ + %install + %{__make} install DESTDIR=%{buildroot} %{?_smp_mflags} + """