Expand conditionals
This commit is contained in:
parent
6b17d310ad
commit
adc564ae92
@ -6,19 +6,8 @@
|
||||
# https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation
|
||||
%global _python_bytecompile_extra 0
|
||||
|
||||
%bcond_without asciidoc
|
||||
%bcond_without gradle
|
||||
%bcond_without tests
|
||||
%bcond_with xmvn_javadoc
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%global python_prefix python3
|
||||
%global python_interpreter %{?__python3}%{!?__python3:dummy}
|
||||
%else
|
||||
%global python_prefix python
|
||||
%global python_interpreter %{?__python2}%{!?__python2:dummy}
|
||||
%global rpmmacrodir /etc/rpm
|
||||
%endif
|
||||
|
||||
%global default_jdk %{?_root_prefix}%{!?_root_prefix:%{_prefix}}/lib/jvm/java-1.8.0-openjdk
|
||||
%global default_jre %{?_root_prefix}%{!?_root_prefix:%{_prefix}}/lib/jvm/jre-1.8.0-openjdk
|
||||
@ -38,18 +27,10 @@ BuildArch: noarch
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: which
|
||||
BuildRequires: make
|
||||
%if %{with asciidoc}
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: xmlto
|
||||
%endif
|
||||
BuildRequires: %{python_prefix}-devel
|
||||
BuildRequires: %{python_prefix}-lxml
|
||||
BuildRequires: %{python_prefix}-setuptools
|
||||
%if !0%{?_module_build}
|
||||
# XXX python-nose is not part of any module yet, but it should get
|
||||
# modularized one day, right? mizdebsk, Sep 2017
|
||||
BuildRequires: %{python_prefix}-nose
|
||||
%endif
|
||||
BuildRequires: %{python_prefix}-six
|
||||
|
||||
Requires: javapackages-filesystem = %{version}-%{release}
|
||||
@ -88,9 +69,6 @@ Requires: xmvn-connector-aether
|
||||
# sense to explicitly require them in every package built with Maven.
|
||||
Requires: mvn(org.apache.maven.plugins:maven-compiler-plugin)
|
||||
Requires: mvn(org.apache.maven.plugins:maven-jar-plugin)
|
||||
%if %{without xmvn_javadoc}
|
||||
Requires: mvn(org.apache.maven.plugins:maven-javadoc-plugin)
|
||||
%endif
|
||||
Requires: mvn(org.apache.maven.plugins:maven-resources-plugin)
|
||||
Requires: mvn(org.apache.maven.plugins:maven-surefire-plugin)
|
||||
# Tests based on JUnit are very common and JUnit itself is small.
|
||||
@ -103,18 +81,6 @@ Requires: mvn(org.apache.maven.surefire:surefire-testng)
|
||||
%description -n maven-local
|
||||
This package provides macros and scripts to support packaging Maven artifacts.
|
||||
|
||||
%if %{with gradle}
|
||||
%package -n gradle-local
|
||||
Summary: Local mode for Gradle
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: javapackages-local = %{version}-%{release}
|
||||
Requires: gradle >= 2.2.1-2
|
||||
Requires: xmvn-connector-gradle
|
||||
|
||||
%description -n gradle-local
|
||||
This package implements local mode for Gradle, which allows artifact
|
||||
resolution using XMvn resolver.
|
||||
%endif
|
||||
|
||||
%package -n ivy-local
|
||||
Summary: Local mode for Apache Ivy
|
||||
@ -154,10 +120,8 @@ This package provides non-essential macros and scripts to support Java packaging
|
||||
%prep
|
||||
%setup -q -n javapackages-%{version}
|
||||
|
||||
%if %{without asciidoc}
|
||||
sed -i '/^manpage /d' build
|
||||
sed -i '/${mandir}/d' install
|
||||
%endif
|
||||
|
||||
%build
|
||||
%configure --pyinterpreter=%{python_interpreter} \
|
||||
@ -168,23 +132,15 @@ sed -i '/${mandir}/d' install
|
||||
%install
|
||||
./install
|
||||
|
||||
%if %{with xmvn_javadoc}
|
||||
sed -i 's|mvn_build.py|& --xmvn-javadoc|' $(find %{buildroot} -name 'macros*.fjava')
|
||||
%endif
|
||||
sed -e 's/.[17]$/&*/' -i files-*
|
||||
|
||||
%if %{without gradle}
|
||||
rm -rf %{buildroot}%{_bindir}/gradle-local
|
||||
rm -rf %{buildroot}%{_datadir}/gradle-local
|
||||
rm -rf %{buildroot}%{_mandir}/man7/gradle_build.7
|
||||
%endif
|
||||
|
||||
%if %{with tests}
|
||||
%if !0%{?_module_build}
|
||||
%check
|
||||
./check
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%files -f files-tools
|
||||
|
||||
@ -194,9 +150,6 @@ rm -rf %{buildroot}%{_mandir}/man7/gradle_build.7
|
||||
|
||||
%files -n maven-local
|
||||
|
||||
%if %{with gradle}
|
||||
%files -n gradle-local -f files-gradle
|
||||
%endif
|
||||
|
||||
%files -n ivy-local -f files-ivy
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user