diff --git a/bouncycastle-osgi.patch b/bouncycastle-osgi.patch
new file mode 100644
index 0000000..12ace19
--- /dev/null
+++ b/bouncycastle-osgi.patch
@@ -0,0 +1,72 @@
+--- bc-java-r1rv64/ant/bc+-build.xml 2020-03-25 13:26:28.073769140 +0100
++++ bc-java-r1rv64/ant/bc+-build.xml 2020-03-25 14:04:13.882533152 +0100
+@@ -370,6 +370,13 @@
+
+
+
++
++
++
++
++
++
++
+
+
+
+@@ -554,6 +561,13 @@
+
+
+
++
++
++
++
++
++
++
+
+
+
+@@ -599,6 +613,13 @@
+
+
+
++
++
++
++
++
++
++
+
+
+
+@@ -652,6 +673,13 @@
+
+
+
++
++
++
++
++
++
++
+
+
+
+@@ -703,6 +731,13 @@
+
+
+
++
++
++
++
++
++
++
+
+
+
diff --git a/bouncycastle.changes b/bouncycastle.changes
index 69c3c3d..f0e9640 100644
--- a/bouncycastle.changes
+++ b/bouncycastle.changes
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Wed Mar 25 13:17:01 UTC 2020 - Fridrich Strba
+
+- Added patch:
+ * bouncycastle-osgi.patch
+ + Add OSGi manifests to the distributed jars so that they can
+ be used from eclipse
+
-------------------------------------------------------------------
Wed Nov 6 18:11:54 UTC 2019 - Pedro Monreal Gonzalez
diff --git a/bouncycastle.spec b/bouncycastle.spec
index d07ffc8..2f5e905 100644
--- a/bouncycastle.spec
+++ b/bouncycastle.spec
@@ -1,7 +1,7 @@
#
# spec file for package bouncycastle
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -36,6 +36,7 @@ Source3: https://repo1.maven.org/maven2/org/%{name}/bcpg-jdk15on/%{versio
Source4: https://repo1.maven.org/maven2/org/%{name}/bcmail-jdk15on/%{version}/bcmail-jdk15on-%{version}.pom
Source5: https://repo1.maven.org/maven2/org/%{name}/bctls-jdk15on/%{version}/bctls-jdk15on-%{version}.pom
Patch0: bouncycastle-javadoc.patch
+Patch1: bouncycastle-osgi.patch
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: fdupes
@@ -110,12 +111,15 @@ API documentation for the Bouncy Castle Cryptography APIs.
%prep
%setup -q -n bc-java-%{gittag}
%patch0 -p1
+%patch1 -p1
# Remove provided binaries
find . -type f -name "*.class" -exec rm -f {} \;
find . -type f -name "*.jar" -exec rm -f {} \;
%build
+echo "package.version:\ %{version}" >> bc-build.properties
+echo "bundle.version:\ %{version}.0" >> bc-build.properties
ant -f ant/jdk15+.xml \
-Dbc.javac.source=6 -Dbc.javac.target=6 \
-Djunit.jar.home=$(build-classpath junit) \