2018-12-21 08:44:48 +00:00
|
|
|
#
|
|
|
|
# spec file for package typesafe-config
|
|
|
|
#
|
2024-02-21 17:10:17 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-12-21 08:44:48 +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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: typesafe-config
|
2021-04-20 05:32:12 +00:00
|
|
|
Version: 1.4.1
|
2018-12-21 08:44:48 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Configuration library for JVM languages
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Libraries/Java
|
2021-04-19 11:18:58 +00:00
|
|
|
URL: https://github.com/typesafehub/config
|
|
|
|
Source0: %{URL}/archive/v%{version}.tar.gz#/config-%{version}.tar.gz
|
|
|
|
Source1: https://repo1.maven.org/maven2/com/typesafe/config/%{version}/config-%{version}.pom
|
2022-03-29 15:23:36 +00:00
|
|
|
Patch0: fix-doc-lint.patch
|
2018-12-21 08:44:48 +00:00
|
|
|
BuildRequires: fdupes
|
2021-07-27 13:50:07 +00:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2024-02-21 17:10:17 +00:00
|
|
|
BuildRequires: javapackages-local >= 6
|
|
|
|
BuildArch: noarch
|
2022-04-19 07:56:32 +00:00
|
|
|
%if 0%{?rhel} >= 9
|
|
|
|
BuildRequires: xmvn-tools
|
|
|
|
%endif
|
|
|
|
|
2018-12-21 08:44:48 +00:00
|
|
|
%description
|
|
|
|
Configuration library for JVM languages.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
|
|
|
Group: Documentation/HTML
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
This package contains javadoc for %{name}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n config-%{version}
|
2024-02-21 17:10:17 +00:00
|
|
|
%patch -P 0 -p1
|
2018-12-21 08:44:48 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
pushd config
|
|
|
|
mkdir -p target/classes
|
2021-04-20 05:32:12 +00:00
|
|
|
javac -d target/classes \
|
|
|
|
-source 8 \
|
|
|
|
-target 8 \
|
|
|
|
-g \
|
|
|
|
-Xlint:unchecked \
|
2018-12-21 08:44:48 +00:00
|
|
|
$(find src/main/java -name \*.java | xargs)
|
2024-09-24 10:41:03 +00:00
|
|
|
jar \
|
|
|
|
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
|
|
|
|
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
|
|
|
|
%endif
|
|
|
|
--create --file=target/config.jar -C target/classes .
|
2021-04-20 05:32:12 +00:00
|
|
|
|
2022-04-19 07:56:32 +00:00
|
|
|
%if ! 0%{?rhel} >= 9
|
2018-12-21 08:44:48 +00:00
|
|
|
mkdir -p target/api
|
2021-04-20 05:32:12 +00:00
|
|
|
javadoc -d target/api \
|
|
|
|
-source 8 \
|
|
|
|
-notimestamp \
|
|
|
|
-group "Public API (version %{version})" "com.typesafe.config:com.typesafe.config.parser" \
|
|
|
|
-group "Internal Implementation - Not ABI Stable" "com.typesafe.config.impl" \
|
2018-12-21 08:44:48 +00:00
|
|
|
$(find src/main/java -name \*.java | xargs)
|
2022-04-19 07:56:32 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
popd
|
|
|
|
cp %{SOURCE1} .
|
2024-02-21 17:10:17 +00:00
|
|
|
%{mvn_artifact} config-%{version}.pom config/target/config.jar
|
2018-12-21 08:44:48 +00:00
|
|
|
|
|
|
|
%install
|
2022-04-19 07:56:32 +00:00
|
|
|
%if 0%{?rhel}
|
|
|
|
%mvn_install
|
|
|
|
%else
|
2018-12-21 08:44:48 +00:00
|
|
|
# jar
|
|
|
|
install -d -m 755 %{buildroot}%{_javadir}
|
|
|
|
install -pm 644 config/target/config.jar %{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
# pom
|
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
2024-02-21 17:10:17 +00:00
|
|
|
%{mvn_install_pom} %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}.pom
|
2018-12-21 08:44:48 +00:00
|
|
|
%add_maven_depmap %{name}.pom %{name}.jar
|
2022-04-19 07:56:32 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if ! 0%{?rhel} >= 9
|
2018-12-21 08:44:48 +00:00
|
|
|
#javadoc
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}
|
|
|
|
cp -a config/target/api %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
2022-04-19 07:56:32 +00:00
|
|
|
%endif
|
2018-12-21 08:44:48 +00:00
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
%doc NEWS.md README.md
|
|
|
|
%license LICENSE-2.0.txt
|
|
|
|
|
2022-04-19 07:56:32 +00:00
|
|
|
%if ! 0%{?rhel} >= 9
|
2018-12-21 08:44:48 +00:00
|
|
|
%files javadoc
|
|
|
|
%license LICENSE-2.0.txt
|
|
|
|
%{_javadocdir}/*
|
2022-04-19 07:56:32 +00:00
|
|
|
%endif
|
2018-12-21 08:44:48 +00:00
|
|
|
|
|
|
|
%changelog
|