2012-02-24 09:48:17 +01:00
|
|
|
#
|
|
|
|
# spec file for package bouncycastle
|
|
|
|
#
|
2019-09-24 17:36:03 +02:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-02-24 09:48:17 +01: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.
|
|
|
|
|
2019-09-24 17:36:03 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-05-18 14:40:18 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-10-11 12:59:50 +02:00
|
|
|
%global ver 1.64
|
|
|
|
%global shortver 164
|
|
|
|
%global gittag r1rv64
|
|
|
|
%global archivever jdk15on-%{shortver}b07
|
2019-09-24 17:36:03 +02:00
|
|
|
%global classname org.bouncycastle.jce.provider.BouncyCastleProvider
|
2012-02-24 09:48:17 +01:00
|
|
|
Name: bouncycastle
|
|
|
|
Version: %{ver}
|
|
|
|
Release: 0
|
2019-09-24 17:36:03 +02:00
|
|
|
Summary: Bouncy Castle Cryptography APIs for Java
|
2019-09-25 06:06:30 +02:00
|
|
|
License: MIT AND Apache-2.0
|
2015-02-10 13:35:24 +01:00
|
|
|
Group: Development/Libraries/Java
|
2019-10-11 12:59:50 +02:00
|
|
|
URL: https://www.bouncycastle.org
|
2019-09-24 17:36:03 +02:00
|
|
|
Source0: https://github.com/bcgit/bc-java/archive/%{gittag}.tar.gz
|
|
|
|
# POMs from Maven Central
|
2019-10-11 12:59:50 +02:00
|
|
|
Source1: https://repo1.maven.org/maven2/org/%{name}/bcprov-jdk15on/%{version}/bcprov-jdk15on-%{version}.pom
|
|
|
|
Source2: https://repo1.maven.org/maven2/org/%{name}/bcpkix-jdk15on/%{version}/bcpkix-jdk15on-%{version}.pom
|
|
|
|
Source3: https://repo1.maven.org/maven2/org/%{name}/bcpg-jdk15on/%{version}/bcpg-jdk15on-%{version}.pom
|
|
|
|
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
|
2019-09-24 17:36:03 +02:00
|
|
|
Patch0: bouncycastle-javadoc.patch
|
|
|
|
BuildRequires: ant
|
|
|
|
BuildRequires: ant-junit
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: javamail
|
2017-05-19 13:13:45 +02:00
|
|
|
BuildRequires: javapackages-local
|
2019-09-24 17:36:03 +02:00
|
|
|
Requires(post): javapackages-tools
|
|
|
|
Requires(postun): javapackages-tools
|
2012-02-24 09:48:17 +01:00
|
|
|
Provides: bcprov = %{version}-%{release}
|
2015-02-10 13:35:24 +01:00
|
|
|
BuildArch: noarch
|
2012-02-24 09:48:17 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
The Bouncy Castle Crypto package is a Java implementation of cryptographic
|
2019-09-24 17:36:03 +02:00
|
|
|
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
|
2019-09-24 19:12:45 +02:00
|
|
|
License: MIT
|
2019-09-24 17:36:03 +02:00
|
|
|
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
|
2019-09-24 19:12:45 +02:00
|
|
|
License: MIT AND Apache-2.0
|
2019-09-24 17:36:03 +02:00
|
|
|
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
|
2019-09-24 19:12:45 +02:00
|
|
|
License: MIT
|
2019-09-24 17:36:03 +02:00
|
|
|
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
|
2019-09-24 19:12:45 +02:00
|
|
|
License: MIT
|
2019-09-24 17:36:03 +02:00
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description tls
|
|
|
|
The Bouncy Castle Java APIs for TLS and DTLS, including a provider for the
|
|
|
|
JSSE.
|
2012-02-24 09:48:17 +01:00
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
2019-09-24 19:12:45 +02:00
|
|
|
License: MIT
|
2012-02-24 09:48:17 +01:00
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description javadoc
|
2019-09-24 17:36:03 +02:00
|
|
|
API documentation for the Bouncy Castle Cryptography APIs.
|
2012-02-24 09:48:17 +01:00
|
|
|
|
|
|
|
%prep
|
2019-09-24 17:36:03 +02:00
|
|
|
%setup -q -n bc-java-%{gittag}
|
|
|
|
%patch0 -p1
|
2012-02-24 09:48:17 +01:00
|
|
|
|
|
|
|
# Remove provided binaries
|
|
|
|
find . -type f -name "*.class" -exec rm -f {} \;
|
|
|
|
find . -type f -name "*.jar" -exec rm -f {} \;
|
|
|
|
|
|
|
|
%build
|
2019-09-24 17:36:03 +02:00
|
|
|
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
|
2012-02-24 09:48:17 +01:00
|
|
|
|
|
|
|
%install
|
2013-11-14 12:47:27 +01:00
|
|
|
install -dm 755 %{buildroot}%{_sysconfdir}/java/security/security.d
|
|
|
|
touch %{buildroot}%{_sysconfdir}/java/security/security.d/2000-%{classname}
|
2012-02-24 09:48:17 +01:00
|
|
|
|
2019-09-24 17:36:03 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -r build/artifacts/jdk1.5/javadoc/* %{buildroot}%{_javadocdir}/%{name}/
|
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
2012-02-24 09:48:17 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
{
|
|
|
|
# Rebuild the list of security providers in classpath.security
|
|
|
|
suffix=security/classpath.security
|
2015-02-10 13:35:24 +01:00
|
|
|
secfiles="%{_libexecdir}/$suffix %{_libdir}/$suffix"
|
2012-02-24 09:48:17 +01:00
|
|
|
|
|
|
|
for secfile in $secfiles
|
|
|
|
do
|
|
|
|
# check if this classpath.security file exists
|
|
|
|
[ -f "$secfile" ] || continue
|
|
|
|
|
|
|
|
sed -i '/^security\.provider\./d' "$secfile"
|
|
|
|
|
|
|
|
count=0
|
2015-02-10 13:35:24 +01:00
|
|
|
for provider in $(ls %{_sysconfdir}/java/security/security.d)
|
2012-02-24 09:48:17 +01:00
|
|
|
do
|
|
|
|
count=$((count + 1))
|
|
|
|
echo "security.provider.${count}=${provider#*-}" >> "$secfile"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
} || :
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
|
|
|
|
{
|
|
|
|
# Rebuild the list of security providers in classpath.security
|
|
|
|
suffix=security/classpath.security
|
2015-02-10 13:35:24 +01:00
|
|
|
secfiles="%{_libexecdir}/$suffix %{_libdir}/$suffix"
|
2012-02-24 09:48:17 +01:00
|
|
|
|
|
|
|
for secfile in $secfiles
|
|
|
|
do
|
|
|
|
# check if this classpath.security file exists
|
|
|
|
[ -f "$secfile" ] || continue
|
|
|
|
|
|
|
|
sed -i '/^security\.provider\./d' "$secfile"
|
|
|
|
|
|
|
|
count=0
|
2015-02-10 13:35:24 +01:00
|
|
|
for provider in $(ls %{_sysconfdir}/java/security/security.d)
|
2012-02-24 09:48:17 +01:00
|
|
|
do
|
|
|
|
count=$((count + 1))
|
|
|
|
echo "security.provider.${count}=${provider#*-}" >> "$secfile"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
} || :
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2019-09-24 17:36:03 +02:00
|
|
|
%files -f .mfiles-bcprov
|
|
|
|
%license build/artifacts/jdk1.5/bcprov-jdk15on-*/LICENSE.html
|
|
|
|
%doc docs/ core/docs/ *.html
|
2013-11-14 12:47:27 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/java/security/security.d/2000-%{classname}
|
2019-09-24 17:36:03 +02:00
|
|
|
|
|
|
|
%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
|
2012-02-24 09:48:17 +01:00
|
|
|
|
|
|
|
%files javadoc
|
2019-09-24 17:36:03 +02:00
|
|
|
%{_javadocdir}/%{name}
|
|
|
|
%license LICENSE.html
|
2012-02-24 09:48:17 +01:00
|
|
|
|
|
|
|
%changelog
|