Accepting request 573700 from home:thomas-schraitle:branches:Documentation:Tools

- Add bcond_with tests to activate test suite

OBS-URL: https://build.opensuse.org/request/show/573700
OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/geekodoc?expand=0&rev=21
This commit is contained in:
Stefan Knorr 2018-02-07 12:58:28 +00:00 committed by Git OBS Bridge
parent 3499ea220e
commit 14fdfb9c9a
2 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Feb 7 12:15:55 UTC 2018 - thomas.schraitle@suse.com
- Add bcond_with tests to activate test suite
-------------------------------------------------------------------
Tue Feb 6 14:49:06 UTC 2018 - thomas.schraitle@suse.com

View File

@ -16,6 +16,8 @@
#
%bcond_with tests
#
Name: geekodoc
Version: 1.0.2
Release: 0
@ -29,6 +31,10 @@ BuildRequires: make
BuildRequires: python3-rnginline
BuildRequires: python3-setuptools
BuildRequires: trang
%if 0%{with tests}
BuildRequires: jing
BuildRequires: libxml2-tools
%endif
Requires: sgml-skel >= 0.7
Requires(post): sgml-skel >= 0.7
Requires(postun): sgml-skel >= 0.7
@ -50,7 +56,9 @@ NovDoc is a DTD/RELAX NG schema used for older SUSE documentation.
%prep
%setup -q
%if 0%{without tests}
[[ -d geekodoc/tests ]] && rm -rf geekodoc/tests
%endif
%build
touch geekodoc/rng/geekodoc5.rnc
@ -76,7 +84,7 @@ cp novdoc/rng/novdocxi-flat.rn? novdoc/rng/novell.ent %{buildroot}%{_datadir}/xm
cp catalog.d/* %{buildroot}%{_sysconfdir}/xml/catalog.d/
# Fixup catalog paths
sed -i'' 's#"\.\./#"%{_datadir}/xml/#' %{buildroot}%{_sysconfdir}/xml/catalog.d/*
sed -i 's#"\.\./#"%{_datadir}/xml/#' %{buildroot}%{_sysconfdir}/xml/catalog.d/*
%post
update-xml-catalog
@ -99,6 +107,13 @@ exit 0
%postun -n novdoc
update-xml-catalog
%if 0%{with tests}
%check
cd geekodoc/tests
./run-tests.sh -V xmllint
./run-tests.sh -V jing
%endif
%files
%license LICENSE
%config %{_sysconfdir}/xml/catalog.d/geekodoc.xml