From 910037124ca99f84c481634f43f6e9b22d61cae950e30567a62fd6cb34741dfb Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 22 Nov 2013 09:18:16 +0000 Subject: [PATCH] update OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby:extensions/rubygem-mustache?expand=0&rev=2 --- mustache-0.99.4.gem | 3 -- mustache-0.99.5.gem | 3 ++ rubygem-mustache.changes | 5 +++ rubygem-mustache.spec | 88 ++++++++++++++++++++++++++++++---------- 4 files changed, 74 insertions(+), 25 deletions(-) delete mode 100644 mustache-0.99.4.gem create mode 100644 mustache-0.99.5.gem diff --git a/mustache-0.99.4.gem b/mustache-0.99.4.gem deleted file mode 100644 index 3f0f422..0000000 --- a/mustache-0.99.4.gem +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7e8bda00c054c026d0bcea10dfa587907bf96c19c9a66317bc21fe391b36985 -size 39936 diff --git a/mustache-0.99.5.gem b/mustache-0.99.5.gem new file mode 100644 index 0000000..ee30d18 --- /dev/null +++ b/mustache-0.99.5.gem @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c84be205017ada80aa4d4ad16b7af4bd89f840b26125a0e8eead5a914d279005 +size 41472 diff --git a/rubygem-mustache.changes b/rubygem-mustache.changes index 16c189e..cdebf2e 100644 --- a/rubygem-mustache.changes +++ b/rubygem-mustache.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 22 08:40:26 UTC 2013 - coolo@suse.com + +- updated to version 0.99.5 + ------------------------------------------------------------------- Sat Mar 24 16:40:07 CET 2012 - berendt@b1-systems.de diff --git a/rubygem-mustache.spec b/rubygem-mustache.spec index a04a949..b7b88fe 100644 --- a/rubygem-mustache.spec +++ b/rubygem-mustache.spec @@ -1,8 +1,7 @@ # -# spec file for package rubygem-mustache (Version 0.99.4) +# spec file for package rubygem-mustache # -# Copyright (c) 2012 B1 Systems GmbH, Vohburg, Germany. -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,23 +15,25 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild + Name: rubygem-mustache -Version: 0.99.4 +Version: 0.99.5 Release: 0 %define mod_name mustache -# -Group: Development/Languages/Ruby -License: GPLv2+ or Ruby -# +%define mod_full_name %{mod_name}-%{version} +%define mod_branch -%{version} +%define mod_weight 9905 + BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: rubygems_with_buildroot_patch -Requires: rubygems >= 1.8.15 -# +BuildRequires: ruby-macros >= 1 +BuildRequires: update-alternatives Url: http://github.com/defunkt/mustache -Source: %{mod_name}-%{version}.gem -# +Source: http://rubygems.org/gems/%{mod_full_name}.gem Summary: Mustache is a framework-agnostic way to render logic-free views +License: GPL-2.0+ or Ruby +Group: Development/Languages/Ruby +PreReq: update-alternatives + %description Inspired by ctemplate, Mustache is a framework-agnostic way to render logic-free views. @@ -44,24 +45,67 @@ consisting of ERB or HAML with random helpers and arbitrary logic, your views are broken into two parts: a Ruby class and an HTML template. +%package doc +Summary: RDoc documentation for %{mod_name} +Group: Development/Languages/Ruby +Requires: %{name} = %{version} + +%description doc +Documentation generated at gem installation time. +Usually in RDoc and RI formats. + +%package testsuite +Summary: Test suite for %{mod_name} +Group: Development/Languages/Ruby +Requires: %{name} = %{version} + +%description testsuite +Test::Unit or RSpec files, useful for developers. %prep +#gem_unpack +#if you need patches, apply them here and replace the # with a % sign in the surrounding lines +#gem_build + %build + %install -%gem_install %{S:0} +%gem_install -f +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +mv %{buildroot}%{_bindir}/mustache{,%{mod_branch}} +touch %{buildroot}%{_sysconfdir}/alternatives/mustache +ln -s %{_sysconfdir}/alternatives/mustache %{buildroot}%{_bindir}/mustache +mkdir -p %{buildroot}%{_docdir}/%{name} +ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/README.md %buildroot/%{_docdir}/%{name}/README.md +ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/LICENSE %buildroot/%{_docdir}/%{name}/LICENSE -%clean -%{__rm} -rf %{buildroot} +%post +/usr/sbin/update-alternatives --install \ + %{_bindir}/mustache mustache %{_bindir}/mustache%{mod_branch} %{mod_weight} + +%preun +if [ "$1" = 0 ] ; then + /usr/sbin/update-alternatives --remove mustache %{_bindir}/mustache%{mod_branch} +fi %files %defattr(-,root,root,-) - +%{_docdir}/%{name} +%{_bindir}/mustache%{mod_branch} %{_bindir}/mustache +%ghost %{_sysconfdir}/alternatives/mustache +%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_full_name}.gem +%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/ +%exclude %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/test +%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_full_name}.gemspec -%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_name}-%{version}.gem -%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/ -%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_name}-%{version}.gemspec -%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_name}-%{version}/ +%files doc +%defattr(-,root,root,-) +%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_full_name}/ + +%files testsuite +%defattr(-,root,root,-) +%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/test %changelog