diff --git a/.gitignore b/.gitignore index e69de29..7675b32 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/X11-GUITest-0.28.tar.gz diff --git a/perl-X11-GUITest.spec b/perl-X11-GUITest.spec new file mode 100644 index 0000000..78aa49d --- /dev/null +++ b/perl-X11-GUITest.spec @@ -0,0 +1,69 @@ +%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 - 0.28-1 +- Initial release diff --git a/sources b/sources index e69de29..af285d9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +6987e834dbf25734d3aec0014ab89bf6 X11-GUITest-0.28.tar.gz