Blame rubygem-gdk3.spec

c2d2d5
%global	header_dir	%{ruby_vendorarchdir}
c2d2d5
%global	gem_name	gdk3
30f587
%global	glib_min_ver	3.0.8
c2d2d5
75d72c
%undefine        _changelog_trimtime
75d72c
c2d2d5
# Planned for F-20+ only
c2d2d5
Summary:	Ruby binding of GDK-3.x
c2d2d5
Name:		rubygem-%{gem_name}
75d72c
Version:	3.3.0
c24769
Release:	1%{?dist}
c2d2d5
c2d2d5
Group:		Development/Languages
c2d2d5
# Various files in gem
c2d2d5
License:	LGPLv2+
c2d2d5
URL:		http://ruby-gnome2.sourceforge.jp/
c2d2d5
Source0:	http://rubygems.org/gems/%{gem_name}-%{version}.gem
c2d2d5
# https://raw.github.com/ruby-gnome2/ruby-gnome2/master/gdk3/COPYING.LIB
c2d2d5
# Renamed to avoid overwrite on SOURCE dir
9553b6
#Source1:	COPYING.LIB.gdk3
c2d2d5
c2d2d5
# MRI only
c2d2d5
Requires:	ruby
c2d2d5
BuildRequires:	ruby
c2d2d5
c2d2d5
Requires:	ruby(rubygems) 
d40164
# FIXME it seems this is needed
d40164
Requires:	rubygem(atk)
c2d2d5
BuildRequires:	ruby-devel
c2d2d5
BuildRequires:	rubygems-devel
c2d2d5
BuildRequires:	rubygem-glib2-devel >= %{glib_min_ver}
c2d2d5
BuildRequires:	rubygem-pango-devel
c2d2d5
BuildRequires:	gtk3-devel
c2d2d5
# %%check
c2d2d5
BuildRequires:	rubygem(gdk_pixbuf2)
d40164
BuildRequires:	rubygem(cairo-gobject)
d40164
BuildRequires:	rubygem(gobject-introspection)
c2d2d5
BuildRequires:	rubygem(test-unit)
c2d2d5
BuildRequires:	rubygem(test-unit-notify)
d40164
# FIXME it seems this is needed
d40164
BuildRequires:	rubygem(atk)
d40164
# X is needed
d40164
BuildRequires:	xorg-x11-server-Xvfb
c2d2d5
Provides:	rubygem(%{gem_name}) = %{version}-%{release}
d40164
Obsoletes:		rubygem-gdk3-devel < 2.2.3
2591e9
# BuildArch changed from 2.2.3
2591e9
BuildArch:		noarch
c2d2d5
c2d2d5
%description
c2d2d5
Ruby/GDK3 is a Ruby binding of GDK-3.x.
c2d2d5
c2d2d5
%package	devel
c2d2d5
Summary:	Ruby/GLib development environment
c2d2d5
Group:		Development/Languages
c2d2d5
Requires:	%{name}%{?isa} = %{version}-%{release}
c2d2d5
Requires:	gtk3-devel%{?isa}
c2d2d5
Requires:	ruby-devel%{?isa}
c2d2d5
c2d2d5
%description devel
c2d2d5
Header files and libraries for building a extension library for the
c2d2d5
rubygem-%{gem_name}
c2d2d5
c2d2d5
%package	doc
c2d2d5
Summary:	Documentation for %{name}
c2d2d5
Group:		Documentation
c2d2d5
Requires:	%{name} = %{version}-%{release}
c2d2d5
BuildArch:	noarch
c2d2d5
c2d2d5
%description doc
c2d2d5
Documentation for %{name}
c2d2d5
c2d2d5
%prep
c2d2d5
%setup -q -c -T
c2d2d5
c2d2d5
TOPDIR=$(pwd)
c2d2d5
mkdir tmpunpackdir
c2d2d5
pushd tmpunpackdir
c2d2d5
c2d2d5
gem unpack %{SOURCE0}
c2d2d5
cd %{gem_name}-%{version}
c2d2d5
ef72e2
#Patches
ef72e2
c2d2d5
# Permission
c2d2d5
find . -name \*.rb -print0 | xargs --null chmod 0644
c2d2d5
c2d2d5
gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec
c2d2d5
a33a3f
# Allow ruby-gnome2 no less than ones
75d72c
sed -i -e 's|= 3\.3\.0|>= 3.3.0|' %{gem_name}.gemspec
c36299
sed -i -e '\@s\.extensions@d'  %{gem_name}.gemspec
a33a3f
c2d2d5
gem build %{gem_name}.gemspec
c2d2d5
mv %{gem_name}-%{version}.gem $TOPDIR
c2d2d5
c2d2d5
popd
c2d2d5
rm -rf tmpunpackdir
c2d2d5
c2d2d5
%build
c2d2d5
mkdir -p .%{gem_dir}
c2d2d5
c2d2d5
%gem_install
c2d2d5
c2d2d5
%install
c2d2d5
mkdir -p %{buildroot}%{gem_dir}
c2d2d5
cp -a .%{gem_dir}/* \
c2d2d5
	%{buildroot}%{gem_dir}/
c2d2d5
c2d2d5
# move header files, C extension files to the correct directory
d40164
%if 0
2ee9d9
mkdir -p %{buildroot}%{gem_extdir_mri}
2ee9d9
cp -a ./%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/
c2d2d5
2ee9d9
pushd %{buildroot}
c2d2d5
mkdir -p .%{header_dir}
2ee9d9
mv .%{gem_extdir_mri}/*.h .%{header_dir}/
2ee9d9
rm -f .%{gem_extdir_mri}/{gem_make.out,mkmf.log}
c2d2d5
popd
c2d2d5
2ee9d9
c2d2d5
# move pkgconfig file
c2d2d5
mkdir %{buildroot}%{_libdir}/pkgconfig
c2d2d5
install -cpm 644 ./%{_libdir}/pkgconfig/*.pc \
c2d2d5
	%{buildroot}%{_libdir}/pkgconfig/
d40164
%endif
c2d2d5
c2d2d5
# Cleanups
c2d2d5
pushd %{buildroot}
c2d2d5
rm -rf .%{gem_instdir}/ext/
c36299
rm -rf .%{gem_instdir}/dependency-check/
c2d2d5
rm -f .%{gem_instdir}/extconf.rb
c2d2d5
popd
c2d2d5
c2d2d5
%check
c2d2d5
pushd .%{gem_instdir}
c2d2d5
c2d2d5
# kill unneeded make process
c2d2d5
rm -rf ./TMPBINDIR
c2d2d5
mkdir ./TMPBINDIR
c2d2d5
pushd ./TMPBINDIR
c2d2d5
ln -sf /bin/true make
c2d2d5
export PATH=$(pwd):$PATH
c2d2d5
popd
c2d2d5
c84fa3
sed -i test/run-test.rb \
c84fa3
	-e '\@exit Test::Unit::AutoRunner@s|,[ \t]*File\.join(.*"test")||'
d40164
xvfb-run \
bdaa53
%if 0%{?fedora} >= 25
bdaa53
	-s '-screen 0 640x480x8 -extension RANDR' \
bdaa53
%endif
bdaa53
	$RANDR_OPTS \
c0b0b0
	ruby -Ilib:test:ext/%{gem_name} ./test/run-test.rb
1c8425
c2d2d5
popd
c2d2d5
c2d2d5
c2d2d5
%files
c2d2d5
%doc	%{gem_instdir}/[A-Z]*
c2d2d5
%exclude	%{gem_instdir}/Rakefile
c2d2d5
%dir	%{gem_instdir}/
c2d2d5
%dir	%{gem_instdir}/lib/
c2d2d5
%{gem_instdir}/lib/%{gem_name}.rb
c2d2d5
%dir	%{gem_instdir}/lib/%{gem_name}/
c2d2d5
%{gem_instdir}/lib/%{gem_name}/*.rb
c2d2d5
c2d2d5
%exclude %{gem_cache}
9553b6
%exclude	%{gem_instdir}/*gemspec
c2d2d5
%{gem_spec}
c2d2d5
c2d2d5
%files	doc
c2d2d5
%doc	%{gem_docdir}/
c2d2d5
%exclude	%{gem_instdir}/test/
c2d2d5
c2d2d5
%changelog
75d72c
* Fri Nov 16 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.3.0-1
75d72c
- 3.3.0
75d72c
c24769
* Mon Aug 13 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.2.9-1
c24769
- 3.2.9
c24769
ee4c53
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.7-2
ee4c53
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ee4c53
9553b6
* Thu Jun 21 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.2.7-1
9553b6
- 3.2.7
9553b6
c0b0b0
* Thu May  3 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.2.5-1
c0b0b0
- 3.2.5
c0b0b0
1c8425
* Thu Apr 19 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.2.4-2
1c8425
- F-29: test suite fails, need investigating later
1c8425
d48863
* Thu Apr 19 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.2.4-1
d48863
- 3.2.4
d48863
dd4717
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-2
dd4717
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
dd4717
240fa7
* Tue Nov 28 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.2.1-1
240fa7
- 3.2.1
240fa7
7d4e11
* Tue Nov 14 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.2.0-1
7d4e11
- 3.2.0
7d4e11
d7c039
* Sun Oct 22 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.9-1
d7c039
- 3.1.9
d7c039
85c1d6
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.8-2
85c1d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
85c1d6
7fe8f2
* Mon Jul 17 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.8-1
7fe8f2
- 3.1.8
7fe8f2
e664cc
* Fri Jul 14 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.7-1
e664cc
- 3.1.7
e664cc
0ba7bc
* Wed Jun  7 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.6-1
0ba7bc
- 3.1.6
0ba7bc
c36299
* Thu May  4 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.3-1
c36299
- 3.1.3
c36299
ef1bb6
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-2
ef1bb6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ef1bb6
6441f1
* Tue Jan 31 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.1-1
6441f1
- 3.1.1
6441f1
a4fd3e
* Tue Nov 29 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.1.0-1
a4fd3e
- 3.1.0
a4fd3e
bdaa53
* Mon Aug 15 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.9-1
bdaa53
- 3.0.9
bdaa53
bdaa53
* Tue Apr 19 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.8-1
30f587
- 3.0.8
30f587
e31e05
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.7-2
e31e05
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e31e05
c84fa3
* Sun Oct 11 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.7-1
c84fa3
- 3.0.7
c84fa3
579001
* Wed Sep 23 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.5-1
579001
- 3.0.5
579001
ef72e2
* Tue Sep 22 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.4-1
ef72e2
- 3.0.4
ef72e2
ef72e2
* Mon Sep 21 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.3-1
ef72e2
- 3.0.3
ef72e2
961e62
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-2
961e62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
961e62
794375
* Wed Apr 29 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.5-1
794375
- 2.2.5
794375
90a686
* Mon Nov 10 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.4-1
2591e9
- Define arch as noarch (bug 1161947)
2591e9
d40164
* Wed Nov  5 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.3-1
d40164
- 2.2.3
d40164
7e7fed
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-4
7e7fed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
7e7fed
1f8403
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-3
1f8403
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
1f8403
2ee9d9
* Thu Apr 17 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.0-2
2ee9d9
- F-21: rebuild for ruby 2.1 / rubygems 2.2
2ee9d9
95a740
* Mon Apr 14 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.2.0-1
95a740
- 2.2.0
95a740
fe0097
* Wed Feb 12 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.1.0-2
fe0097
- Apply upstream patch to make GdkEventButton inherit GdkEventAny
fe0097
a33a3f
* Thu Jan 16 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.1.0-1
a33a3f
- 2.1.0
a33a3f
c2d2d5
* Thu Sep 19 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.0.2-2
c2d2d5
- Patch from upstream to fix TestGdkRGBA
c2d2d5
c2d2d5
* Sun Aug 25 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.0.2-1
c2d2d5
- 2.0.2
c2d2d5
c2d2d5
* Mon Apr 29 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.6-1
c2d2d5
- 1.2.6
c2d2d5
c2d2d5
* Fri Mar 22 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.3-1
c2d2d5
- 1.2.3
c2d2d5
c2d2d5
* Mon Feb 18 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.1-1
c2d2d5
- Initial package