diff --git a/apache-commons-cli-build.xml b/apache-commons-cli-build.xml
new file mode 100644
index 0000000..63c1d0d
--- /dev/null
+++ b/apache-commons-cli-build.xml
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apache-commons-cli.changes b/apache-commons-cli.changes
index d62fd26..eb99ea9 100644
--- a/apache-commons-cli.changes
+++ b/apache-commons-cli.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Fri Feb 12 12:54:07 UTC 2021 - Fridrich Strba
+
+- Add OSGi manifest to the build files.
+- Set java source/target levels to 6
+
-------------------------------------------------------------------
Mon Mar 25 17:19:16 UTC 2019 - Fridrich Strba
diff --git a/apache-commons-cli.spec b/apache-commons-cli.spec
index 0b25b15..b4f4bee 100644
--- a/apache-commons-cli.spec
+++ b/apache-commons-cli.spec
@@ -1,7 +1,7 @@
#
# spec file for package apache-commons-cli
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,17 +26,15 @@ License: Apache-2.0
Group: Development/Libraries/Java
URL: http://commons.apache.org/%{base_name}/
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
-Source1: build.xml.tar.bz2
+Source1: %{name}-build.xml
Patch0: CLI-253-workaround.patch
BuildRequires: ant
BuildRequires: fdupes
-BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
-Requires: java >= 1.8
Provides: jakarta-%{short_name} = %{version}-%{release}
-Obsoletes: jakarta-%{short_name} < %{version}
-Provides: apache-cli = %{version}
-Obsoletes: apache-cli < %{version}
+Obsoletes: jakarta-%{short_name} < %{version}-%{release}
+Provides: apache-cli = %{version}-%{release}
+Obsoletes: apache-cli < %{version}-%{release}
BuildArch: noarch
%description
@@ -46,22 +44,21 @@ command line arguments and options.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
-Provides: jakarta-%{short_name}-javadoc = %{version}
-Obsoletes: jakarta-%{short_name}-javadoc < %{version}
+Provides: jakarta-%{short_name}-javadoc = %{version}-%{release}
+Obsoletes: jakarta-%{short_name}-javadoc < %{version}-%{release}
%description javadoc
This package contains the API documentation for %{name}.
%prep
-%setup -q -n %{short_name}-%{version}-src -a1
+%setup -q -n %{short_name}-%{version}-src
+cp %{SOURCE1} build.xml
%patch0 -p1
%pom_remove_parent
%build
-ant -Dmaven.mode.offline=true package javadoc \
- -Dmaven.test.skip=true \
- -lib %{_datadir}/java
+%ant package javadoc
%install
# jars
diff --git a/build.xml.tar.bz2 b/build.xml.tar.bz2
deleted file mode 100644
index 34840d8..0000000
--- a/build.xml.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7d2cd321bc2a81e5bd7668a3bb07b5b3b62cdc513dfac7be8b9b290817d64b25
-size 3094