Mamoru Tasaka b677b8
%global	header_dir	%{ruby_vendorarchdir}
Mamoru Tasaka d01ba3
4f08fc
%global	glibminver	3.0.8
Mamoru Tasaka 47396c
%global	obsoleteevr	0.90.7-1.999
Mamoru Tasaka d01ba3
Mamoru Tasaka b677b8
%global	gem_name	gio2
Mamoru Tasaka d01ba3
Mamoru Tasaka d01ba3
Summary:	Ruby binding of gio-2.0.x
Mamoru Tasaka b677b8
Name:		rubygem-%{gem_name}
f17317
Version:	3.1.1
660d46
Release:	2%{?dist}
Mamoru Tasaka d01ba3
Group:		Development/Languages
Mamoru Tasaka d01ba3
# from README
Mamoru Tasaka d01ba3
License:	LGPLv2
Mamoru Tasaka d01ba3
URL:		http://ruby-gnome2.sourceforge.jp/
Mamoru Tasaka b677b8
Source0:	http://rubygems.org/gems/%{gem_name}-%{version}.gem
ddb514
# FIXME
581590
Source1:	gio2-%{version}-test-missing-files.tar.gz
581590
# Source1 is generated by the below
581590
Source2:	gio2-create-missing-test-files.sh
9045b8
Patch0:	rubygem-gio2-3.1.0-test-content-dup.patch
660d46
# https://github.com/ruby-gnome2/ruby-gnome2/issues/990
660d46
# https://github.com/ruby-gnome2/ruby-gnome2/commit/f9bb159674c4eb25f99550fa8594fcbf97ed8cae
660d46
Patch1:	rubygem-gio2-3.1.1-test-fix-schemas.patch
Mamoru Tasaka d01ba3
TASAKA Mamoru 7977e8
Requires:	ruby(release)
TASAKA Mamoru 7977e8
BuildRequires:	ruby(release)
Mamoru Tasaka 5555a4
BuildRequires:	rubygems-devel
Mamoru Tasaka d01ba3
BuildRequires:	rubygem-glib2-devel >= %{glibminver}
f885d5
BuildRequires:	rubygem-gobject-introspection-devel >= %{glibminver}
Mamoru Tasaka d01ba3
BuildRequires:	ruby-devel
Mamoru Tasaka 449bba
# For Patch0:
TASAKA Mamoru 7977e8
#BuildRequires:	rubygem(rake-compiler)
Mamoru Tasaka 23f1be
BuildRequires:	rubygem(test-unit)
f885d5
BuildRequires:	rubygem(test-unit-notify)
581590
BuildRequires:	rubygem(rake)
4ac78f
# test-content-type.rb
4ac78f
BuildRequires:	shared-mime-info
Mamoru Tasaka d01ba3
Requires:	rubygems
Mamoru Tasaka b677b8
Provides:	rubygem(%{gem_name}) = %{version}
8b2a68
TASAKA Mamoru 312f8d
Obsoletes:		ruby-%{gem_name} < %{version}-%{release}
TASAKA Mamoru 312f8d
Provides:		ruby-%{gem_name} = %{version}-%{release}
TASAKA Mamoru 312f8d
Provides:		ruby(%{gem_name}) = %{version}-%{release}
f885d5
# Obsoletes / Provides
f885d5
Obsoletes:		ruby-%{gem_name}-devel < %{obsoleteevr}
f885d5
Obsoletes:		rubygem-gio2-devel < 2.2.0
Mamoru Tasaka d01ba3
Mamoru Tasaka d01ba3
%description
Mamoru Tasaka d01ba3
Ruby/GIO2 is a Ruby binding of gio-2.0.x.
Mamoru Tasaka d01ba3
Mamoru Tasaka d01ba3
%package	doc
Mamoru Tasaka d01ba3
Summary:	Documentation for %{name}
Mamoru Tasaka d01ba3
Group:		Documentation
Mamoru Tasaka d01ba3
Requires:	%{name} = %{version}-%{release}
Mamoru Tasaka d01ba3
Mamoru Tasaka d01ba3
%description	doc
Mamoru Tasaka d01ba3
This package contains documentation for %{name}.
Mamoru Tasaka d01ba3
Mamoru Tasaka d01ba3
%package	devel
Mamoru Tasaka d01ba3
Summary:	Ruby/GIO2 development environment
Mamoru Tasaka d01ba3
Group:		Development/Languages
Mamoru Tasaka d01ba3
Requires:	%{name} = %{version}-%{release}
Mamoru Tasaka d01ba3
Requires:	ruby-devel
Mamoru Tasaka d01ba3
# Obsoletes / Provides
Mamoru Tasaka b677b8
Obsoletes:	ruby-%{gem_name}-devel < %{obsoleteevr}
Mamoru Tasaka b677b8
Provides:	ruby-%{gem_name}-devel = %{version}-%{release}
Mamoru Tasaka d01ba3
Mamoru Tasaka d01ba3
%description devel
Mamoru Tasaka d01ba3
Header files and libraries for building a extension library for the
Mamoru Tasaka b677b8
rubygem-%{gem_name}
Mamoru Tasaka d01ba3
Mamoru Tasaka d01ba3
%prep
f20b2c
gem unpack %{SOURCE0}
f20b2c
%setup -q -D -T -n  %{gem_name}-%{version}
f20b2c
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
Mamoru Tasaka 449bba
f20b2c
# Allow ruby-gnome2 no less than ones
f17317
sed -i -e 's|= 3\.1\.1|>= 3.1.1|' %{gem_name}.gemspec
9045b8
9045b8
%patch0 -p1
660d46
%patch1 -p2
Mamoru Tasaka d01ba3
Mamoru Tasaka 47396c
# Fix up Rakefile for "gnome2-raketask" requirement
Mamoru Tasaka 47396c
sed -i -e "/require.*gnome2-raketask/s|^\(.*\)|begin\n  \1\nrescue LoadError\n  require 'rubygems'\n  require 'gnome2-raketask'\nend\n|" \
Mamoru Tasaka 47396c
	Rakefile
Mamoru Tasaka 47396c
Mamoru Tasaka 47396c
# Fix up test/load-test.rb
Mamoru Tasaka 47396c
sed -i -e "/glib-test-init/s|^.*$|require 'glib-test-init'|" \
f20b2c
	test/run-test.rb
f20b2c
f20b2c
%build
f20b2c
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
f20b2c
export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-pkg-config-dir=$(pwd)%{_libdir}/pkgconfig"
f20b2c
gem build %{gem_name}.gemspec
f20b2c
%gem_install
f20b2c
f20b2c
find . -name \*.gem | xargs chmod 0644
Mamoru Tasaka d01ba3
Mamoru Tasaka 47396c
%install
Mamoru Tasaka d01ba3
# Once copy all
Mamoru Tasaka b677b8
mkdir -p %{buildroot}%{gem_dir}
Mamoru Tasaka b677b8
cp -a .%{gem_dir}/* \
Mamoru Tasaka b677b8
	%{buildroot}%{gem_dir}/
Mamoru Tasaka d01ba3
2f82e8
mkdir -p %{buildroot}%{gem_extdir_mri}
2f82e8
cp -a ./%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/
Mamoru Tasaka b677b8
2f82e8
pushd %{buildroot}
2f82e8
rm -f .%{gem_extdir_mri}/{gem_make.out,mkmf.log}
Mamoru Tasaka d01ba3
popd
Mamoru Tasaka d01ba3
3c15bc
# move pkgconfig file
3c15bc
mkdir %{buildroot}%{_libdir}/pkgconfig
3c15bc
install -cpm 644 ./%{_libdir}/pkgconfig/*.pc \
3c15bc
	%{buildroot}%{_libdir}/pkgconfig/
3c15bc
Mamoru Tasaka d01ba3
# Cleanups
Mamoru Tasaka d01ba3
pushd %{buildroot}
581590
rm -rf .%{gem_instdir}/{ext/,test/}
Mamoru Tasaka b677b8
rm -f .%{gem_instdir}/extconf.rb
Mamoru Tasaka d01ba3
popd
Mamoru Tasaka d01ba3
Mamoru Tasaka d01ba3
%check
Mamoru Tasaka b677b8
pushd .%{gem_instdir}
f885d5
581590
tar xf %{SOURCE1}
581590
cp -a gio2/* .
581590
cd ..
581590
ln -sf %{gem_name}-%{version} %{gem_name}
581590
cd -
581590
f885d5
# kill unneeded make process
f885d5
rm -rf ./TMPBINDIR
f885d5
mkdir ./TMPBINDIR
f885d5
pushd ./TMPBINDIR
f885d5
ln -sf /bin/true make
f885d5
export PATH=$(pwd):$PATH
f885d5
popd
f885d5
8b6e6e
sed -i test/run-test.rb \
8b6e6e
	-e '\@exit Test::Unit::AutoRunner@s|,[ \t]*File\.join(.*"test")||'
f17317
# Test failure reported:
dadd0b
ruby -rubygems -Ilib:test:ext/%{gem_name} test/run-test.rb
581590
581590
cd ..
581590
unlink %{gem_name}
581590
cd -
581590
f885d5
popd
Mamoru Tasaka d01ba3
Mamoru Tasaka d01ba3
%files
Mamoru Tasaka d01ba3
%defattr(-,root,root,-)
Mamoru Tasaka b677b8
%dir	%{gem_instdir}
Mamoru Tasaka b677b8
%dir	%{gem_instdir}/lib/
Mamoru Tasaka b677b8
%dir	%{gem_instdir}/lib/%{gem_name}/
Mamoru Tasaka d01ba3
Mamoru Tasaka b677b8
%doc	%{gem_instdir}/[A-Z]*
Mamoru Tasaka b677b8
%exclude	%{gem_instdir}/Rakefile
Mamoru Tasaka d01ba3
Mamoru Tasaka b677b8
%{gem_instdir}/lib/%{gem_name}.rb
f885d5
%{gem_instdir}/lib/%{gem_name}/*.rb
2f82e8
%{gem_extdir_mri}/
Mamoru Tasaka d01ba3
f20b2c
%exclude	%{gem_cache}
Mamoru Tasaka b677b8
%{gem_spec}
Mamoru Tasaka d01ba3
0c22cf
%files	devel
0c22cf
%defattr(-,root,root,-)
0c22cf
%{_libdir}/pkgconfig/ruby-%{gem_name}.pc
0c22cf
Mamoru Tasaka d01ba3
%files	doc
Mamoru Tasaka d01ba3
%defattr(-,root,root,-)
Mamoru Tasaka b677b8
%{gem_docdir}
f20b2c
%exclude	%{gem_instdir}/Rakefile
f20b2c
%exclude	%{gem_instdir}/test/
Mamoru Tasaka d01ba3
Mamoru Tasaka d01ba3
%changelog
660d46
* Wed Feb  1 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.1-2
660d46
- Upstream patch to fix test failure wrt schemas path
660d46
f17317
* Mon Jan 30 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.1-1
f17317
- 3.1.1
f17317
294ed7
* Wed Jan 11 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.0-2
294ed7
- F-26: rebuild for ruby24
294ed7
9045b8
* Tue Nov 29 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.0-1
9045b8
- 3.1.0
9045b8
ddb514
* Sun Aug 14 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.9-1
ddb514
- 3.0.9
ddb514
ddb514
* Tue Apr 19 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.8-1
4f08fc
- 3.0.8
4f08fc
0fd162
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.7-4
0fd162
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0fd162
76d525
* Mon Jan 11 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.7-3
76d525
- F-24: rebuild against ruby23
76d525
54650e
* Mon Oct 12 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.7-2
54650e
- Pull upstream fix for Gio::ApplicationCommandLine
54650e
8b6e6e
* Sun Oct 11 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.7-1
8b6e6e
- 3.0.7
8b6e6e
6923c1
* Wed Sep 23 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.5-1
6923c1
- 3.0.5
6923c1
581590
* Tue Sep 22 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.4-1
581590
- 3.0.4
581590
581590
* Sun Sep 20 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.3-1
581590
- 3.0.3
581590
08da12
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-2
08da12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
08da12
0adaff
* Wed Apr 29 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.5-1
0adaff
- 2.2.5
0adaff
438363
* Fri Jan 16 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.4-2
438363
- F-22: Rebuild for ruby 2.2
438363
b283a0
* Sun Dec 28 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.4-1
b283a0
- 2.2.4
b283a0
0c22cf
* Wed Nov  5 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.3-1
0c22cf
- 2.2.3
0c22cf
5dd6b7
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-5
5dd6b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
5dd6b7
67ade3
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-4
67ade3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
67ade3
2f82e8
* Thu Apr 17 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.0-3
2f82e8
- F-21: rebuild for ruby 2.1 / rubygems 2.2
2f82e8
92fa74
* Mon Apr 14 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.0-2
92fa74
- 2.2.0
92fa74
f20b2c
* Thu Jan 16 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.1.0-1
f20b2c
- 2.1.0
f20b2c
8b2a68
* Fri Aug 16 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.0.2-1
8b2a68
- 2.0.2
8b2a68
c5aa6c
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-2
c5aa6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c5aa6c
TASAKA Mamoru 0428a9
* Wed Apr 17 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.6-1
TASAKA Mamoru 0428a9
- 1.2.6
TASAKA Mamoru 0428a9
TASAKA Mamoru 822d19
* Thu Apr  4 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.5-1
TASAKA Mamoru 822d19
- 1.2.5
TASAKA Mamoru 822d19
TASAKA Mamoru 8f4819
* Tue Mar 26 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.4-1
TASAKA Mamoru 8f4819
- 1.2.4
TASAKA Mamoru 8f4819
cc7bab
* Wed Mar 20 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.3-1
cc7bab
- 1.2.3
cc7bab
TASAKA Mamoru 7977e8
* Wed Mar  6 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.1-2
TASAKA Mamoru 7977e8
- F-19: Rebuild for ruby 2.0.0
TASAKA Mamoru 7977e8
TASAKA Mamoru 8d2f7e
* Mon Feb  4 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.1-1
TASAKA Mamoru 8d2f7e
- 1.2.1
TASAKA Mamoru 8d2f7e
TASAKA Mamoru 4b61d2
* Wed Jan 30 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.0-1
TASAKA Mamoru 4b61d2
- 1.2.0
TASAKA Mamoru 4b61d2
Mamoru Tasaka 7d3c93
* Mon Dec 31 2012 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.1.9-1
Mamoru Tasaka 7d3c93
- 1.1.9
Mamoru Tasaka 7d3c93
TASAKA Mamoru a14c43
* Thu Dec  6 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.1.6-1
TASAKA Mamoru a14c43
- 1.1.6
TASAKA Mamoru a14c43
TASAKA Mamoru 5805a5
* Wed Sep  5 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.1.5-1
TASAKA Mamoru 5805a5
- 1.1.5
TASAKA Mamoru 5805a5
Mamoru Tasaka abbb53
* Mon Aug 13 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.1.4-1
Mamoru Tasaka abbb53
- 1.1.4
Mamoru Tasaka abbb53
e4748f
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-3
e4748f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e4748f
Mamoru TASAKA 19c9f8
* Mon Apr 16 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.1.3-2
Mamoru TASAKA 340ea3
- 1.1.3
Mamoru TASAKA 340ea3
TASAKA Mamoru 312f8d
* Wed Feb  1 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.1.2-4
TASAKA Mamoru 312f8d
- Add proper Obsoletes/Provides
TASAKA Mamoru 312f8d
TASAKA Mamoru 1921d0
* Mon Jan 30 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.1.2-3
Mamoru Tasaka b677b8
- 1.1.2
Mamoru Tasaka b677b8
Mamoru Tasaka 01eea8
* Sun Jan 15 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.1.1-1
Mamoru Tasaka 01eea8
- 1.1.1
Mamoru Tasaka 01eea8
facb16
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-2
Mamoru Tasaka 01eea8
- F-17: Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
facb16
Mamoru Tasaka 66864d
* Mon Sep 19 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.0.3-1
Mamoru Tasaka 66864d
- 1.0.3
Mamoru Tasaka 66864d
Mamoru Tasaka 8809da
* Fri Jul 15 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.0.0-1
Mamoru Tasaka 8809da
- 1.0.0
Mamoru Tasaka 8809da
Mamoru Tasaka 601081
* Sun Jun 12 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.90.9-1
Mamoru Tasaka 601081
- 0.90.9
Mamoru Tasaka 601081
Mamoru Tasaka 3a2fe0
* Sat Mar  5 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.90.8-1
Mamoru Tasaka 3a2fe0
- 0.90.8
Mamoru Tasaka 3a2fe0
273080
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.90.7-3
273080
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
273080
Mamoru Tasaka 47396c
* Wed Feb  9 2011 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.90.7-2
Mamoru Tasaka 47396c
- 0.90.7
Mamoru Tasaka 47396c
Mamoru Tasaka 449bba
* Sun Nov  7 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.90.5-4
Mamoru Tasaka 449bba
- Patch for GLib 2.27.1 API
Mamoru Tasaka 449bba
Mamoru Tasaka 449bba
* Sun Oct 31 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.90.5-3
Mamoru Tasaka 0726e5
- 0.90.5
Mamoru Tasaka b677b8
- Move C extension so that "require %%gem_name" works correctly
Mamoru Tasaka 0726e5
Mamoru Tasaka d01ba3
* Sun Oct 24 2010 Mamoru Taska <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.90.4-2
Mamoru Tasaka d01ba3
- Initial package