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
|
# https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation
|
||||||
%global _python_bytecompile_extra 0
|
%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_prefix python3
|
||||||
%global python_interpreter %{?__python3}%{!?__python3:dummy}
|
%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_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
|
%global default_jre %{?_root_prefix}%{!?_root_prefix:%{_prefix}}/lib/jvm/jre-1.8.0-openjdk
|
||||||
@ -38,18 +27,10 @@ BuildArch: noarch
|
|||||||
BuildRequires: coreutils
|
BuildRequires: coreutils
|
||||||
BuildRequires: which
|
BuildRequires: which
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
%if %{with asciidoc}
|
|
||||||
BuildRequires: asciidoc
|
|
||||||
BuildRequires: xmlto
|
|
||||||
%endif
|
|
||||||
BuildRequires: %{python_prefix}-devel
|
BuildRequires: %{python_prefix}-devel
|
||||||
BuildRequires: %{python_prefix}-lxml
|
BuildRequires: %{python_prefix}-lxml
|
||||||
BuildRequires: %{python_prefix}-setuptools
|
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
|
BuildRequires: %{python_prefix}-nose
|
||||||
%endif
|
|
||||||
BuildRequires: %{python_prefix}-six
|
BuildRequires: %{python_prefix}-six
|
||||||
|
|
||||||
Requires: javapackages-filesystem = %{version}-%{release}
|
Requires: javapackages-filesystem = %{version}-%{release}
|
||||||
@ -88,9 +69,6 @@ Requires: xmvn-connector-aether
|
|||||||
# sense to explicitly require them in every package built with Maven.
|
# 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-compiler-plugin)
|
||||||
Requires: mvn(org.apache.maven.plugins:maven-jar-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-resources-plugin)
|
||||||
Requires: mvn(org.apache.maven.plugins:maven-surefire-plugin)
|
Requires: mvn(org.apache.maven.plugins:maven-surefire-plugin)
|
||||||
# Tests based on JUnit are very common and JUnit itself is small.
|
# 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
|
%description -n maven-local
|
||||||
This package provides macros and scripts to support packaging Maven artifacts.
|
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
|
%package -n ivy-local
|
||||||
Summary: Local mode for Apache Ivy
|
Summary: Local mode for Apache Ivy
|
||||||
@ -154,10 +120,8 @@ This package provides non-essential macros and scripts to support Java packaging
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n javapackages-%{version}
|
%setup -q -n javapackages-%{version}
|
||||||
|
|
||||||
%if %{without asciidoc}
|
|
||||||
sed -i '/^manpage /d' build
|
sed -i '/^manpage /d' build
|
||||||
sed -i '/${mandir}/d' install
|
sed -i '/${mandir}/d' install
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --pyinterpreter=%{python_interpreter} \
|
%configure --pyinterpreter=%{python_interpreter} \
|
||||||
@ -168,23 +132,15 @@ sed -i '/${mandir}/d' install
|
|||||||
%install
|
%install
|
||||||
./install
|
./install
|
||||||
|
|
||||||
%if %{with xmvn_javadoc}
|
|
||||||
sed -i 's|mvn_build.py|& --xmvn-javadoc|' $(find %{buildroot} -name 'macros*.fjava')
|
sed -i 's|mvn_build.py|& --xmvn-javadoc|' $(find %{buildroot} -name 'macros*.fjava')
|
||||||
%endif
|
|
||||||
sed -e 's/.[17]$/&*/' -i files-*
|
sed -e 's/.[17]$/&*/' -i files-*
|
||||||
|
|
||||||
%if %{without gradle}
|
|
||||||
rm -rf %{buildroot}%{_bindir}/gradle-local
|
rm -rf %{buildroot}%{_bindir}/gradle-local
|
||||||
rm -rf %{buildroot}%{_datadir}/gradle-local
|
rm -rf %{buildroot}%{_datadir}/gradle-local
|
||||||
rm -rf %{buildroot}%{_mandir}/man7/gradle_build.7
|
rm -rf %{buildroot}%{_mandir}/man7/gradle_build.7
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with tests}
|
|
||||||
%if !0%{?_module_build}
|
|
||||||
%check
|
%check
|
||||||
./check
|
./check
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -f files-tools
|
%files -f files-tools
|
||||||
|
|
||||||
@ -194,9 +150,6 @@ rm -rf %{buildroot}%{_mandir}/man7/gradle_build.7
|
|||||||
|
|
||||||
%files -n maven-local
|
%files -n maven-local
|
||||||
|
|
||||||
%if %{with gradle}
|
|
||||||
%files -n gradle-local -f files-gradle
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n ivy-local -f files-ivy
|
%files -n ivy-local -f files-ivy
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user