diff --git a/gem_build_cleanup b/gem_build_cleanup deleted file mode 100644 index d3d49f3..0000000 --- a/gem_build_cleanup +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -if [ ${#*} = 1 ] ; then - if [ -d "$1" ] ; then - find $1 \ - \( -name \*.o -o -name Makefile -o -name config.log -o -name config.status -o -name Makefile.html -o -name gem_make.out -o -name mkmf.log -o -name \*.bak -o -name .deps -o -name .libs -o -name CVS \) \ - -print0 | xargs -r0 rm -rv || : - else - echo "'$1' does not exists or is not a directory! Exiting." >&2 - exit 1 - fi -else - echo "Please pass exact one argument to this script! Exiting." >&2 - exit 1 -fi diff --git a/ruby.changes b/ruby.changes index acf7244..5ba3af2 100644 --- a/ruby.changes +++ b/ruby.changes @@ -1,3 +1,57 @@ +------------------------------------------------------------------- +Thu Jul 26 07:36:15 UTC 2012 - coolo@suse.com + +- split out ruby-common into a package on its own + +------------------------------------------------------------------- +Wed Jul 25 14:52:49 UTC 2012 - coolo@suse.com + +- map the != operator to > - which might be wrong in 50% of all cases + +------------------------------------------------------------------- +Wed Jul 25 14:39:43 UTC 2012 - coolo@suse.com + +- require a patched rpm in case rpm does not have magic hooks + +------------------------------------------------------------------- +Wed Jul 25 12:17:02 UTC 2012 - coolo@suse.com + +- move the option parsing to a shell script that is able to do it + rightly (rpm macros are just *BAD*) + +------------------------------------------------------------------- +Wed Jul 25 11:09:28 UTC 2012 - coolo@suse.com + +- make the rubygemdeps a ruby script much more clever about gemspecs + +------------------------------------------------------------------- +Wed Jul 25 08:27:38 UTC 2012 - saschpe@suse.de + +- Another take on %gem_install, the version w/o passing parameters + seemed to be wrong + +------------------------------------------------------------------- +Wed Jul 25 05:54:25 UTC 2012 - coolo@suse.com + +- avoid *.gemspec, we get problems if we there are two + +------------------------------------------------------------------- +Tue Jul 24 15:24:43 UTC 2012 - coolo@suse.com + +- remove too relaxing permissions from unpacked archive + +------------------------------------------------------------------- +Tue Jul 24 14:55:31 UTC 2012 - coolo@suse.com + +- add a provides for ruby-macros + +------------------------------------------------------------------- +Tue Jul 24 14:36:38 UTC 2012 - saschpe@suse.de + +- Fix %gem_unpack: + Fetch Gemspec from gem metadata for gems that don't package Gemspecs + but generate them programatically + ------------------------------------------------------------------- Tue Jul 17 14:15:42 UTC 2012 - saschpe@suse.de diff --git a/ruby.common-macros b/ruby.common-macros deleted file mode 100644 index 0176d9e..0000000 --- a/ruby.common-macros +++ /dev/null @@ -1,2 +0,0 @@ -%gem_cleanup /usr/bin/gem_build_cleanup %{buildroot}%{_libdir}/ruby/gems/ - diff --git a/ruby.macros b/ruby.macros index 0a02d8a..451c490 100644 --- a/ruby.macros +++ b/ruby.macros @@ -1,3 +1,26 @@ +# +# Copyright (c) 2012 SUSE Linux +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + %rubygems_requires %{rubygems19_requires} %rb_binary %{rb19_binary} @@ -25,54 +48,3 @@ %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 [ %# -ge 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; \ -if test -d $RPM_BUILD_ROOT/usr/bin; then \ - cd $RPM_BUILD_ROOT/usr/bin; \ - bins=`ls -1 *1.9 2> /dev/null`; \ - if test -n "$bins"; then \ - for bin in $bins; do \ - mv -v $bin $(echo "$bin" | sed -e 's,1.9$,,'); \ - done ;\ - fi ;\ -fi ;\ -%{nil} - -%gem_cleanup() \ -/usr/bin/gem_build_cleanup %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/ \ -%{nil} - - diff --git a/ruby.spec b/ruby.spec index 76f4eb6..87372df 100644 --- a/ruby.spec +++ b/ruby.spec @@ -19,15 +19,9 @@ Name: ruby Version: 1.9.3 Release: 0 -# -# 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 @@ -36,6 +30,7 @@ Group: Development/Languages/Ruby Requires: ruby19 Provides: rubygems = 1.8.15 Obsoletes: rubygems < 1.8.15 +Requires: ruby-common >= 1.0 %description Ruby is an interpreted scripting language for quick and easy @@ -76,48 +71,29 @@ Provides: rubygems_with_buildroot_patch %description devel Development files to link against Ruby. -%package common -Summary: Files needed by all ruby versions -Group: Development/Languages/Ruby - -%description common -Development files to link against Ruby. - %prep %build %install -install -D -m 0755 %{S:1} $RPM_BUILD_ROOT%_bindir/gem_build_cleanup +mkdir -p $RPM_BUILD_ROOT%_bindir for bin in erb gem irb rake rdoc ri ruby testrb; do ln -s %_bindir/"$bin"1.9 $RPM_BUILD_ROOT%_bindir/$bin done mkdir -p $RPM_BUILD_ROOT%_libdir ln -s %_libdir/libruby1.9.so $RPM_BUILD_ROOT%_libdir/libruby.so 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/usr/lib/rpm/fileattrs/rubygems.attr -install -D -m 0755 %{S:5} $RPM_BUILD_ROOT/usr/lib/rpm/rubygemsdeps.sh export NO_BRP_STALE_LINK_ERROR=yes %files %defattr(-,root,root) -/etc/rpm/macros.ruby -%exclude %_bindir/gem_build_cleanup +%config /etc/gemrc +%config /etc/rpm/macros.ruby %{_bindir}/* %files devel %defattr(-,root,root) %_libdir/libruby.so -%files common -%defattr(-,root,root) -/etc/gemrc -/etc/rpm/macros.common-ruby -%dir /usr/lib/rpm/fileattrs -/usr/lib/rpm/fileattrs/rubygems.attr -/usr/lib/rpm/rubygemsdeps.sh -%_bindir/gem_build_cleanup - %changelog diff --git a/rubygems.attr b/rubygems.attr deleted file mode 100644 index 9e19801..0000000 --- a/rubygems.attr +++ /dev/null @@ -1,4 +0,0 @@ -%__rubygems_requires %{_rpmconfigdir}/rubygemsdeps.sh --requires -%__rubygems_provides %{_rpmconfigdir}/rubygemsdeps.sh --provides -%__rubygems_path ^%{_libdir}/ruby/gems/[^/]*/specifications - diff --git a/rubygemsdeps.sh b/rubygemsdeps.sh deleted file mode 100644 index 90fd442..0000000 --- a/rubygemsdeps.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/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