2013-07-08 14:27:09 +02:00
|
|
|
#
|
2021-07-26 18:42:20 +02:00
|
|
|
# spec file
|
2013-07-08 14:27:09 +02:00
|
|
|
#
|
2023-05-28 21:16:24 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2013-07-08 14:27:09 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-10-24 10:03:19 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-07-08 14:27:09 +02:00
|
|
|
#
|
|
|
|
|
2013-08-22 10:59:39 +02:00
|
|
|
|
2020-07-16 09:27:51 +02:00
|
|
|
%{!?_rpmmacrodir:%global _rpmmacrodir %{_rpmconfigdir}/macros.d}
|
2018-07-24 16:28:42 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "extras"
|
2020-09-07 16:32:14 +02:00
|
|
|
%bcond_without python
|
|
|
|
%else
|
2017-05-18 22:41:28 +02:00
|
|
|
%bcond_with python
|
2018-07-24 16:28:42 +02:00
|
|
|
%endif
|
|
|
|
%if %{with python}
|
2020-11-23 14:00:36 +01:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
|
|
|
%define skip_python2 1
|
2018-07-24 16:28:42 +02:00
|
|
|
Name: javapackages-tools-%{flavor}
|
2022-06-03 15:20:44 +02:00
|
|
|
%else
|
2022-06-03 15:33:58 +02:00
|
|
|
Name: javapackages-tools
|
2022-06-03 15:20:44 +02:00
|
|
|
%endif
|
2023-09-03 01:12:14 +02:00
|
|
|
Version: 6.2.0
|
2013-07-08 14:27:09 +02:00
|
|
|
Release: 0
|
2013-07-08 14:25:06 +02:00
|
|
|
Summary: Macros and scripts for Java packaging support
|
2013-07-08 14:27:09 +02:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Languages/Java
|
2018-07-24 16:28:42 +02:00
|
|
|
URL: https://github.com/fedora-java/javapackages
|
2018-10-24 10:21:02 +02:00
|
|
|
Source0: https://github.com/fedora-java/javapackages/archive/%{version}.tar.gz
|
2013-08-22 10:59:39 +02:00
|
|
|
#PATCH-FIX-SUSE: SUSE does store jvm related things in libdir - ie /usr/lib64 on 64bits
|
|
|
|
# where Fedora use jpackage convention - usr/lib everywhere
|
|
|
|
Patch0: suse-use-libdir.patch
|
2017-05-18 22:41:28 +02:00
|
|
|
#PATCH-FIX-SUSE: allow building without python to reduce depgraph
|
|
|
|
Patch1: python-optional.patch
|
2018-10-24 10:03:19 +02:00
|
|
|
#PATCH-FIX-SUSE: SUSE did not bump epoch of openjdk packages, whereas Fedora did
|
|
|
|
# Avoid generating unresolvable requires
|
|
|
|
Patch2: suse-no-epoch.patch
|
2023-09-05 13:42:54 +02:00
|
|
|
#PATCH-FIX-UPSTREAM: Make maven_depmap order of aliases reproducible
|
|
|
|
Patch3: 0001-Make-maven_depmap-order-of-aliases-reproducible.patch
|
|
|
|
#PATCH-FIX-UPSTREAM: Do not bomb on <relativePath/> construct
|
|
|
|
Patch4: 0002-Do-not-bomb-on-relativePath-construct.patch
|
2023-09-12 11:59:47 +02:00
|
|
|
#PATCH-FIX-UPSTREAM: Sort exclusions when writing out metadata
|
|
|
|
Patch5: 0003-Reproducible-exclusions-order-in-maven-metadata.patch
|
2023-09-13 15:53:33 +02:00
|
|
|
#PATCH-FIX-UPSTREAM: make the aliases and dependencies lists so that the order is kept
|
|
|
|
Patch6: 0004-Reproducible-builds-keep-order-of-aliases-and-depend.patch
|
2023-10-04 09:23:12 +02:00
|
|
|
#PATCH-FIX-UPSTREAM: substitute variables like _${scala.binary.version} in artifact coordinates
|
|
|
|
Patch7: 0005-Interpolate-properties-also-in-the-current-artifact.patch
|
|
|
|
#PATCH-FIX-UPSTREAM: test changes from previous patch
|
|
|
|
Patch8: 0006-Test-variable-expansion-in-artifactId.patch
|
|
|
|
#PATCH-FIX-UPSTREAM: test gracious handling of <relativePath/> construct
|
|
|
|
Patch9: 0007-Test-that-we-don-t-bomb-on-relativePath.patch
|
2013-08-22 10:59:39 +02:00
|
|
|
BuildRequires: asciidoc
|
2015-03-16 17:26:42 +01:00
|
|
|
BuildRequires: fdupes
|
2018-11-05 10:35:48 +01:00
|
|
|
BuildRequires: perl
|
2015-03-16 17:26:42 +01:00
|
|
|
BuildRequires: rpm
|
2013-08-22 10:59:39 +02:00
|
|
|
BuildRequires: xmlto
|
2023-05-29 07:02:15 +02:00
|
|
|
%if %{with python}
|
|
|
|
BuildRequires: javapackages-filesystem
|
|
|
|
%else
|
|
|
|
Requires: javapackages-filesystem = %{version}-%{release}
|
|
|
|
%endif
|
2017-05-18 22:46:12 +02:00
|
|
|
# Used on too many places
|
|
|
|
Provides: jpackage-utils = %{version}
|
2017-05-18 21:51:04 +02:00
|
|
|
Obsoletes: %{name}-doc
|
2017-05-18 22:46:12 +02:00
|
|
|
Obsoletes: jpackage-utils < %{version}
|
2017-05-18 22:41:28 +02:00
|
|
|
%if %{with python}
|
2023-05-29 07:02:15 +02:00
|
|
|
BuildRequires: %{python_module lxml}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildArch: noarch
|
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
# TW: generate subpackages for every python3 flavor
|
|
|
|
%define python_subpackage_only 1
|
|
|
|
%python_subpackages
|
2022-06-03 15:38:45 +02:00
|
|
|
%else
|
2023-05-29 07:02:15 +02:00
|
|
|
%define python_sitelib %python3_sitelib
|
|
|
|
%define python_files() -n python3-%{**}
|
|
|
|
%endif
|
2017-05-18 22:41:28 +02:00
|
|
|
%endif
|
2013-07-08 14:25:06 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package provides macros and scripts to support Java packaging.
|
|
|
|
|
2018-10-24 11:11:13 +02:00
|
|
|
%package -n javapackages-filesystem
|
|
|
|
Summary: Java packages filesystem layout
|
|
|
|
Group: Development/Languages/Java
|
|
|
|
|
|
|
|
%description -n javapackages-filesystem
|
|
|
|
This package provides some basic directories into which Java packages
|
|
|
|
install their content.
|
|
|
|
|
2017-05-18 22:41:28 +02:00
|
|
|
%if %{with python}
|
2019-04-06 09:19:00 +02:00
|
|
|
%package -n javapackages-ivy
|
|
|
|
Summary: Local mode for Apache Ivy (files)
|
2015-03-16 17:26:42 +01:00
|
|
|
Group: Development/Languages/Java
|
2015-03-31 12:28:52 +02:00
|
|
|
Requires: javapackages-local = %{version}
|
2017-05-19 10:16:34 +02:00
|
|
|
Requires: javapackages-tools = %{version}
|
2015-03-16 17:26:42 +01:00
|
|
|
|
2019-04-06 09:19:00 +02:00
|
|
|
%description -n javapackages-ivy
|
|
|
|
This package contains files needed by local mode fow Apache Ivy, which
|
|
|
|
allows artifact resolution using XMvn resolver.
|
2015-03-16 17:26:42 +01:00
|
|
|
|
2020-11-23 14:00:36 +01:00
|
|
|
%if 0%{?python_subpackage_only}
|
|
|
|
%package -n python-javapackages
|
|
|
|
Summary: Module for handling various files for Java packaging
|
|
|
|
Group: Development/Languages/Java
|
|
|
|
Requires: python-lxml
|
2023-05-30 06:55:15 +02:00
|
|
|
Requires: python-xml
|
2020-11-23 14:00:36 +01:00
|
|
|
|
|
|
|
%description -n python-javapackages
|
|
|
|
Module for handling, querying and manipulating of various files for Java
|
|
|
|
packaging in Linux distributions
|
|
|
|
|
|
|
|
%else
|
2021-07-26 18:42:20 +02:00
|
|
|
|
2017-05-18 21:28:34 +02:00
|
|
|
%package -n python3-javapackages
|
2015-03-16 17:26:42 +01:00
|
|
|
Summary: Module for handling various files for Java packaging
|
|
|
|
Group: Development/Languages/Java
|
2017-05-18 21:28:34 +02:00
|
|
|
Requires: python3-lxml
|
2023-05-28 21:25:05 +02:00
|
|
|
Requires: python3-xml
|
2019-04-01 10:59:57 +02:00
|
|
|
Obsoletes: python-javapackages < %{version}-%{release}
|
|
|
|
Provides: python-javapackages = %{version}-%{release}
|
2015-03-16 17:26:42 +01:00
|
|
|
|
2017-05-18 21:28:34 +02:00
|
|
|
%description -n python3-javapackages
|
2015-03-16 17:26:42 +01:00
|
|
|
Module for handling, querying and manipulating of various files for Java
|
|
|
|
packaging in Linux distributions
|
2020-11-23 14:00:36 +01:00
|
|
|
%endif
|
2015-03-16 17:26:42 +01:00
|
|
|
|
|
|
|
%package -n javapackages-local
|
|
|
|
Summary: Non-essential macros and scripts for Java packaging support
|
|
|
|
Group: Development/Languages/Java
|
2018-11-11 16:23:21 +01:00
|
|
|
Requires: java-devel
|
2017-05-19 10:16:34 +02:00
|
|
|
Requires: javapackages-tools = %{version}
|
2017-05-18 22:41:28 +02:00
|
|
|
Requires: python3-javapackages = %{version}
|
2015-03-16 17:26:42 +01:00
|
|
|
|
|
|
|
%description -n javapackages-local
|
|
|
|
This package provides non-essential macros and scripts to support Java packaging.
|
2017-05-18 22:41:28 +02:00
|
|
|
%endif
|
2013-07-08 14:25:06 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n javapackages-%{version}
|
2022-07-07 09:04:41 +02:00
|
|
|
%autopatch -p1
|
2018-11-05 10:59:44 +01:00
|
|
|
|
2018-11-05 10:35:48 +01:00
|
|
|
# The usr/lib is hardcoded in configuration files too
|
|
|
|
new_dir=$(echo %{_libdir} | sed 's#/##')
|
|
|
|
perl -pi -e "s#usr/lib#${new_dir}#g" configs/*.xml
|
2013-07-08 14:25:06 +02:00
|
|
|
|
|
|
|
%build
|
2017-05-18 21:28:34 +02:00
|
|
|
%configure \
|
2017-05-18 22:41:28 +02:00
|
|
|
%if %{with python}
|
2018-01-22 10:49:59 +01:00
|
|
|
--pyinterpreter=%{_bindir}/python3
|
2017-05-18 22:41:28 +02:00
|
|
|
%else
|
|
|
|
--pyinterpreter=%{nil}
|
|
|
|
%endif
|
2013-08-22 10:59:39 +02:00
|
|
|
./build
|
2017-05-18 22:41:28 +02:00
|
|
|
%if %{with python}
|
|
|
|
pushd python
|
2020-11-23 14:00:36 +01:00
|
|
|
%python_build
|
2017-05-18 22:41:28 +02:00
|
|
|
popd
|
|
|
|
%endif
|
2013-07-08 14:25:06 +02:00
|
|
|
|
|
|
|
%install
|
2013-08-22 10:59:39 +02:00
|
|
|
./install
|
|
|
|
sed -e 's/.[17]$/&.gz/' -e 's/.py$/&*/' -i files-*
|
|
|
|
|
2017-05-18 22:41:28 +02:00
|
|
|
%if %{with python}
|
2017-05-18 21:28:34 +02:00
|
|
|
pushd python
|
2020-11-23 14:00:36 +01:00
|
|
|
%python_install
|
2017-05-18 21:28:34 +02:00
|
|
|
popd
|
2017-05-18 22:41:28 +02:00
|
|
|
# kill all the common files
|
|
|
|
files="
|
|
|
|
%{_bindir}/build-classpath
|
|
|
|
%{_bindir}/build-classpath-directory
|
|
|
|
%{_bindir}/build-jar-repository
|
|
|
|
%{_bindir}/check-binary-files
|
|
|
|
%{_bindir}/clean-binary-files
|
|
|
|
%{_bindir}/create-jar-links
|
|
|
|
%{_bindir}/diff-jars
|
|
|
|
%{_bindir}/find-jar
|
|
|
|
%{_bindir}/rebuild-jar-repository
|
|
|
|
%{_bindir}/shade-jar
|
|
|
|
%{_sysconfdir}/java/font.properties
|
|
|
|
%{_sysconfdir}/java/java.conf
|
2018-01-22 10:49:59 +01:00
|
|
|
%{_sysconfdir}/java/eclipse.conf
|
2017-05-18 22:41:28 +02:00
|
|
|
%{_datadir}/java-utils/java-functions
|
|
|
|
%{_datadir}/java-utils/java-wrapper
|
|
|
|
%{_datadir}/java-utils/scl-enable
|
2020-05-05 16:37:00 +02:00
|
|
|
%{_rpmmacrodir}/macros.jpackage
|
|
|
|
%{_rpmmacrodir}/macros.javapackages-filesystem
|
2017-05-18 22:41:28 +02:00
|
|
|
%{_mandir}/man1/build-classpath.1
|
|
|
|
%{_mandir}/man1/build-jar-repository.1
|
|
|
|
%{_mandir}/man1/diff-jars.1
|
|
|
|
%{_mandir}/man1/rebuild-jar-repository.1
|
|
|
|
%{_mandir}/man1/shade-jar.1
|
|
|
|
%{_mandir}/man1/find-jar.1
|
|
|
|
%{_datadir}/maven-metadata/javapackages-metadata.xml
|
|
|
|
%{_datadir}/xmvn/configuration.xml
|
2022-11-09 09:52:46 +01:00
|
|
|
%{_bindir}/gradle-local
|
|
|
|
%{_datadir}/gradle-local
|
|
|
|
%{_mandir}/man7/gradle_build.7
|
2017-05-18 22:41:28 +02:00
|
|
|
"
|
|
|
|
for i in $files; do
|
|
|
|
rm -rf %{buildroot}/$i
|
|
|
|
done
|
|
|
|
%endif
|
2017-05-18 21:28:34 +02:00
|
|
|
|
2015-03-16 17:26:42 +01:00
|
|
|
rm -rf %{buildroot}%{_datadir}/fedora-review/
|
2013-07-08 14:25:06 +02:00
|
|
|
|
2015-03-16 17:26:42 +01:00
|
|
|
%fdupes %{buildroot}/%{_prefix}
|
|
|
|
|
|
|
|
%check
|
2020-11-23 14:00:36 +01:00
|
|
|
# reference: ./check, but we don't want to check coverage and don't need old nose
|
|
|
|
(
|
|
|
|
. ./config.status
|
|
|
|
for test in test/java-functions/*_test.sh; do
|
|
|
|
echo "`basename $test`:"
|
|
|
|
sh $test
|
|
|
|
done
|
|
|
|
)
|
|
|
|
%if %{with python}
|
|
|
|
pushd ./python
|
|
|
|
%pytest
|
|
|
|
popd
|
|
|
|
pushd ./test
|
|
|
|
%pytest
|
|
|
|
popd
|
|
|
|
%endif
|
2013-11-10 13:18:07 +01:00
|
|
|
|
2017-05-18 22:41:28 +02:00
|
|
|
%if !%{with python}
|
2018-07-24 16:28:42 +02:00
|
|
|
%files -f files-tools
|
|
|
|
%license LICENSE
|
2018-10-24 11:11:13 +02:00
|
|
|
|
|
|
|
%files -n javapackages-filesystem -f files-filesystem
|
|
|
|
|
2017-05-18 22:41:28 +02:00
|
|
|
%else
|
2021-07-26 18:42:20 +02:00
|
|
|
|
2023-09-03 01:31:21 +02:00
|
|
|
%files -n javapackages-local -f files-common -f files-compat -f files-generators
|
2017-05-18 22:41:28 +02:00
|
|
|
%dir %{_datadir}/java-utils
|
2013-07-08 14:25:06 +02:00
|
|
|
|
2019-04-06 09:19:00 +02:00
|
|
|
%files -n javapackages-ivy -f files-ivy
|
2015-03-31 12:28:52 +02:00
|
|
|
%dir %{_sysconfdir}/ant.d
|
2015-03-16 17:26:42 +01:00
|
|
|
|
2020-11-23 14:00:36 +01:00
|
|
|
%files %{python_files javapackages}
|
2018-07-24 16:28:42 +02:00
|
|
|
%license LICENSE
|
2020-11-28 10:34:34 +01:00
|
|
|
%{python_sitelib}/javapackages*
|
2017-05-18 22:41:28 +02:00
|
|
|
%endif
|
2015-03-16 17:26:42 +01:00
|
|
|
|
2013-07-08 14:25:06 +02:00
|
|
|
%changelog
|