%global ver 1.54 %global archivever jdk15on-%(echo %{ver}|sed 's|\\\.||') Name: bouncycastle-pg Version: %{ver} Release: %mkrel 1 Group: Development/Java Summary: Bouncy Castle OpenPGP API # modified BZIP2 library org/bouncycastle/apache/bzip2 ASL 2.0 License: ASL 2.0 and MIT URL: http://www.bouncycastle.org/ # Source tarball contains everything except test suite rousources Source0: http://www.bouncycastle.org/download/bcpg-%{archivever}.tar.gz # Test suite resources are found in this jar Source1: http://www.bouncycastle.org/download/bctest-%{archivever}.jar Source2: http://repo2.maven.org/maven2/org/bouncycastle/bcpg-jdk15on/%{version}/bcpg-jdk15on-%{version}.pom Source3: bouncycastle-pg-build.xml Source4: bouncycastle-pg-OSGi.bnd BuildRequires: ant BuildRequires: ant-junit BuildRequires: aqute-bnd BuildRequires: javapackages-local BuildRequires: junit BuildRequires: mvn(org.bouncycastle:bcprov-jdk15on) = %{version} Requires: mvn(org.bouncycastle:bcprov-jdk15on) = %{version} BuildArch: noarch %description The Bouncy Castle Java API for handling the OpenPGP protocol. This jar contains the OpenPGP API for JDK 1.6. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n bcpg-%{archivever} # Unzip source and test suite resources mkdir -p src/java src/test unzip -qq src.zip -d src/java unzip -qq %{SOURCE1} 'org/bouncycastle/openpgp/*' -x '*.class' -d src/java mkdir -p src/test/org/bouncycastle/openpgp/examples mv src/java/org/bouncycastle/openpgp/test \ src/test/org/bouncycastle/openpgp/ mv src/java/org/bouncycastle/openpgp/examples/test \ src/test/org/bouncycastle/openpgp/examples/ # Remove provided binaries and apidocs find . -type f -name "*.class" -exec rm -f {} \; find . -type f -name "*.jar" -exec rm -f {} \; rm -rf docs/* javadocs/* cp -p %{SOURCE3} build.xml cp -p %{SOURCE4} bcpg.bnd sed -i "s|@VERSION@|%{version}|" build.xml bcpg.bnd # this test fails: source encoding error rm src/test/org/bouncycastle/openpgp/test/PGPUnicodeTest.java sed -i "s|suite.addTestSuite(PGPUnicodeTest.class);|//&|" \ src/test/org/bouncycastle/openpgp/test/AllTests.java %build mkdir lib build-jar-repository -s -p lib bcprov junit ant/ant-junit aqute-bnd ant -Dbc.test.data.home=$(pwd)/src/test jar javadoc %install %mvn_file org.bouncycastle:bcpg-jdk15on bcpg %mvn_alias org.bouncycastle:bcpg-jdk15on org.bouncycastle:bcpg-jdk16 org.bouncycastle:bcpg-jdk15 %mvn_artifact %{SOURCE2} build/bcpg.jar %mvn_install -J build/apidocs %files -f .mfiles %doc CONTRIBUTORS.html index.html %license LICENSE.html %files javadoc -f .mfiles-javadoc %license LICENSE.html %changelog * Sun May 21 2017 neoclust <neoclust> 1.54-1.mga6 + Revision: 1103795 - New version 1.54 * Wed Mar 02 2016 neoclust <neoclust> 1.52-10.mga6 + Revision: 982516 - Second rebuild of the java stack * Sun Feb 21 2016 neoclust <neoclust> 1.52-9.mga6 + Revision: 975689 - First rebuild of the java stack - sync package bouncycastle-pg with fedora + umeabot <umeabot> - Mageia 6 Mass Rebuild * Mon Sep 07 2015 ycantin <ycantin> 1.52-1.mga6 + Revision: 873926 - new version 1.52 synced with fedora * Thu Dec 25 2014 dmorgan <dmorgan> 1.50-3.mga5 + Revision: 806016 - imported package bouncycastle-pg * Thu May 10 2012 gil cattaneo <puntogil@libero.it> 1.46-7 - change SOURCE0 see rhbz#806262 * Tue May 08 2012 gil cattaneo <puntogil@libero.it> 1.46-6 - used %%global instead %%define - removed the checks for fedora version - removed requirement from javadoc subpackage * Wed May 02 2012 gil cattaneo <puntogil@libero.it> 1.46-5 - fix BRs for fedora > f16 - add BR ant-junit * Wed May 02 2012 gil cattaneo <puntogil@libero.it> 1.46-4 - rebuilt with ant and aqute-bndlib 0.0.363 support - removed BR zip * Sun Apr 15 2012 gil cattaneo <puntogil@libero.it> 1.46-3 - removed BR unzip * Tue Apr 10 2012 gil cattaneo <puntogil@libero.it> 1.46-2 - add BR zip * Sun Mar 25 2012 gil cattaneo <puntogil@libero.it> 1.46-1 - initial rpm