File project.diff of Package rubygem-diff-lcs

--- rubygem-diff-lcs.changes.orig
+++ rubygem-diff-lcs.changes
@@ -1,4 +1,9 @@
 -------------------------------------------------------------------
+Sun Mar  2 06:00:54 UTC 2014 - nkrinner@suse.com
+
+- Regenerate specfile referencing new ruby packaging rules 
+
+-------------------------------------------------------------------
 Wed Nov 30 14:23:31 UTC 2011 - schubi@suse.com
 
 - added provides: rubygem-diff-lcs-1_1 
--- rubygem-diff-lcs.spec.orig
+++ rubygem-diff-lcs.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-diff-lcs
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 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
@@ -21,14 +21,18 @@ Version:        1.1.3
 Release:        0
 %define mod_name diff-lcs
 %define mod_full_name %{mod_name}-%{version}
+%define mod_branch -%{version}
+%define mod_weight 10103
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  ruby-macros >= 1
-Source:         %{mod_full_name}.gem
-Summary:        Diff::LCS is a port of Perl's Algorithm::Diff that uses the McIlroy-Hunt longest common subsequence (LCS) algorithm to compute intelligent differences between two sequenced enumerable containers
+BuildRequires:  rubygem(rdoc) > 3.10
+BuildRequires:  update-alternatives
+Source:         http://rubygems.org/gems/%{mod_full_name}.gem
+Summary:        Diff::LCS is a port of Perl's Algorithm::Diff that uses the
 License:        GPLv2+ or Ruby
 Group:          Development/Languages/Ruby
-Patch1:         fix-interpreter.diff
+PreReq:         update-alternatives
 
 %description
 Diff::LCS is a port of Perl's Algorithm::Diff that uses the McIlroy-Hunt
@@ -67,19 +71,51 @@ Requires:       %{name} = %{version}
 Test::Unit or RSpec files, useful for developers.
 
 %prep
-%gem_unpack
-%patch1 -p1
+#gem_unpack
+#if you need patches, apply them here and replace the # with a % sign in the surrounding lines
+#gem_build
 
 %build
-%gem_build
 
 %install
 %gem_install -f
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+mv %{buildroot}%{_bindir}/htmldiff{,%{mod_branch}}
+touch %{buildroot}%{_sysconfdir}/alternatives/htmldiff
+ln -s %{_sysconfdir}/alternatives/htmldiff %{buildroot}%{_bindir}/htmldiff
+
+mv %{buildroot}%{_bindir}/ldiff{,%{mod_branch}}
+touch %{buildroot}%{_sysconfdir}/alternatives/ldiff
+ln -s %{_sysconfdir}/alternatives/ldiff %{buildroot}%{_bindir}/ldiff
+
+mkdir -p %{buildroot}%{_docdir}/%{name}
+ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/History.rdoc %buildroot/%{_docdir}/%{name}/History.rdoc
+ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/License.rdoc %buildroot/%{_docdir}/%{name}/License.rdoc
+ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/README.rdoc %buildroot/%{_docdir}/%{name}/README.rdoc
+
+%post
+/usr/sbin/update-alternatives --install \
+    %{_bindir}/htmldiff htmldiff %{_bindir}/htmldiff%{mod_branch} %{mod_weight}
+/usr/sbin/update-alternatives --install \
+    %{_bindir}/ldiff ldiff %{_bindir}/ldiff%{mod_branch} %{mod_weight}
+
+%preun
+if [ "$1" = 0 ] ; then
+    /usr/sbin/update-alternatives --remove htmldiff %{_bindir}/htmldiff%{mod_branch}
+fi
+if [ "$1" = 0 ] ; then
+    /usr/sbin/update-alternatives --remove ldiff %{_bindir}/ldiff%{mod_branch}
+fi
 
 %files
 %defattr(-,root,root,-)
+%{_docdir}/%{name}
+%{_bindir}/htmldiff%{mod_branch}
 %{_bindir}/htmldiff
+%ghost %{_sysconfdir}/alternatives/htmldiff
+%{_bindir}/ldiff%{mod_branch}
 %{_bindir}/ldiff
+%ghost %{_sysconfdir}/alternatives/ldiff
 %{_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}/spec
openSUSE Build Service is sponsored by