commit f177ee58367b3ad4279a60b4fcd5723f73ce4c5e Author: Ralf Corsépius <corsepiu@xxxxxxxxxxxxxxxxx> Date: Tue Jan 31 10:01:27 2012 +0100 Rewrite *-tests package (Don't use tests macros). rt3.spec | 53 +++++++++++++++++++++++++++++++++++------------------ 1 files changed, 35 insertions(+), 18 deletions(-) --- diff --git a/rt3.spec b/rt3.spec index d1ca3de..5918564 100644 --- a/rt3.spec +++ b/rt3.spec @@ -41,7 +41,7 @@ Name: rt3 Version: 3.8.11 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Request tracker 3 Group: Applications/Internet @@ -216,19 +216,6 @@ Requires: rt3-mailgate %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(HTML::Mason %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(IO::Handle::CRLF\\)$ -%tests_req perl(HTML::Mason::Compiler) -%tests_req perl(HTML::Mason::Compiler::ToObject) -%tests_req perl(RT::Test) -%tests_req perl(Test::HTTP::Server::Simple::StashWarnings) -%tests_req perl(DBD::SQLite) -%tests_req perl(Test::Deep) -# Required by the testsuite, but test doesn't work outside of source-tree: %%tests_req perl(Test::Pod) >= 1.14 -%tests_req perl(Test::Expect) -%tests_req perl(Test::MockTime) -%tests_req perl(Test::Warn) -%tests_req perl(GnuPG::Interface) perl(PerlIO::eol) - -%{?perl_subpackage_tests:%perl_subpackage_tests t/ README.tests} %description RT is an enterprise-grade ticketing system which enables a group of people @@ -246,6 +233,26 @@ Requires: perl(HTML::FormatText) %description mailgate %{summary} +%package tests +Summary: Test suite for package rt3 +Group: Development/Debug +Requires: %{name} = %{version}-%{release} +Requires: /usr/bin/prove +Requires: perl(DBD::SQLite) +Requires: perl(HTML::Mason::Compiler) +Requires: perl(HTML::Mason::Compiler::ToObject) +Requires: perl(GnuPG::Interface) perl(PerlIO::eol) +Requires: perl(RT::Test) +Requires: perl(Test::HTTP::Server::Simple::StashWarnings) +Requires: perl(Test::Deep) +# Required by the testsuite, but test doesn't work outside of source-tree: Requires: perl(Test::Pod) >= 1.14 +Requires: perl(Test::Expect) +Requires: perl(Test::MockTime) +Requires: perl(Test::Warn) + +%description tests +%{summary} + %if %{with devel_mode} %package -n perl-RT-Test Summary: rt3's test utility module @@ -313,9 +320,6 @@ sed -i \ -e 's,-o $(BIN_OWNER) -g $(RTGROUP),,g' \ Makefile.in -# Copy README.tests into '.', such that %%perl_subpackage_tests picks it up. -cp %{SOURCE1} . - %build %configure \ --with-apachectl=/usr/sbin/apachectl \ @@ -389,10 +393,16 @@ install -d -m755 ${RPM_BUILD_ROOT}%{_sysconfdir}/rt3/upgrade cp -R etc/upgrade/* ${RPM_BUILD_ROOT}%{_sysconfdir}/rt3/upgrade rm -f ${RPM_BUILD_ROOT}%{_sysconfdir}/rt3/upgrade/*.in -install -d m755 ${RPM_BUILD_ROOT}%{_datadir}/rt3/fonts +install -d -m755 ${RPM_BUILD_ROOT}%{_datadir}/rt3/fonts ln -s /usr/share/fonts/google-droid/DroidSans.ttf ${RPM_BUILD_ROOT}%{_datadir}/rt3/fonts ln -s /usr/share/fonts/google-droid/DroidSansFallback.ttf ${RPM_BUILD_ROOT}%{_datadir}/rt3/fonts +install -d -m755 ${RPM_BUILD_ROOT}%{perl_testdir}/%{name} +cp -R t ${RPM_BUILD_ROOT}%{perl_testdir}/%{name} +cp %{SOURCE1} ${RPM_BUILD_ROOT}%{perl_testdir}/%{name} +# pod.t can't be run outside of the source-tree +rm -rf ${RPM_BUILD_ROOT}%{perl_testdir}/%{name}/pod.t + # Fix permissions find ${RPM_BUILD_ROOT}%{RT3_WWWDIR} \ -type f -exec chmod a-x {} \; @@ -457,6 +467,10 @@ fi %{_sbindir}/rt-mailgate %{_mandir}/man1/rt-mailgate* +%files tests +%defattr(-,root,root,-) +%{perl_testdir}/%{name} + %if %{with devel_mode} %files -n perl-RT-Test %defattr(-,root,root,-) @@ -465,6 +479,9 @@ fi %endif %changelog +* Tue Jan 30 2012 Ralf Corsépius <corsepiu@xxxxxxxxxxxxxxxxx> - 3.8.11-5 +- Rewrite *-tests package (Don't use tests macros). + * Mon Jan 30 2012 Ralf Corsépius <corsepiu@xxxxxxxxxxxxxxxxx> - 3.8.11-4 - Rename rpmbuild option with_tests into with_runtests. - Add rt3-tests subpackage. -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel