%global use_x11_tests 1
Name: perl-X11-GUITest
Version: 0.28
Release: 1%{?dist}
Summary: Provides GUI testing/interaction routines
License: GPLv2+
Group: Development/Libraries
URL: http://search.cpan.org/dist/X11-GUITest/
Source0: http://www.cpan.org/modules/by-module/X11/X11-GUITest-%{version}.tar.gz
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libXt-devel
# libXi-devel is required because it contains X11/extensions/XInput.h in EL6
BuildRequires: libXi-devel
BuildRequires: libXtst-devel
BuildRequires: perl
BuildRequires: perl(Config)
BuildRequires: perl(DynaLoader)
BuildRequires: perl(Exporter)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(POSIX)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
BuildRequires: perl(vars)
%if %{use_x11_tests}
# X11 tests:
BuildRequires: xorg-x11-server-Xvfb
BuildRequires: xorg-x11-xinit
BuildRequires: font(:lang=en)
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
This Perl package is intended to facilitate the testing of GUI applications
by means of user emulation. It can be used to test/interact with GUI
applications; which have been built upon the X library or toolkits (i.e.,
GTK+, Xt, Qt, Motif, etc.) that "wrap" the X library's functionality.
%prep
%setup -q -n X11-GUITest-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check
%if %{use_x11_tests}
xvfb-run -a make test
%else
make test
%endif
%files
%doc Changes docs README eg ToDo
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/X11*
%{_mandir}/man3/*
%changelog
* Tue Mar 18 2014 David Dick <ddick@cpan.org> - 0.28-1
- Initial release