summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVít Ondruch <vondruch@redhat.com>2015-10-07 18:56:47 +0200
committerVít Ondruch <vondruch@redhat.com>2015-10-07 18:56:47 +0200
commited43acdb963dd0a40e319bca5788be2a6b645582 (patch)
tree5b5c1de7480abd45d3df6531bebea008b3db185a
parentdb5e620d1eae483dcd97fa46595e3aebe023eec0 (diff)
downloadvim-commentary-ed43acdb963dd0a40e319bca5788be2a6b645582.tar.gz
vim-commentary-ed43acdb963dd0a40e319bca5788be2a6b645582.tar.xz
vim-commentary-ed43acdb963dd0a40e319bca5788be2a6b645582.zip
Initial package.HEADmaster
-rw-r--r--vim-commentary.metainfo.xml11
-rw-r--r--vim-commentary.spec64
2 files changed, 75 insertions, 0 deletions
diff --git a/vim-commentary.metainfo.xml b/vim-commentary.metainfo.xml
new file mode 100644
index 0000000..f18862e
--- /dev/null
+++ b/vim-commentary.metainfo.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="addon">
+<id>vim-commentary</id>
+<extends>gvim.desktop</extends>
+<name>commentary.vim</name>
+<summary>Comment stuff out; takes a motion as a target</summary>
+<url type="homepage">http://www.vim.org/scripts/script.php?script_id=3695</url>
+<metadata_license>CC0-1.0</metadata_license>
+<project_license>VIM</project_license>
+<updatecontact>v.ondruch@gmail.com</updatecontact>
+</component>
diff --git a/vim-commentary.spec b/vim-commentary.spec
new file mode 100644
index 0000000..5887dde
--- /dev/null
+++ b/vim-commentary.spec
@@ -0,0 +1,64 @@
+# There is no better way how to obtain the vimfiles folder location :/
+# https://bugzilla.redhat.com/show_bug.cgi?id=844975
+%global vimfiles %{_datadir}/vim/vimfiles
+
+%global appdata_dir %{_datadir}/appdata
+
+Name: vim-commentary
+Version: 1.2
+Release: 1%{?dist}
+Summary: Comment stuff out; takes a motion as a target
+Group: Applications/Editors
+License: Vim
+URL: http://www.vim.org/scripts/script.php?script_id=3695
+Source0: https://github.com/tpope/vim-commentary/archive/v%{version}/%{name}-%{version}.tar.gz
+# Plug-in AppData for Gnome Software.
+# https://github.com/tpope/vim-commentary/pull/52
+Source1: vim-commentary.metainfo.xml
+Requires: vim-common
+Requires(post): %{_bindir}/vim
+Requires(postun): %{_bindir}/vim
+# Needed for AppData check.
+BuildRequires: libappstream-glib
+BuildArch: noarch
+
+%description
+Comment stuff out. Use gcc to comment out a line (takes a count), gc to
+comment out the target of a motion (for example, gcap to comment out a
+paragraph), and gc in visual mode to comment out the selection. That's it.
+
+%prep
+%setup -q
+
+%build
+
+
+%install
+mkdir -p %{buildroot}%{vimfiles}
+cp -pr doc plugin %{buildroot}%{vimfiles}
+
+# Install AppData.
+mkdir -p %{buildroot}%{appdata_dir}
+install -m 644 %{SOURCE1} %{buildroot}%{appdata_dir}
+
+%check
+# Check the AppData add-on to comply with guidelines.
+appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.metainfo.xml
+
+%post
+vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null
+
+%postun
+> %{vimfiles}/doc/tags
+vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null
+
+%files
+%doc CONTRIBUTING.markdown README.markdown
+%{vimfiles}/doc/*
+%{vimfiles}/plugin/*
+%{appdata_dir}/vim-commentary.metainfo.xml
+
+
+%changelog
+* Wed Oct 07 2015 Vít Ondruch <vondruch@redhat.com> - 1.2-1
+- Initial package.