File rubygem-rmagick.spec of Package rubygem-rmagick

%{!?gem19_binary: %global gem19_binary /usr/bin/gem1.9}
%{!?gem19_install: %global gem19_install %gem19_binary install --verbose --local --build-root=%{buildroot}}
%if "x%{?gem19_cleanup}" == "x"
%if "0%{?rb_ver}" == "0%{?rb19_ver}"
%global gem19_cleanup %gem_cleanup
%global gem19_cleanup /usr/bin/gem_build_cleanup %{buildroot}%{_libdir}/ruby/gems/%{rb19_ver}/gems/%{mod_name}-%{version}
# spec file for package rubygem-rmagick (Version 2.13.1)
# Copyright (c) 2009 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%if 0%{?sles_version} == 11
%define gemprefix rubygem19
%define gemprefix rubygem

# norootforbuild
Name:           rubygem-rmagick
Version:        2.13.1
Release:        1.1
%define mod_name rmagick
Group:          Development/Languages/Ruby
License:        GPL-2.0+ or Ruby
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  rubygems19_with_buildroot_patch
Requires:       ruby19 >= 1.8.5
BuildRequires:  ruby19-devel >= 1.8.5
BuildRequires:  ImageMagick-devel >= 6.4.9
BuildRequires:  pkg-config
Source:         %{mod_name}-%{version}.gem
Summary:        Ruby binding to ImageMagick
RMagick is an interface between Ruby and ImageMagick.

%package -n %gemprefix-%mod_name-doc
Summary:        RDoc documentation for %{mod_name}
Group:          Development/Languages/Ruby
Requires:       %{name} = %{version}

%description -n %gemprefix-%mod_name-doc
Documentation for gem %mod_name generated at gem installation time.
Usually in RDoc and RI formats.
%gem19_install %{S:0}

%__rm -Rf "%{buildroot}%{_libdir}/ruby/gems/%{rb19_ver}/gems/%{mod_name}-%{version}/ext"
%__rm -Rf "%{buildroot}%{_libdir}/ruby/gems/%{rb19_ver}/doc/%{mod_name}-%{version}/rdoc/ext/RMagick/Makefile.html"

%{__rm} -rf %{buildroot}

%if 0%{?sles_version} == 11
%define pkg_name rubygem19-%mod_name
%package -n %pkg_name
Summary:       %{summary}
Group:         %{group}
for spec in {%_sourcedir,%_specdir}/%name.spec /dev/null; do
    [ -e $spec ] && break
awk '
 BEGIN { good=false }  
 /^Requires:/ { if (!good) print } 
 /^%/     { 
             if (good) exit
             if ($0 ~ /^%%description[[:blank:]]*$/) {
                in_desc = 1
                print "%description -n %pkg_name"
 in_desc  { print; good = 1 }
 ' $spec

%define pkg_name %name

%files -n %pkg_name


%files -n %gemprefix-%mod_name-doc
%doc %{_libdir}/ruby/gems/%{rb19_ver}/doc/%{mod_name}-%{version}

* Tue Sep 18 2012 -
- Initial package