2013-07-08 12:27:09 +00:00
|
|
|
#
|
2021-07-26 16:42:20 +00:00
|
|
|
# spec file
|
2013-07-08 12:27:09 +00:00
|
|
|
#
|
2022-04-29 10:22:58 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2013-07-08 12:27:09 +00: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 08:03:19 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-07-08 12:27:09 +00:00
|
|
|
#
|
|
|
|
|
2013-08-22 08:59:39 +00:00
|
|
|
|
2020-07-16 07:27:51 +00:00
|
|
|
%{!?_rpmmacrodir:%global _rpmmacrodir %{_rpmconfigdir}/macros.d}
|
2018-07-24 14:28:42 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "extras"
|
2020-09-07 14:32:14 +00:00
|
|
|
%bcond_without python
|
|
|
|
%else
|
2017-05-18 20:41:28 +00:00
|
|
|
%bcond_with python
|
2018-07-24 14:28:42 +00:00
|
|
|
%endif
|
|
|
|
%if %{with python}
|
2020-11-23 13:00:36 +00:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
|
|
|
%define skip_python2 1
|
2018-07-24 14:28:42 +00:00
|
|
|
Name: javapackages-tools-%{flavor}
|
|
|
|
%else
|
2013-07-08 12:25:06 +00:00
|
|
|
Name: javapackages-tools
|
2018-07-24 14:28:42 +00:00
|
|
|
%endif
|
2022-06-03 13:20:44 +00:00
|
|
|
%if %{with python}
|
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
# TW: generate subpackages for every python3 flavor
|
|
|
|
%define python_subpackage_only 1
|
|
|
|
%else
|
|
|
|
%python_subpackages
|
|
|
|
%define python_sitelib %{python3_sitelib}
|
|
|
|
%define python_files() -n python3-%{**}
|
|
|
|
%endif
|
|
|
|
BuildRequires: %{python_module lxml}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildArch: noarch
|
|
|
|
%if 0%{?suse_version} > 1320
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module six}
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
Provides: mvn(com.sun:tools) = SYSTEM
|
|
|
|
Provides: mvn(sun.jdk:jconsole) = SYSTEM
|
|
|
|
%endif
|
2020-07-16 07:08:45 +00:00
|
|
|
Version: 5.3.1
|
2013-07-08 12:27:09 +00:00
|
|
|
Release: 0
|
2013-07-08 12:25:06 +00:00
|
|
|
Summary: Macros and scripts for Java packaging support
|
2013-07-08 12:27:09 +00:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Languages/Java
|
2018-07-24 14:28:42 +00:00
|
|
|
URL: https://github.com/fedora-java/javapackages
|
2018-10-24 08:21:02 +00:00
|
|
|
Source0: https://github.com/fedora-java/javapackages/archive/%{version}.tar.gz
|
2013-08-22 08:59:39 +00: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 20:41:28 +00:00
|
|
|
#PATCH-FIX-SUSE: allow building without python to reduce depgraph
|
|
|
|
Patch1: python-optional.patch
|
2018-10-24 08:03:19 +00:00
|
|
|
#PATCH-FIX-SUSE: SUSE did not bump epoch of openjdk packages, whereas Fedora did
|
|
|
|
# Avoid generating unresolvable requires
|
|
|
|
Patch2: suse-no-epoch.patch
|
2022-04-29 10:22:58 +00:00
|
|
|
#PATCH-FIX-SUSE: Let maven_depmap.py generate metadata with dependencies under certain circumstances
|
|
|
|
Patch3: 0001-Let-maven_depmap.py-generate-metadata-with-dependenc.patch
|
2022-04-29 11:30:05 +00:00
|
|
|
Patch4: 0002-Do-not-try-to-construct-POM-from-maven-coordinate-st.patch
|
|
|
|
Patch5: 0003-Fix-tests-after-the-recent-maven_depmap.py-changes.patch
|
2022-06-03 10:12:40 +00:00
|
|
|
Patch6: 0004-Remove-dependency-on-Six-compatibility-library.patch
|
2013-08-22 08:59:39 +00:00
|
|
|
BuildRequires: asciidoc
|
2015-03-16 16:26:42 +00:00
|
|
|
BuildRequires: fdupes
|
2018-11-05 09:35:48 +00:00
|
|
|
BuildRequires: perl
|
2015-03-16 16:26:42 +00:00
|
|
|
BuildRequires: rpm
|
2013-08-22 08:59:39 +00:00
|
|
|
BuildRequires: xmlto
|
2017-05-18 20:46:12 +00:00
|
|
|
# Used on too many places
|
|
|
|
Provides: jpackage-utils = %{version}
|
2017-05-18 19:51:04 +00:00
|
|
|
Obsoletes: %{name}-doc
|
2017-05-18 20:46:12 +00:00
|
|
|
Obsoletes: jpackage-utils < %{version}
|
2017-05-18 20:41:28 +00:00
|
|
|
%if %{with python}
|
2022-06-03 13:20:44 +00:00
|
|
|
BuildRequires: javapackages-filesystem
|
2021-05-31 12:06:45 +00:00
|
|
|
%else
|
2022-06-03 13:20:44 +00:00
|
|
|
Requires: javapackages-filesystem = %{version}-%{release}
|
2017-05-18 20:41:28 +00:00
|
|
|
%endif
|
2013-07-08 12:25:06 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package provides macros and scripts to support Java packaging.
|
|
|
|
|
2018-10-24 09:11:13 +00: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 20:41:28 +00:00
|
|
|
%if %{with python}
|
2019-04-06 07:19:00 +00:00
|
|
|
%package -n javapackages-gradle
|
|
|
|
Summary: Local mode for Gradle (files)
|
2016-02-08 20:24:54 +00:00
|
|
|
Group: Development/Languages/Java
|
|
|
|
Requires: javapackages-local = %{version}
|
2017-05-19 08:16:34 +00:00
|
|
|
Requires: javapackages-tools = %{version}
|
2016-02-08 20:24:54 +00:00
|
|
|
|
2019-04-06 07:19:00 +00:00
|
|
|
%description -n javapackages-gradle
|
|
|
|
This package contains files needed by local mode for Gradle, which
|
|
|
|
allows artifact resolution using XMvn resolver.
|
2016-02-08 20:24:54 +00:00
|
|
|
|
2019-04-06 07:19:00 +00:00
|
|
|
%package -n javapackages-ivy
|
|
|
|
Summary: Local mode for Apache Ivy (files)
|
2015-03-16 16:26:42 +00:00
|
|
|
Group: Development/Languages/Java
|
2015-03-31 10:28:52 +00:00
|
|
|
Requires: javapackages-local = %{version}
|
2017-05-19 08:16:34 +00:00
|
|
|
Requires: javapackages-tools = %{version}
|
2015-03-16 16:26:42 +00:00
|
|
|
|
2019-04-06 07:19:00 +00: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 16:26:42 +00:00
|
|
|
|
2020-11-23 13:00:36 +00: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
|
2022-06-03 13:20:44 +00:00
|
|
|
%if 0%{?suse_version} > 1320
|
2020-11-23 13:00:36 +00:00
|
|
|
Requires: python-six
|
2022-06-03 13:20:44 +00:00
|
|
|
%endif
|
2020-11-23 13:00:36 +00:00
|
|
|
|
|
|
|
%description -n python-javapackages
|
|
|
|
Module for handling, querying and manipulating of various files for Java
|
|
|
|
packaging in Linux distributions
|
|
|
|
|
|
|
|
%else
|
2021-07-26 16:42:20 +00:00
|
|
|
|
2017-05-18 19:28:34 +00:00
|
|
|
%package -n python3-javapackages
|
2015-03-16 16:26:42 +00:00
|
|
|
Summary: Module for handling various files for Java packaging
|
|
|
|
Group: Development/Languages/Java
|
2017-05-18 19:28:34 +00:00
|
|
|
Requires: python3-lxml
|
2019-04-01 08:59:57 +00:00
|
|
|
Obsoletes: python-javapackages < %{version}-%{release}
|
|
|
|
Provides: python-javapackages = %{version}-%{release}
|
2022-06-03 13:20:44 +00:00
|
|
|
%if 0%{?suse_version} > 1320
|
|
|
|
Requires: python3-six
|
|
|
|
%endif
|
2015-03-16 16:26:42 +00:00
|
|
|
|
2017-05-18 19:28:34 +00:00
|
|
|
%description -n python3-javapackages
|
2015-03-16 16:26:42 +00:00
|
|
|
Module for handling, querying and manipulating of various files for Java
|
|
|
|
packaging in Linux distributions
|
2020-11-23 13:00:36 +00:00
|
|
|
%endif
|
2015-03-16 16:26:42 +00:00
|
|
|
|
|
|
|
%package -n javapackages-local
|
|
|
|
Summary: Non-essential macros and scripts for Java packaging support
|
|
|
|
Group: Development/Languages/Java
|
2018-11-11 15:23:21 +00:00
|
|
|
Requires: java-devel
|
2017-05-19 08:16:34 +00:00
|
|
|
Requires: javapackages-tools = %{version}
|
2017-05-18 20:41:28 +00:00
|
|
|
Requires: python3-javapackages = %{version}
|
2015-03-16 16:26:42 +00:00
|
|
|
|
|
|
|
%description -n javapackages-local
|
|
|
|
This package provides non-essential macros and scripts to support Java packaging.
|
2017-05-18 20:41:28 +00:00
|
|
|
%endif
|
2013-07-08 12:25:06 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n javapackages-%{version}
|
2022-06-03 10:12:40 +00:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%if 0%{?suse_version} >= 1320
|
|
|
|
%patch6 -p1
|
|
|
|
%endif
|
2018-11-05 09:59:44 +00:00
|
|
|
|
2018-11-05 09:35:48 +00: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 12:25:06 +00:00
|
|
|
|
|
|
|
%build
|
2017-05-18 19:28:34 +00:00
|
|
|
%configure \
|
2017-05-18 20:41:28 +00:00
|
|
|
%if %{with python}
|
2018-01-22 09:49:59 +00:00
|
|
|
--pyinterpreter=%{_bindir}/python3
|
2017-05-18 20:41:28 +00:00
|
|
|
%else
|
|
|
|
--pyinterpreter=%{nil}
|
|
|
|
%endif
|
2013-08-22 08:59:39 +00:00
|
|
|
./build
|
2017-05-18 20:41:28 +00:00
|
|
|
%if %{with python}
|
|
|
|
pushd python
|
2020-11-23 13:00:36 +00:00
|
|
|
%python_build
|
2017-05-18 20:41:28 +00:00
|
|
|
popd
|
|
|
|
%endif
|
2013-07-08 12:25:06 +00:00
|
|
|
|
|
|
|
%install
|
2013-08-22 08:59:39 +00:00
|
|
|
./install
|
|
|
|
sed -e 's/.[17]$/&.gz/' -e 's/.py$/&*/' -i files-*
|
|
|
|
|
2017-05-18 20:41:28 +00:00
|
|
|
%if %{with python}
|
2017-05-18 19:28:34 +00:00
|
|
|
pushd python
|
2020-11-23 13:00:36 +00:00
|
|
|
%python_install
|
2017-05-18 19:28:34 +00:00
|
|
|
popd
|
2017-05-18 20:41:28 +00: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 09:49:59 +00:00
|
|
|
%{_sysconfdir}/java/eclipse.conf
|
2017-05-18 20:41:28 +00:00
|
|
|
%{_datadir}/java-utils/java-functions
|
|
|
|
%{_datadir}/java-utils/java-wrapper
|
|
|
|
%{_datadir}/java-utils/scl-enable
|
2020-05-05 14:37:00 +00:00
|
|
|
%{_rpmmacrodir}/macros.jpackage
|
|
|
|
%{_rpmmacrodir}/macros.javapackages-filesystem
|
2017-05-18 20:41:28 +00: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
|
|
|
|
"
|
|
|
|
for i in $files; do
|
|
|
|
rm -rf %{buildroot}/$i
|
|
|
|
done
|
|
|
|
%endif
|
2017-05-18 19:28:34 +00:00
|
|
|
|
2015-03-16 16:26:42 +00:00
|
|
|
rm -rf %{buildroot}%{_datadir}/fedora-review/
|
2013-07-08 12:25:06 +00:00
|
|
|
|
2015-03-16 16:26:42 +00:00
|
|
|
%fdupes %{buildroot}/%{_prefix}
|
|
|
|
|
2021-07-27 13:40:16 +00:00
|
|
|
%if 0%{?suse_version} > 1320
|
2015-03-16 16:26:42 +00:00
|
|
|
%check
|
2020-11-23 13:00:36 +00: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
|
2021-07-27 13:40:16 +00:00
|
|
|
%endif
|
2013-11-10 12:18:07 +00:00
|
|
|
|
2017-05-18 20:41:28 +00:00
|
|
|
%if !%{with python}
|
2018-07-24 14:28:42 +00:00
|
|
|
%files -f files-tools
|
|
|
|
%license LICENSE
|
2018-10-24 09:11:13 +00:00
|
|
|
|
|
|
|
%files -n javapackages-filesystem -f files-filesystem
|
|
|
|
|
2017-05-18 20:41:28 +00:00
|
|
|
%else
|
2021-07-26 16:42:20 +00:00
|
|
|
|
2015-03-16 16:26:42 +00:00
|
|
|
%files -n javapackages-local -f files-local
|
2017-05-18 20:41:28 +00:00
|
|
|
%dir %{_datadir}/java-utils
|
2013-07-08 12:25:06 +00:00
|
|
|
|
2019-04-06 07:19:00 +00:00
|
|
|
%files -n javapackages-gradle -f files-gradle
|
2016-02-08 20:24:54 +00:00
|
|
|
%dir %{_datadir}/gradle-local
|
|
|
|
|
2019-04-06 07:19:00 +00:00
|
|
|
%files -n javapackages-ivy -f files-ivy
|
2015-03-31 10:28:52 +00:00
|
|
|
%dir %{_sysconfdir}/ant.d
|
2015-03-16 16:26:42 +00:00
|
|
|
|
2020-11-23 13:00:36 +00:00
|
|
|
%files %{python_files javapackages}
|
2018-07-24 14:28:42 +00:00
|
|
|
%license LICENSE
|
2020-11-28 09:34:34 +00:00
|
|
|
%{python_sitelib}/javapackages*
|
2017-05-18 20:41:28 +00:00
|
|
|
%endif
|
2015-03-16 16:26:42 +00:00
|
|
|
|
2013-07-08 12:25:06 +00:00
|
|
|
%changelog
|