Hello community,

here is the log from the commit of package ruby for openSUSE:Factory checked in 
at 2012-07-04 09:08:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ruby (Old)
 and      /work/SRC/openSUSE:Factory/.ruby.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ruby", Maintainer is "mrueck...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ruby/ruby.changes        2012-06-25 
14:50:13.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ruby.new/ruby.changes   2012-07-04 
09:08:47.000000000 +0200
@@ -1,0 +2,13 @@
+Tue Jul  3 08:02:01 UTC 2012 - sasc...@suse.de
+
+- Provide the following new RPM macros:
+  + %gem_unpack
+  + %gem_build
+  + %gem_install (retaining the old behavior)
+
+-------------------------------------------------------------------
+Mon Jul  2 14:06:43 UTC 2012 - co...@suse.com
+
+- add automatic provides and requires for rubygems
+
+-------------------------------------------------------------------

New:
----
  rubygems.attr
  rubygemsdeps.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ruby.spec ++++++
--- /var/tmp/diff_new_pack.sIzgS0/_old  2012-07-04 09:08:48.000000000 +0200
+++ /var/tmp/diff_new_pack.sIzgS0/_new  2012-07-04 09:08:48.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ruby
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 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
@@ -15,21 +15,24 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Name:           ruby
 Version:        1.9.3
 Release:        0
 #
-License:        MIT
-Group:          Development/Languages/Ruby
 #
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        ruby.macros
 Source1:        gem_build_cleanup
 Source2:        gemrc
 Source3:        ruby.common-macros
+Source4:        rubygems.attr
+Source5:        rubygemsdeps.sh
 Provides:       /usr/bin/ruby
 Url:            http://www.ruby-lang.org/
 Summary:        An Interpreted Object-Oriented Scripting Language
+License:        MIT
+Group:          Development/Languages/Ruby
 Requires:       ruby19
 Provides:       rubygems = 1.8.15
 Obsoletes:      rubygems < 1.8.15
@@ -64,17 +67,18 @@
 BeOS, and more)
 
 %package devel
-Group:          Development/Languages/Ruby
 Summary:        Development files to link against Ruby
-Requires:       ruby19-devel %{name}
+Group:          Development/Languages/Ruby
+Requires:       %{name}
+Requires:       ruby19-devel
 Provides:       rubygems_with_buildroot_patch
 
 %description devel
 Development files to link against Ruby.
 
 %package common
-Group:          Development/Languages/Ruby
 Summary:        Files needed by all ruby versions
+Group:          Development/Languages/Ruby
 
 %description common
 Development files to link against Ruby.
@@ -93,6 +97,8 @@
 install -D -m 0644 %{S:0} $RPM_BUILD_ROOT/etc/rpm/macros.ruby
 install -D -m 0644 %{S:3} $RPM_BUILD_ROOT/etc/rpm/macros.common-ruby
 install -D -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/gemrc
+install -D -m 0644 %{S:4} 
$RPM_BUILD_ROOT/%{_rpmconfigdir}/fileattrs/rubygems.attr
+install -D -m 0755 %{S:5} $RPM_BUILD_ROOT/%{_rpmconfigdir}/rubygemsdeps.sh
 export NO_BRP_STALE_LINK_ERROR=yes
 
 %files
@@ -109,5 +115,8 @@
 %defattr(-,root,root)
 /etc/gemrc
 /etc/rpm/macros.common-ruby
+%{_rpmconfigdir}/fileattrs/rubygems.attr
+%{_rpmconfigdir}/rubygemsdeps.sh
 %_bindir/gem_build_cleanup
 
+%changelog

++++++ ruby.macros ++++++
--- /var/tmp/diff_new_pack.sIzgS0/_old  2012-07-04 09:08:48.000000000 +0200
+++ /var/tmp/diff_new_pack.sIzgS0/_new  2012-07-04 09:08:48.000000000 +0200
@@ -1,8 +1,8 @@
 %gem_install                       %{gem19_install}
-%gem_cleanup                       /usr/bin/gem_build_cleanup 
%{buildroot}%{_libdir}/ruby/gems/%{rb_ver}
 %rubygems_requires                 %{rubygems19_requires}
 
 %rb_binary                         %{rb19_binary}
+%gem_binary                        /usr/bin/gem
 %rb_arch %{rb19_arch}
 %rb_ver %{rb19_ver}
 
@@ -26,3 +26,45 @@
 %rb_vendorlib                      %rb19_vendorlibdir
 %rb_vendorarch                     %rb19_vendorarchdir
 
+# %%gem_unpack macro unpacks a gem file into %%{_builddir}
+#
+# example:
+#   %prep
+#   %gem_unpack %{SOURCE0}
+#   %patch1 -p1
+#
+%gem_unpack() \
+if [ %# -eq 0 ]; then \
+    %{gem_binary} unpack --verbose %{SOURCE0} \
+else \
+    %{gem_binary} unpack --verbose %1 \
+fi \
+cd %{mod_name}-%{version} \
+%{nil}
+
+# %%gem_build macro ...
+#
+%gem_build() \
+GEMSPEC_SOURCE_DIR=`find . -maxdepth 2 -type f -name "*.gemspec" | xargs 
dirname` \
+cd $GEMSPEC_SOURCE_DIR && %{gem_binary} build --verbose *.gemspec \
+%{nil}
+
+# %%gem_install macro ...
+#
+# When invoked with a single parameter, the macro retains the old macro 
behavior, i.e. 
+# building the upstream gem directly in $RPM_BUILD_ROOT without unpacking to 
%{_builddir} first.
+#
+%gem_install() \
+if [ %# -eq 1 ]; then \
+    %{gem_binary} install --verbose --local --build-root=%{buildroot} \
+else \
+    GEM_FILE=`find . -maxdepth 2 -type f -name "%{mod_name}-%{version}.gem"` \
+    %{gem_binary} install --verbose --local --bindir %{buildroot}%{_bindir} 
--install-dir %{buildroot}%{_libdir}/ruby/gems/%{rb_ver} $GEM_FILE \
+fi \
+%{nil}
+
+%gem_cleanup() \
+/usr/bin/gem_build_cleanup %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/ \
+%{nil}
+
+

++++++ rubygems.attr ++++++
%__rubygems_requires    %{_rpmconfigdir}/rubygemsdeps.sh --requires
%__rubygems_provides        %{_rpmconfigdir}/rubygemsdeps.sh --provides
%__rubygems_path            ^%{_libdir}/ruby/gems/.*/specifications

++++++ rubygemsdeps.sh ++++++
#!/bin/bash

[ $# -ge 1 ] || {
    cat > /dev/null
    exit 0
}

case $1 in
-P|--provides)
    shift
    RPM_BUILD_ROOT="$1"
    while read possible
    do
        case "$possible" in
        *.gemspec)
            possible=${possible##*/}
            possible=${possible%.gemspec} 
            echo "$possible" | sed -e 's,^\(.*\)-,rubygem(\1) = ,'
            ;;
        esac
    done
    ;;
-R|--requires)
    while read possible ; do
        case "$possible" in
        *.gemspec)
            echo "$possible" | sed -ne 's,.*/gems/,ruby(abi) = ,; s,/.*,,p'
            ;;
        esac
    done
    ;;
esac
exit 0
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to