1
0
javapackages-tools/javapackages-tools.spec
Tomáš Chvátal 1bb31d518d - Split to python and non-python edition for smaller depgraph
- Add patch python-optional.patch

- Split to python and non-python edition for smaller depgraph
- Add patch python-optional.patch

- Update to version 4.7.0+git20170331.ef4057e7:
  * Reimplement abs2rel in Python
  * Don't expand {scl} in macro definitions
  * Install expanded rpmfc attr files
  * [spec] Avoid file conflicts between in SCL
  * Fix macros.d directory ownership
  * Make %ant macro enable SCL when needed
  * [spec] Fix file conflicts between SCL and non-SCL packages
  * Fix ownership of ivyxmldir
  * [test] Force locale for python processes
  * Don't include timestamp in generated pom.properties
- Remove patch merged by upstream:
  * create_valid_xml_comments.patch
- Remove patch suse-macros-install-location.patch
  * We switch to /usr/lib/ location for macros
- Try to reduce some dependencies bsc#1036025
- Refresh patch suse-use-libdir.patch

- Add create_valid_xml_comments.patch
  python-lxml 3.5.0 introduces validation for xml comments, and 
  one of the comments created in this package were not valid.
  This patch fixes the problem.  It backported from upstream and
  should be in the next release.
  84211c0ee7

OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=35
2017-05-18 20:41:28 +00:00

194 lines
5.4 KiB
RPMSpec

#
# spec file for package javapackages-tools
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%bcond_with python
Name: javapackages-tools
Version: 4.7.0+git20170331.ef4057e7
Release: 0
Summary: Macros and scripts for Java packaging support
License: BSD-3-Clause
Group: Development/Languages/Java
Url: https://github.com/mizdebsk/javapackages
# Latest tag is missing, quite often needs patches, use service
Source: javapackages-%{version}.tar.xz
#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
#PATCH-FIX-SUSE: allow building without python to reduce depgraph
Patch1: python-optional.patch
BuildRequires: asciidoc
BuildRequires: fdupes
BuildRequires: rpm
BuildRequires: xmlto
BuildRequires: xz
Obsoletes: %{name}-doc
%if %{with python}
BuildRequires: python3-lxml
BuildRequires: python3-nose
BuildRequires: python3-setuptools
BuildRequires: python3-six
%endif
%description
This package provides macros and scripts to support Java packaging.
%if %{with python}
%package -n maven-local
Summary: Macros and scripts for Maven packaging support
Group: Development/Languages/Java
Requires: %{name} = %{version}
Requires: javapackages-local = %{version}
%description -n maven-local
This package provides macros and scripts to support packaging Maven artifacts.
%package -n gradle-local
Summary: Local mode for Gradle
Group: Development/Languages/Java
Requires: %{name} = %{version}
Requires: javapackages-local = %{version}
%description -n gradle-local
This package implements local mode for Gradle, which allows artifact
resolution using XMvn resolver.
%package -n ivy-local
Summary: Local mode for Apache Ivy
Group: Development/Languages/Java
Requires: %{name} = %{version}
Requires: ant
Requires: javapackages-local = %{version}
%description -n ivy-local
This package implements local mode fow Apache Ivy, which allows
artifact resolution using XMvn resolver.
%package -n python3-javapackages
Summary: Module for handling various files for Java packaging
Group: Development/Languages/Java
Requires: python3-lxml
Requires: python3-six
Obsoletes: python-javapackages
%description -n python3-javapackages
Module for handling, querying and manipulating of various files for Java
packaging in Linux distributions
%package -n javapackages-local
Summary: Non-essential macros and scripts for Java packaging support
Group: Development/Languages/Java
Requires: %{name} = %{version}
Requires: python3-javapackages = %{version}
%description -n javapackages-local
This package provides non-essential macros and scripts to support Java packaging.
%endif
%prep
%setup -q -n javapackages-%{version}
%autopatch -p1
%build
%configure \
%if %{with python}
--pyinterpreter=python3
%else
--pyinterpreter=%{nil}
%endif
./build
%if %{with python}
pushd python
python3 setup.py build
popd
%endif
%install
./install
sed -e 's/.[17]$/&.gz/' -e 's/.py$/&*/' -i files-*
%if %{with python}
pushd python
python3 setup.py install --root %{buildroot}
popd
# 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
%{_datadir}/java-utils/java-functions
%{_datadir}/java-utils/java-wrapper
%{_datadir}/java-utils/scl-enable
%{_prefix}/lib/rpm/macros.d/macros.jpackage
%{_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
rm -rf %{buildroot}%{_datadir}/fedora-review/
%fdupes %{buildroot}/%{_prefix}
%check
./check
%if !%{with python}
%files -f files-common
%defattr(-,root,root,-)
%doc LICENSE
%else
%files -n javapackages-local -f files-local
%defattr(-,root,root,-)
%dir %{_datadir}/java-utils
%files -n maven-local -f files-maven
%defattr(-,root,root,-)
%files -n gradle-local -f files-gradle
%defattr(-,root,root)
%dir %{_datadir}/gradle-local
%files -n ivy-local -f files-ivy
%defattr(-,root,root,-)
%dir %{_sysconfdir}/ant.d
%files -n python3-javapackages
%defattr(-,root,root,-)
%doc LICENSE
%{python3_sitelib}/javapackages*
%endif
%changelog