[rubygem-gdk_pixbuf2] 1.1.2

Mamoru Tasaka mtasaka at fedoraproject.org
Mon Jan 30 09:37:46 UTC 2012


commit 31b620523dea2f93ebcb417d756969eb5a34e373
Author: TASAKA Mamoru <mtasaka at localhost.localdomain>
Date:   Mon Jan 30 18:37:36 2012 +0900

    1.1.2

 .gitignore               |    1 +
 rubygem-gdk_pixbuf2.spec |  140 +++++++++++++++++++++++++++-------------------
 sources                  |    2 +-
 3 files changed, 84 insertions(+), 59 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a80e0eb..872a7f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 /gdk_pixbuf2-1.0.0.gem
 /gdk_pixbuf2-1.0.3.gem
 /gdk_pixbuf2-1.1.1.gem
+/gdk_pixbuf2-1.1.2.gem
diff --git a/rubygem-gdk_pixbuf2.spec b/rubygem-gdk_pixbuf2.spec
index 15795cb..79f37ce 100644
--- a/rubygem-gdk_pixbuf2.spec
+++ b/rubygem-gdk_pixbuf2.spec
@@ -1,27 +1,33 @@
+%if 0%{?fedora} >= 18
+%global	rubyabi	1.9.1
+%global	header_dir	%{ruby_vendorarchdir}
+%global	ruby19	1
+%else
 %global	ruby_sitelib	%(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
 %global	ruby_sitearch	%(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
 
-%global	gemdir		%(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global	gemname	gdk_pixbuf2
-%global	geminstdir	%{gemdir}/gems/%{gemname}-%{version}
+%global	rubyabi	1.8
+%global	header_dir	%{ruby_sitearch}
+%global	ruby19	0
+%endif
+
+%global	gem_name	gdk_pixbuf2
 
 %global	glibminver	1.1.0
 %global	obsoleteevr	0.90.7-1.999
 
-%global	rubyabi	1.8
-
 Summary:	Ruby binding of GdkPixbuf-2.x
-Name:		rubygem-%{gemname}
-Version:	1.1.1
-Release:	1%{?dist}
+Name:		rubygem-%{gem_name}
+Version:	1.1.2
+Release:	0.900%{?dist}
 Group:		Development/Languages
 # from README
 License:	LGPLv2
 URL:		http://ruby-gnome2.sourceforge.jp/
-Source0:	http://rubygems.org/downloads/%{gemname}-%{version}.gem
+Source0:	http://rubygems.org/downloads/%{gem_name}-%{version}.gem
 
 BuildRequires:	ruby(abi) = %{rubyabi}
-BuildRequires:	rubygems
+BuildRequires:	rubygems-devel
 BuildRequires:	rubygem-cairo-devel
 BuildRequires:	rubygem-glib2-devel >= %{glibminver}
 BuildRequires:	ruby-devel
@@ -30,7 +36,7 @@ Requires:	ruby(abi) = %{rubyabi}
 Requires:	rubygems
 Requires:	rubygem(cairo)
 Requires:	rubygem(glib2) >= %{glibminver}
-Provides:	rubygem(%{gemname}) = %{version}
+Provides:	rubygem(%{gem_name}) = %{version}
 
 %description
 Ruby/GdkPixbuf2 is a Ruby binding of GdkPixbuf-2.x.
@@ -43,46 +49,48 @@ Requires:	%{name} = %{version}-%{release}
 %description	doc
 This package contains documentation for %{name}.
 
-%package	-n ruby-%{gemname}
-Summary:	Non-Gem support package for %{gemname}
+%package	-n ruby-%{gem_name}
+Summary:	Non-Gem support package for %{gem_name}
 Group:		Development/Languages
 Requires:	%{name} = %{version}-%{release}
 # Requires for corresponsing non-gem rpms
 Requires:	ruby(cairo)
 Requires:	ruby(glib2) >= %{glibminver}
-Provides:	ruby(%{gemname}) = %{version}-%{release}
+Provides:	ruby(%{gem_name}) = %{version}-%{release}
 # For compatibility
 Obsoletes:	ruby-gdkpixbuf2 < %{obsoleteevr}
 Provides:	ruby(gdkpixbuf2) = %{version}-%{release}
 Provides:	ruby-gdkpixbuf2 = %{version}-%{release}
 
-%description	-n ruby-%{gemname}
-This package provides non-Gem support for %{gemname}.
+%description	-n ruby-%{gem_name}
+This package provides non-Gem support for %{gem_name}.
 
 %package	devel
 Summary:	Ruby/GdkPixbuf2 development environment
 Group:		Development/Languages
 Requires:	%{name} = %{version}-%{release}
 # Obsoletes / Provides
-# ruby(%%{gemname}-devel) Provides is for compatibility
+# ruby(%%{gem_name}-devel) Provides is for compatibility
 Obsoletes:	ruby-gdkpixbuf2-devel < %{obsoleteevr}
 Provides:	ruby-gdkpixbuf2-devel = %{version}-%{release}
+%if ! %{ruby19}
 Provides:	ruby(gdkpixbuf2-devel) = %{version}-%{release}
+%endif
 
 %description devel
 Header files and libraries for building a extension library for the
-rubygem-%{gemname}
+rubygem-%{gem_name}
 
 %prep
 %setup -q -c -T
-mkdir -p .%{gemdir}
+mkdir -p .%{gem_dir}
 
 export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
 export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-pkg-config-dir=$(pwd)%{_libdir}/pkgconfig"
 gem install \
 	-V \
 	--local \
-	--install-dir .%{gemdir} \
+	--install-dir .%{gem_dir} \
 	--force \
 	--rdoc \
 	%{SOURCE0}
@@ -90,7 +98,7 @@ gem install \
 find . -name \*.gem | xargs chmod 0644
 
 # Kill shebang
-pushd .%{geminstdir}
+pushd .%{gem_instdir}
 grep -rl '#!.*/usr/bin' sample | \
 	xargs sed -i -e '\@#![ ]*/usr/bin at d'
 find sample/ -name \*.rb | xargs chmod 0644
@@ -98,35 +106,38 @@ popd
 
 %build
 # Move C extension library to some private directory
-pushd .%{geminstdir}
+pushd .%{gem_instdir}
+%if ! %{ruby19}
 mkdir lib/ruby-gnome2
-mv lib/%{gemname}.so lib/ruby-gnome2/
-grep -rl '%{gemname}.so' . | \
+mv lib/%{gem_name}.so lib/ruby-gnome2/
+grep -rl '%{gem_name}.so' . | \
 	xargs sed -i \
-		-e "\@require at s|'%{gemname}.so'|'ruby-gnome2/%{gemname}.so'|" \
-		-e '\@require at s|"%{gemname}.so"|"ruby-gnome2/%{gemname}.so"|'
+		-e "\@require at s|'%{gem_name}.so'|'ruby-gnome2/%{gem_name}.so'|" \
+		-e '\@require at s|"%{gem_name}.so"|"ruby-gnome2/%{gem_name}.so"|'
+%endif
 
 # Fix up Rakefile for "gnome2-raketask" requirement
 sed -i -e "/require.*gnome2-raketask/s|^\(.*\)|begin\n  \1\nrescue LoadError\n  require 'rubygems'\n  require 'gnome2-raketask'\nend\n|" \
 	Rakefile
 
-# Missing
-cp -p \
-	./ext/gdk_pixbuf2/rbgdk-pixbuf.h \
-	./ext/gdk_pixbuf2/rbgdk-pixbuf2conversions.h \
-	./lib/
-
 %install
 # Once copy all
-mkdir -p %{buildroot}%{gemdir}
-cp -a .%{gemdir}/* \
-	%{buildroot}%{gemdir}/
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+	%{buildroot}%{gem_dir}/
 
 pushd %{buildroot}
 # move header files, C extension files to the correct directory
+mkdir -p .%{header_dir}
+mv .%{gem_instdir}/lib/*.h .%{header_dir}/
+
+%if ! %{ruby19}
 mkdir -p .%{ruby_sitearch}/ruby-gnome2
-mv .%{geminstdir}/lib/*.h .%{ruby_sitearch}/
-mv .%{geminstdir}/lib/ruby-gnome2/%{gemname}.so .%{ruby_sitearch}/ruby-gnome2/
+mv .%{gem_instdir}/lib/ruby-gnome2/%{gem_name}.so .%{ruby_sitearch}/ruby-gnome2/
+%else
+mkdir -p .%{gem_extdir}/lib
+mv .%{gem_instdir}/lib/%{gem_name}.so .%{gem_extdir}/lib
+%endif
 popd
 
 # move pkgconfig file
@@ -137,8 +148,8 @@ install -cpm 644 ./%{_libdir}/pkgconfig/*.pc \
 
 # Cleanups
 pushd %{buildroot}
-rm -rf .%{geminstdir}/ext/
-rm -f .%{geminstdir}/extconf.rb
+rm -rf .%{gem_instdir}/ext/
+rm -f .%{gem_instdir}/extconf.rb
 popd
 
 # The following method is completely copied from rubygem-gettext
@@ -146,7 +157,7 @@ popd
 #
 # Create symlinks
 ##
-## Note that before switching to gem %%{ruby_sitelib}/%%{gemname}
+## Note that before switching to gem %%{ruby_sitelib}/%%{gem_name}
 ## already existed as a directory, so this cannot be replaced
 ## by symlink (cpio fails)
 ## Similarly, all directories under %%{ruby_sitelib} cannot be
@@ -200,43 +211,56 @@ popd
 
 }
 
-create_symlink_rec %{geminstdir}/lib %{ruby_sitelib}
+%if ! %{ruby19}
+create_symlink_rec %{gem_instdir}/lib %{ruby_sitelib}
+%endif
 
 %check
 # Currently no testsuite is available
 
 %files
 %defattr(-,root,root,-)
-%dir	%{geminstdir}
-%dir	%{geminstdir}/lib/
-
-%doc	%{geminstdir}/[A-Z]*
-%exclude	%{geminstdir}/Rakefile
-
-%{geminstdir}/lib/%{gemname}.rb
+%dir	%{gem_instdir}
+%dir	%{gem_instdir}/lib/
+
+%doc	%{gem_instdir}/[A-Z]*
+%exclude	%{gem_instdir}/Rakefile
+
+%{gem_instdir}/lib/%{gem_name}.rb
+%if %{ruby19}
+%dir	%{gem_extdir}
+%dir	%{gem_extdir}/lib
+%{gem_extdir}/lib/%{gem_name}.so
+%else
 # %%ruby_sitearch/ruby-gnome2 is owned by rubygem-glib2
-%{ruby_sitearch}/ruby-gnome2/%{gemname}.so
+%{ruby_sitearch}/ruby-gnome2/%{gem_name}.so
+%endif
 
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%{gem_cache}
+%{gem_spec}
 
-%files	-n ruby-%{gemname}
+%if ! %{ruby19}
+%files	-n ruby-%{gem_name}
 %defattr(-,root,root,-)
 %{ruby_sitelib}/*.rb
+%endif
 
 %files	devel
 %defattr(-,root,root,-)
-%{ruby_sitearch}/rbgdk-pixbuf.h
-%{ruby_sitearch}/rbgdk-pixbuf2conversions.h
+%{header_dir}/rbgdk-pixbuf.h
+%{header_dir}/rbgdk-pixbuf2conversions.h
 %{_libdir}/pkgconfig/ruby-gdk-pixbuf2.pc
 
 %files	doc
 %defattr(-,root,root,-)
-%{gemdir}/doc/%{gemname}-%{version}
-%{geminstdir}/Rakefile
-%{geminstdir}/sample/
+%{gem_docdir}/
+%{gem_instdir}/Rakefile
+%{gem_instdir}/sample/
 
 %changelog
+* Mon Jan 30 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.1.2-1
+- 1.1.2
+
 * Sun Jan 15 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.1.1-1
 - 1.1.1
 
@@ -263,7 +287,7 @@ create_symlink_rec %{geminstdir}/lib %{ruby_sitelib}
 
 * Sun Oct 31 2010 Mamoru Taska  <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.90.5-2
 - 0.90.5
-- Move C extension so that "require %%gemname" works correctly
+- Move C extension so that "require %%gem_name" works correctly
 
 * Sun Oct 24 2010 Mamoru Taska  <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.90.4-2
 - 0.90.4
diff --git a/sources b/sources
index 42b5e0e..18b9160 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-216c30d1d67f3c463e9ef8fee797ee59  gdk_pixbuf2-1.1.1.gem
+cc64d3c2da7b10db5d133ec5efc0d484  gdk_pixbuf2-1.1.2.gem


More information about the scm-commits mailing list