SHA256
1
0
forked from pool/bouncycastle
Fridrich Strba 2019-09-24 15:36:03 +00:00 committed by Git OBS Bridge
parent 0a13462ec2
commit 7b7d8aad80
9 changed files with 331 additions and 78 deletions

46
bcmail-jdk15on-1.60.pom Normal file
View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk15on</artifactId>
<packaging>jar</packaging>
<name>Bouncy Castle S/MIME API</name>
<version>1.60</version>
<description>The Bouncy Castle Java S/MIME APIs for handling S/MIME protocols. This jar contains S/MIME APIs for JDK 1.5 to JDK 1.8. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs. The JavaMail API and the Java activation framework will also be needed.</description>
<url>http://www.bouncycastle.org/java.html</url>
<licenses>
<license>
<name>Bouncy Castle Licence</name>
<url>http://www.bouncycastle.org/licence.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/bcgit/bc-java</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/bcgit/bc-java/issues</url>
</issueManagement>
<developers>
<developer>
<id>feedback-crypto</id>
<name>The Legion of the Bouncy Castle Inc.</name>
<email>feedback-crypto@bouncycastle.org</email>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.60</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.60</version>
<type>jar</type>
</dependency>
</dependencies>
</project>

45
bcpg-jdk15on-1.60.pom Normal file
View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk15on</artifactId>
<packaging>jar</packaging>
<name>Bouncy Castle OpenPGP API</name>
<version>1.60</version>
<description>The Bouncy Castle Java API for handling the OpenPGP protocol. This jar contains the OpenPGP API for JDK 1.5 to JDK 1.8. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs.</description>
<url>http://www.bouncycastle.org/java.html</url>
<licenses>
<license>
<name>Bouncy Castle Licence</name>
<url>http://www.bouncycastle.org/licence.html</url>
<distribution>repo</distribution>
</license>
<license>
<name>Apache Software License, Version 1.1</name>
<url>http://www.apache.org/licenses/LICENSE-1.1</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/bcgit/bc-java</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/bcgit/bc-java/issues</url>
</issueManagement>
<developers>
<developer>
<id>feedback-crypto</id>
<name>The Legion of the Bouncy Castle Inc.</name>
<email>feedback-crypto@bouncycastle.org</email>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.60</version>
<type>jar</type>
</dependency>
</dependencies>
</project>

40
bcpkix-jdk15on-1.60.pom Normal file
View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<packaging>jar</packaging>
<name>Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs</name>
<version>1.60</version>
<description>The Bouncy Castle Java APIs for CMS, PKCS, EAC, TSP, CMP, CRMF, OCSP, and certificate generation. This jar contains APIs for JDK 1.5 to JDK 1.8. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs.</description>
<url>http://www.bouncycastle.org/java.html</url>
<licenses>
<license>
<name>Bouncy Castle Licence</name>
<url>http://www.bouncycastle.org/licence.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/bcgit/bc-java</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/bcgit/bc-java/issues</url>
</issueManagement>
<developers>
<developer>
<id>feedback-crypto</id>
<name>The Legion of the Bouncy Castle Inc.</name>
<email>feedback-crypto@bouncycastle.org</email>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.60</version>
<type>jar</type>
</dependency>
</dependencies>
</project>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:92c042beb96bffec0890778ab036ac14d16f35da2ef21eaef8d8d23f340ee686
size 9207686

40
bctls-jdk15on-1.60.pom Normal file
View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.bouncycastle</groupId>
<artifactId>bctls-jdk15on</artifactId>
<packaging>jar</packaging>
<name>Bouncy Castle JSSE provider and TLS/DTLS API</name>
<version>1.60</version>
<description>The Bouncy Castle Java APIs for TLS and DTLS, including a provider for the JSSE.</description>
<url>http://www.bouncycastle.org/java.html</url>
<licenses>
<license>
<name>Bouncy Castle Licence</name>
<url>http://www.bouncycastle.org/licence.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/bcgit/bc-java</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/bcgit/bc-java/issues</url>
</issueManagement>
<developers>
<developer>
<id>feedback-crypto</id>
<name>The Legion of the Bouncy Castle Inc.</name>
<email>feedback-crypto@bouncycastle.org</email>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.60</version>
<type>jar</type>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,40 @@
--- bc-java-r1v60/ant/bc+-build.xml 2018-07-02 00:14:10.000000000 +0200
+++ bc-java-r1v60/ant/bc+-build.xml 2018-11-19 18:49:26.961265967 +0100
@@ -106,7 +106,7 @@
<javac source="${bc.javac.source}" target="${bc.javac.target}"
srcdir="${artifacts.dir}/@{target}/src"
destdir="${build.dir}/@{target}/classes"
- memoryMaximumSize="512m"
+ memoryMaximumSize="512m" encoding="utf-8"
debug="${release.debug}" fork="true">
<classpath>
<path refid="project.classpath" />
@@ -143,7 +143,7 @@
<javac source="${bc.javac.source}" target="${bc.javac.target}"
srcdir="${artifacts.dir}/@{target}/src"
destdir="${build.dir}/@{target}/classes"
- memoryMaximumSize="512m"
+ memoryMaximumSize="512m" encoding="utf-8"
debug="${release.debug}">
<classpath>
<path refid="project.classpath" />
@@ -219,8 +219,8 @@
<element name="docElements" />
<sequential>
<mkdir dir="@{docsDir}" />
- <javadoc maxmemory="384m" sourcepath="@{srcDir}"
- destdir="@{docsDir}"
+ <javadoc maxmemory="384m" sourcepath="@{srcDir}" source="${bc.javac.source}"
+ destdir="@{docsDir}" encoding="utf-8"
windowtitle="Bouncy Castle Library ${release.name} API Specification"
header="&lt;b&gt;Bouncy Castle Cryptography Library ${release.name}&lt;/b&gt;">
<docElements/>
@@ -284,7 +284,7 @@
<javac source="${bc.javac.source}" target="${bc.javac.target}"
srcdir="${lcrypto.target.src.dir}"
destdir="${lcrypto.target.classes.dir}"
- memoryMaximumSize="512m"
+ memoryMaximumSize="512m" encoding="utf-8"
fork="true"
debug="${release.debug}">
<classpath>

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Sep 24 14:35:32 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Package also the bcpkix bcpg bcmail bctls artifacts in separate
sub-packages
- Revert to building with source/target 6, since it is still
possible
-------------------------------------------------------------------
Thu Jul 19 10:24:12 UTC 2018 - tchvatal@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package bouncycastle
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 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
@ -12,106 +12,131 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define ver 1.60
%define shortver 160
%define archivever jdk15on-%{shortver}
%define classname org.bouncycastle.jce.provider.BouncyCastleProvider
%global ver 1.60
%global shortver 160
%global gittag r1v60
%global archivever jdk15on-%{shortver}
%global classname org.bouncycastle.jce.provider.BouncyCastleProvider
Name: bouncycastle
Version: %{ver}
Release: 0
Summary: Bouncy Castle Crypto Package for Java
Summary: Bouncy Castle Cryptography APIs for Java
License: MIT
Group: Development/Libraries/Java
Url: http://www.bouncycastle.org/
Source0: http://www.bouncycastle.org/download/bcprov-%{archivever}.tar.gz
Source1: http://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/%{ver}/bcprov-jdk15on-%{ver}.pom
BuildRequires: java-devel >= 1.8
URL: http://www.bouncycastle.org
Source0: https://github.com/bcgit/bc-java/archive/%{gittag}.tar.gz
# POMs from Maven Central
Source1: http://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/%{version}/bcprov-jdk15on-%{version}.pom
Source2: http://repo1.maven.org/maven2/org/bouncycastle/bcpkix-jdk15on/%{version}/bcpkix-jdk15on-%{version}.pom
Source3: http://repo1.maven.org/maven2/org/bouncycastle/bcpg-jdk15on/%{version}/bcpg-jdk15on-%{version}.pom
Source4: http://repo1.maven.org/maven2/org/bouncycastle/bcmail-jdk15on/%{version}/bcmail-jdk15on-%{version}.pom
Source5: http://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/%{version}/bctls-jdk15on-%{version}.pom
Patch0: bouncycastle-javadoc.patch
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: fdupes
BuildRequires: javamail
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: junit
#FIXME: this is needed for initialize of NSS crypto backend, will be required (not required(post) by openjdk)
BuildRequires: mozilla-nss
BuildRequires: unzip
Requires: java
Requires(post): javapackages-tools
Requires(postun): javapackages-tools
Provides: bcprov = %{version}-%{release}
BuildArch: noarch
%description
The Bouncy Castle Crypto package is a Java implementation of cryptographic
algorithms. The package is organised so that it contains a light-weight API
suitable for use in any environment (including the newly released J2ME) with
the additional infrastructure to conform the algorithms to the JCE framework.
algorithms. This jar contains JCE provider and lightweight API for the
Bouncy Castle Cryptography APIs for JDK 1.5 to JDK 1.8.
%package pkix
Summary: Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs
Group: Development/Libraries/Java
Requires: %{name} = %{version}
%description pkix
The Bouncy Castle Java APIs for CMS, PKCS, EAC, TSP, CMP, CRMF, OCSP, and
certificate generation. This jar contains APIs for JDK 1.5 to JDK 1.8. The
APIs can be used in conjunction with a JCE/JCA provider such as the one
provided with the Bouncy Castle Cryptography APIs.
%package pg
Summary: Bouncy Castle OpenPGP API
Group: Development/Libraries/Java
Requires: %{name} = %{version}
%description pg
The Bouncy Castle Java API for handling the OpenPGP protocol. This jar
contains the OpenPGP API for JDK 1.5 to JDK 1.8. The APIs can be used in
conjunction with a JCE/JCA provider such as the one provided with the
Bouncy Castle Cryptography APIs.
%package mail
Summary: Bouncy Castle S/MIME API
Group: Development/Libraries/Java
Requires: %{name} = %{version}
Requires: %{name}-pkix = %{version}
%description mail
The Bouncy Castle Java S/MIME APIs for handling S/MIME protocols. This jar
contains S/MIME APIs for JDK 1.5 to JDK 1.8. The APIs can be used in
conjunction with a JCE/JCA provider such as the one provided with the Bouncy
Castle Cryptography APIs. The JavaMail API and the Java activation framework
will also be needed.
%package tls
Summary: Bouncy Castle JSSE provider and TLS/DTLS API
Group: Development/Libraries/Java
Requires: %{name} = %{version}
%description tls
The Bouncy Castle Java APIs for TLS and DTLS, including a provider for the
JSSE.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Libraries/Java
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description javadoc
API documentation for the %{name} package.
API documentation for the Bouncy Castle Cryptography APIs.
%prep
%setup -q -n bcprov-%{archivever}
%setup -q -n bc-java-%{gittag}
%patch0 -p1
# Remove provided binaries
find . -type f -name "*.class" -exec rm -f {} \;
find . -type f -name "*.jar" -exec rm -f {} \;
mkdir src
unzip -qq src.zip -d src/
%build
pushd src
export CLASSPATH=$(build-classpath junit)
%javac -g -source 8 -target 8 -encoding UTF-8 $(find . -type f -name "*.java")
jarfile="../bcprov-%{version}.jar"
# Exclude all */test/* files except org.bouncycastle.util.test, cf. upstream
files="$(find . -type f \( -name '*.class' -o -name '*.properties' \) -not -path '*/test/*')"
files="$files $(find . -type f -path '*/org/bouncycastle/util/test/*.class')"
files="$files $(find . -type f -path '*/org/bouncycastle/jce/provider/test/*.class')"
files="$files $(find . -type f -path '*/org/bouncycastle/ocsp/test/*.class')"
test ! -d classes && mf="" \
|| mf="`find classes/ -type f -name "*.mf" 2>/dev/null`"
test -n "$mf" && jar cvfm $jarfile $mf $files \
|| %jar cvf $jarfile $files
popd
ant -f ant/jdk15+.xml \
-Dbc.javac.source=6 -Dbc.javac.target=6 \
-Djunit.jar.home=$(build-classpath junit) \
-Dmail.jar.home=$(build-classpath javax.mail) \
-Dactivation.jar.home= \
-Drelease.debug=true \
clean build-provider build
# Not shipping the "lcrypto" jar, so don't ship the javadoc for it
rm -rf build/artifacts/jdk1.5/javadoc/lcrypto
%install
install -dm 755 %{buildroot}%{_sysconfdir}/java/security/security.d
touch %{buildroot}%{_sysconfdir}/java/security/security.d/2000-%{classname}
# install bouncy castle provider
install -dm 755 %{buildroot}%{_javadir}
install -pm 644 bcprov-%{version}.jar \
%{buildroot}%{_javadir}/bcprov-%{version}.jar
pushd %{buildroot}%{_javadir}
ln -sf bcprov-%{version}.jar bcprov.jar
popd
install -dm 0755 %{buildroot}%{_javadir}
install -dm 0755 %{buildroot}%{_mavenpomdir}
for bc in bcprov bcpkix bcpg bcmail bctls ; do
install -pm 0644 build/artifacts/jdk1.5/jars/$bc-%{archivever}.jar %{buildroot}%{_javadir}/$bc.jar
install -pm 0644 %{_sourcedir}/$bc-jdk15on-%{version}.pom %{buildroot}%{_mavenpomdir}/$bc.pom
%add_maven_depmap $bc.pom $bc.jar -a "org.bouncycastle:$bc-jdk16,org.bouncycastle:$bc-jdk15" -f $bc
done
# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -pr docs/* %{buildroot}%{_javadocdir}/%{name}
# maven pom
install -dm 755 %{buildroot}%{_mavenpomdir}
install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-bcprov.pom
%add_maven_depmap -a "bouncycastle:bcprov-jdk15,org.bouncycastle:bcprov-jdk16" JPP-bcprov.pom bcprov.jar
%check
# Tests hang in obs, run them localy when bumping
#pushd src
# export CLASSPATH=$PWD:$(build-classpath junit)
# for test in $(find . -name AllTests.class) ; do
# test=${test#./} ; test=${test%.class} ; test=${test//\//.}
# # TODO: failures; get them fixed and remove || :
# %java org.junit.runner.JUnitCore $test || :
# done
#popd
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -r build/artifacts/jdk1.5/javadoc/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}
%post
{
@ -161,16 +186,25 @@ if [ $1 -eq 0 ] ; then
fi
%files
%doc *.html
%{_javadir}/bcprov.jar
%{_javadir}/bcprov-%{version}.jar
%{_javadir}/*
%files -f .mfiles-bcprov
%license build/artifacts/jdk1.5/bcprov-jdk15on-*/LICENSE.html
%doc docs/ core/docs/ *.html
%config(noreplace) %{_sysconfdir}/java/security/security.d/2000-%{classname}
%{_mavenpomdir}/JPP-bcprov.pom
%{_datadir}/maven-metadata/%{name}.xml
%files pkix -f .mfiles-bcpkix
%license build/artifacts/jdk1.5/bcpkix-jdk15on-*/LICENSE.html
%files pg -f .mfiles-bcpg
%license build/artifacts/jdk1.5/bcpg-jdk15on-*/LICENSE.html
%files mail -f .mfiles-bcmail
%license build/artifacts/jdk1.5/bcmail-jdk15on-*/LICENSE.html
%files tls -f .mfiles-bctls
%license build/artifacts/jdk1.5/bctls-jdk15on-*/LICENSE.html
%files javadoc
%{_javadocdir}/%{name}/
%{_javadocdir}/%{name}
%license LICENSE.html
%changelog

3
r1v60.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1b32787408af26d78ed1734c6ac661cdff29ee08bf937910c3081c3f4221836c
size 17257853