From 83bc70028f568b84e1a4feaf42307d323200d9ea Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 23 Sep 2017 11:37:11 +0200 Subject: [PATCH] Conditionally allow building without asciidoc --- cdi-api.spec | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/cdi-api.spec b/cdi-api.spec index f88c7d1..8348eed 100644 --- a/cdi-api.spec +++ b/cdi-api.spec @@ -1,16 +1,18 @@ +%bcond_without asciidoc + %global namedreltag .NOTHING %global namedversion %{version}%{?namedreltag} Name: cdi-api Version: 1.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: CDI API License: ASL 2.0 URL: http://seamframework.org/Weld +BuildArch: noarch + Source0: https://github.com/cdi-spec/cdi/archive/%{version}.tar.gz -BuildArch: noarch -BuildRequires: asciidoc BuildRequires: maven-local BuildRequires: mvn(javax.el:javax.el-api) BuildRequires: mvn(javax.inject:javax.inject) @@ -21,7 +23,10 @@ BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec) BuildRequires: mvn(org.jboss.weld:weld-parent:pom:) BuildRequires: mvn(org.testng:testng::jdk15:) +%if %{with asciidoc} +BuildRequires: asciidoc BuildRequires: /usr/bin/pygmentize +%endif Provides: javax.enterprise.inject @@ -51,10 +56,15 @@ cd api %mvn_build -- -Denforcer.skip ) +%if %{with asciidoc} cd spec/src/main/doc -asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o ../../../../cdi-spec.html cdi-spec.asciidoc -asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o ../../../../license-asl2.html license-asl2.asciidoc -asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o ../../../../license-jcp.html license-jcp.asciidoc +asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o cdi-spec.html cdi-spec.asciidoc +asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o license-asl2.html license-asl2.asciidoc +asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o license-jcp.html license-jcp.asciidoc +%global adoc html +%else +%global adoc asciidoc +%endif %install cd api @@ -65,13 +75,18 @@ build-jar-repository %{buildroot}%{_javadir}/javax.enterprise.inject/ \ %files -f api/.mfiles %{_javadir}/javax.enterprise.inject/ -%doc cdi-spec.html -%license license-asl2.html license-jcp.html +%doc spec/src/main/doc/cdi-spec.%{adoc} +%license spec/src/main/doc/license-asl2.%{adoc} +%license spec/src/main/doc/license-jcp.%{adoc} %files javadoc -f api/.mfiles-javadoc -%license license-asl2.html license-jcp.html +%license spec/src/main/doc/license-asl2.%{adoc} +%license spec/src/main/doc/license-jcp.%{adoc} %changelog +* Sat Sep 23 2017 Mikolaj Izdebski - 1.2-6 +- Conditionally allow building without asciidoc + * Wed Jul 26 2017 Fedora Release Engineering - 1.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild