summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cgit.spec24
1 files changed, 24 insertions, 0 deletions
diff --git a/cgit.spec b/cgit.spec
index 54530a3..e418075 100644
--- a/cgit.spec
+++ b/cgit.spec
@@ -1,5 +1,6 @@
# Review bug: https://bugzilla.redhat.com/479723
+# Defaults
%global gitver 2.10.2
%global cachedir %{_localstatedir}/cache/%{name}
%global filterdir %{_libexecdir}/%{name}/filters
@@ -10,6 +11,13 @@
# the *.py files in cgit are not importable python modules
%global _python_bytecompile_extra 0
+# Settings for Fedora and EL > 7
+%if 0%{?fedora} || 0%{?rhel} > 7
+%global use_perl_interpreter 1
+%else
+%global use_perl_interpreter 0
+%endif
+
# The highlight package is not available in epel-7-ppc64
%if 0%{?rhel} == 7 && %{_arch} == ppc64
%bcond_with highlight
@@ -58,6 +66,17 @@ BuildRequires: openssl-devel
BuildRequires: lua-devel
BuildRequires: make
+# Test dependencies
+BuildRequires: gettext
+%if %{use_perl_interpreter}
+BuildRequires: perl-interpreter
+%else
+BuildRequires: perl
+%endif
+BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: strace
+BuildRequires: tidy
+
%if %{with httpd_filesystem}
# httpd-filesystem provides the basic apache directory layout
Requires: httpd-filesystem
@@ -133,6 +152,10 @@ install -p -m0644 httpd.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/cgit.conf
install -d -m0755 %{buildroot}%{cachedir}
+%check
+make test
+
+
%files
%doc README* *.html
%license COPYING
@@ -162,6 +185,7 @@ install -d -m0755 %{buildroot}%{cachedir}
- simplify README.SELinux install
- use %%bcond_(with|without) to handle httpd-filesystem
- avoid libcrypto.so requires
+- run test suite in %%check
* Mon Jun 04 2018 Todd Zullinger <tmz@pobox.com>
- make config: drop redundant DESTDIR/INSTALL, add COPYTREE