%global header_dir %{ruby_vendorarchdir} %global gem_name gtk3 %global glib_min_ver 3.0.8 %undefine _changelog_trimtime # Planned for F-20+ only Summary: Ruby/GTK3 is a Ruby binding of GTK+-3.x Name: rubygem-%{gem_name} Version: 4.2.5 Release: 1%{?dist} # SPDX confirmed # LGPL-2.1-or-later: gemspec # GFDL-1.3-no-invariants-or-later: sample/misc/flowbox.rb License: LGPL-2.1-or-later URL: http://ruby-gnome2.sourceforge.jp/ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # https://raw.github.com/ruby-gnome2/ruby-gnome2/master/gtk3/COPYING.LIB # Renamed to avoid overwrite on SOURCE dir Source1: COPYING.LIB.gtk3 Source2: gtk3-%{version}-test-missing-files.tar.gz # Source2 is generated by the below Source3: gtk3-create-missing-test-files.sh # MRI only Requires: ruby BuildRequires: ruby Requires: ruby(rubygems) BuildRequires: gcc BuildRequires: ruby-devel BuildRequires: rubygems-devel BuildRequires: rubygem-cairo-devel BuildRequires: rubygem-gdk_pixbuf2 #BuildRequires: rubygem-gdk3-devel BuildRequires: rubygem-gdk3 BuildRequires: rubygem-gio2 BuildRequires: rubygem-glib2-devel >= %{glib_min_ver} BuildRequires: rubygem-pango-devel BuildRequires: gtk3-devel BuildRequires: rubygem-gobject-introspection-devel # %%check BuildRequires: rubygem(atk) BuildRequires: rubygem(test-unit) BuildRequires: rubygem(test-unit-notify) BuildRequires: rubygem(rake) # Needs X BuildRequires: xorg-x11-server-Xvfb # Icon for face-cool-symbolic BuildRequires: adwaita-icon-theme # "edit-find" BuildRequires: gnome-icon-theme Provides: rubygem(%{gem_name}) = %{version}-%{release} %description Ruby/GTK3 is a Ruby binding of GTK+-3.x. %package devel Summary: Ruby/GTK3 development environment Requires: %{name}%{?_isa} = %{version}-%{release} Requires: gtk3-devel%{?_isa} Requires: rubygem-glib2-devel%{?_isa} %description devel Header files and libraries for building a extension library for the rubygem-%{gem_name} %package doc Summary: Documentation for %{name} License: LGPL-2.1-or-later AND GFDL-1.3-no-invariants-or-later Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name} %prep %setup -q -n %{gem_name}-%{version} mv ../%{gem_name}-%{version}.gemspec . # Permission find . -name \*.rb -print0 | xargs --null chmod 0644 # Allow ruby-gnome2 no less than ones sed -i -e 's|= 4\.2\.5|>= 4.2.5|' %{gem_name}-%{version}.gemspec # Add license text install -cpm 644 %{SOURCE1} ./COPYING.LIB sed -i -e '/files =/s|\("Rakefile",\)|\1 "COPYING.LIB", |' \ %{gem_name}-%{version}.gemspec %build export CONFIGURE_ARGS="--with-cflags='%{optflags} -Werror-implicit-function-declaration'" export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-pkg-config-dir=$(pwd)%{_libdir}/pkgconfig" gem build %{gem_name}-%{version}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ # move header files, C extension files to the correct directory mkdir -p %{buildroot}%{gem_extdir_mri} cp -a ./%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/ pushd %{buildroot} #mkdir -p .%{header_dir} #mv .%{gem_extdir_mri}/*.h .%{header_dir}/ rm -f .%{gem_extdir_mri}/{gem_make.out,mkmf.log} popd # move pkgconfig file mkdir %{buildroot}%{_libdir}/pkgconfig install -cpm 644 ./%{_libdir}/pkgconfig/*.pc \ %{buildroot}%{_libdir}/pkgconfig/ # Cleanups pushd %{buildroot} rm -rf .%{gem_instdir}/ext/ rm -f .%{gem_instdir}/extconf.rb popd %check pushd .%{gem_instdir} tar xf %{SOURCE2} cp -a gtk3/* . cd .. ln -sf %{gem_name}-%{version} %{gem_name} cd - %if 0%{?fedora} >= 39 # icon-theme seems broken, skipping for now mv test/test-gtk-icon-theme.rb{,.save} %endif sed -i test/run-test.rb \ -e '\@exit Test::Unit::AutoRunner@s|,[ \t]*File\.join(.*"test")||' sed -i test/run-test.rb \ -e '\@run-test@s|require_relative "../../|require "|' cd test RANDR_OPTS="" %if 0%{?fedora} >= 25 RANDR_OPTS="-extension RANDR" %endif xvfb-run \ %if 0%{?fedora} >= 25 -s "-screen 0 640x480x24 $RANDR_OPTS" \ %endif ruby -I../lib:.:%{buildroot}%{gem_extdir_mri} run-test.rb cd .. %if 0%{?fedora} >= 39 mv test/test-gtk-icon-theme.rb{.save,} %endif cd .. unlink %{gem_name} cd - popd %files %doc %{gem_instdir}/[A-Z]* %exclude %{gem_instdir}/Rakefile %dir %{gem_instdir}/ %dir %{gem_instdir}/lib/ %{gem_instdir}/lib/%{gem_name}.rb %dir %{gem_instdir}/lib/%{gem_name}/ %{gem_instdir}/lib/%{gem_name}/*.rb %{gem_extdir_mri}/ %exclude %{gem_cache} %exclude %{gem_instdir}/*gemspec %{gem_spec} %files devel %{_libdir}/pkgconfig/ruby-%{gem_name}.pc #%%{header_dir}/rbgtk3.h #%%{header_dir}/rbgtk3conversions.h %files doc %doc %{gem_docdir}/ %{gem_instdir}/sample/ %exclude %{gem_instdir}/test/ %changelog * Sun Dec 15 2024 Mamoru TASAKA - 4.2.5-1 - 4.2.5 * Wed Sep 25 2024 Mamoru TASAKA - 4.2.4-1 - 4.2.4 * Tue Sep 24 2024 Mamoru TASAKA - 4.2.3-2 - Execute test which no longer fails * Thu Sep 19 2024 Mamoru TASAKA - 4.2.3-1 - 4.2.3 * Fri Jul 19 2024 Fedora Release Engineering - 4.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Tue Apr 02 2024 Mamoru TASAKA - 4.2.2-1 - 4.2.2 * Fri Feb 23 2024 Mamoru TASAKA - 4.2.1-1 - 4.2.1 * Fri Jan 26 2024 Fedora Release Engineering - 4.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 4.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Jan 03 2024 Mamoru TASAKA - 4.2.0-2 - Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 * Sat Aug 19 2023 Mamoru TASAKA - 4.2.0-1 - 4.2.0 * Sat Aug 12 2023 Mamoru TASAKA - 4.1.9-1 - 4.1.9 * Sat Jul 22 2023 Mamoru TASAKA - 4.1.8-3 - F-39: skip icon theme test for now * Fri Jul 21 2023 Fedora Release Engineering - 4.1.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Mon Jun 26 2023 Mamoru TASAKA - 4.1.8-1 - 4.1.8 * Thu Jun 1 2023 Mamoru TASAKA - 4.1.7-1 - 4.1.7 * Mon May 22 2023 Mamoru TASAKA - 4.1.6-1 - 4.1.6 * Thu May 11 2023 Mamoru TASAKA - 4.1.5-1 - 4.1.5 * Thu May 04 2023 Mamoru TASAKA - 4.1.4-1 - 4.1.4 * Mon May 01 2023 Mamoru TASAKA - 4.1.3-1 - 4.1.3 * Fri Feb 24 2023 Mamoru TASAKA - 4.1.2-1 - 4.1.2 * Sun Feb 19 2023 Mamoru TASAKA - 4.1.1-1 - 4.1.1 * Fri Feb 3 2023 Mamoru TASAKA - 4.1.0-1 - 4.1.0 * Sun Jan 22 2023 Mamoru TASAKA - 4.0.8-1 - 4.0.8 * Fri Jan 20 2023 Fedora Release Engineering - 4.0.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jan 6 2023 Mamoru TASAKA - 4.0.5-1 - 4.0.5 * Wed Jan 04 2023 Mamoru TASAKA - 4.0.3-3 - Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 * Sun Dec 25 2022 Mamoru TASAKA - 4.0.3-2 - Use %%gem_extdir_mri instead of ext for %%check due to ruby3.2 change for ext cleanup during build * Fri Sep 16 2022 Mamoru TASAKA - 4.0.3-1 - 4.0.3 * Mon Sep 5 2022 Mamoru TASAKA - 4.0.2-1 - 4.0.2 * Sat Jul 23 2022 Fedora Release Engineering - 3.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Sun Jan 23 2022 Mamoru TASAKA - 3.5.1-1 - 3.5.1 * Fri Jan 21 2022 Fedora Release Engineering - 3.4.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Aug 10 2021 Mamoru TASAKA - 3.4.9-1 - 3.4.9 * Sun Aug 8 2021 Mamoru TASAKA - 3.4.7-1 - 3.4.7 * Sun Jul 25 2021 Mamoru TASAKA - 3.4.4-2 - Rebuild for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Mon May 3 2021 Mamoru TASAKA - 3.4.4-1 - 3.4.4 * Wed Jan 27 2021 Fedora Release Engineering - 3.4.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jan 06 2021 Mamoru TASAKA - 3.4.3-2 - F-34: rebuild against ruby 3.0 * Thu Aug 13 2020 Mamoru TASAKA - 3.4.3-1 - 3.4.3 * Sat Aug 01 2020 Fedora Release Engineering - 3.4.1-5 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 3.4.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu Jan 30 2020 Fedora Release Engineering - 3.4.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Jan 17 2020 Mamoru TASAKA - 3.4.1-2 - F-32: rebuild against ruby27 * Thu Dec 5 2019 Mamoru TASAKA - 3.4.1-1 - 3.4.1 * Tue Oct 15 2019 Mamoru TASAKA - 3.4.0-1 - 3.4.0 * Sun Sep 8 2019 Mamoru TASAKA - 3.3.7-1 - 3.3.7 * Fri Jul 26 2019 Fedora Release Engineering - 3.3.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Thu Apr 18 2019 Mamoru TASAKA - 3.3.6-1 - 3.3.6 * Mon Feb 18 2019 Mamoru TASAKA - 3.3.2-1 - 3.3.2 * Fri Feb 1 2019 Mamoru TASAKA - 3.3.1-1 - 3.3.1 * Mon Jan 21 2019 Mamoru TASAKA - 3.3.0-2 - F-30: rebuild against ruby26 * Sun Nov 18 2018 Mamoru TASAKA - 3.3.0-1 - 3.3.0 * Mon Aug 13 2018 Mamoru TASAKA - 3.2.9-1 - 3.2.9 * Sat Jul 14 2018 Fedora Release Engineering - 3.2.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Jun 22 2018 Mamoru TASAKA - 3.2.7-1 - 3.2.7 * Thu May 3 2018 Mamoru TASAKA - 3.2.5-1 - 3.2.5 * Thu Apr 19 2018 Mamoru TASAKA - 3.2.4-1 - 3.2.4 * Fri Feb 09 2018 Fedora Release Engineering - 3.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Jan 20 2018 Björn Esser - 3.2.1-3 - Rebuilt for switch to libxcrypt * Thu Jan 04 2018 Mamoru TASAKA - 3.2.1-2 - F-28: rebuild for ruby25 * Wed Nov 29 2017 Mamoru TASAKA - 3.2.1-1 - 3.2.1 * Tue Nov 14 2017 Mamoru TASAKA - 3.2.0-1 - 3.2.0 * Tue Oct 24 2017 Mamoru TASAKA - 3.1.9-1 - 3.1.9 * Thu Aug 03 2017 Fedora Release Engineering - 3.1.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 3.1.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon Jul 17 2017 Mamoru TASAKA - 3.1.8-1 - 3.1.8 * Fri Jul 14 2017 Mamoru TASAKA - 3.1.7-1 - 3.1.7 * Wed Jun 7 2017 Mamoru TASAKA - 3.1.6-1 - 3.1.6 * Thu May 4 2017 Mamoru TASAKA - 3.1.3-1 - 3.1.3 * Sat Feb 11 2017 Fedora Release Engineering - 3.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Jan 31 2017 Mamoru TASAKA - 3.1.1-1 - 3.1.1 * Wed Jan 11 2017 Mamoru TASAKA - 3.1.0-3 - Run test on i686 again * Wed Jan 11 2017 Mamoru TASAKA - 3.1.0-2 - F-26: rebuild for ruby24 - ignore i686 test failure for now * Tue Nov 29 2016 Mamoru TASAKA - 3.1.0-1 - 3.1.0 * Mon Aug 15 2016 Mamoru TASAKA - 3.0.9-1 - 3.0.9 * Tue Apr 19 2016 Mamoru TASAKA - 3.0.8-1 - 3.0.8 * Thu Feb 04 2016 Fedora Release Engineering - 3.0.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Jan 12 2016 Mamoru TASAKA - 3.0.7-2 - F-24: rebuild against ruby23 - Skip one file test on %%arm * Sun Oct 11 2015 Mamoru TASAKA - 3.0.7-1 - 3.0.7 * Wed Sep 23 2015 Mamoru TASAKA - 3.0.5-1 - 3.0.5 * Tue Sep 22 2015 Mamoru TASAKA - 3.0.4-1 - 3.0.4 * Thu Jun 18 2015 Fedora Release Engineering - 2.2.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed Apr 29 2015 Mamoru TASAKA - 2.2.5-1 - 2.2.5 * Fri Jan 16 2015 Mamoru TASAKA - 2.2.4-2 - F-22: Rebuild for ruby 2.2 * Sun Dec 28 2014 Mamoru TASAKA - 2.2.4-1 - 2.2.4 * Wed Nov 5 2014 Mamoru TASAKA - 2.2.3-1 - 2.2.3 * Mon Aug 18 2014 Fedora Release Engineering - 2.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 2.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Apr 18 2014 Mamoru TASAKA - 2.2.0-2 - F-21: rebuild for ruby 2.1 / rubygems 2.2 * Mon Apr 14 2014 Mamoru TASAKA - 2.2.0-1 - 2.2.0 * Thu Jan 16 2014 Mamoru TASAKA - 2.1.0-1 - 2.1.0 * Mon Oct 21 2013 Mamoru TASAKA - 2.0.2-2 - Update license file and misc fix * Sun Aug 25 2013 Mamoru TASAKA - 2.0.2-1 - 2.0.2 * Mon Apr 29 2013 Mamoru TASAKA - 1.2.6-1 - 1.2.6 * Fri Mar 22 2013 Mamoru TASAKA - 1.2.3-1 - 1.2.3 * Tue Feb 19 2013 Mamoru TASAKA - 1.2.1-1 - Initial package