[bouncycastle-pg] Initial import (rhbz#806680).
gil
gil at fedoraproject.org
Tue May 8 12:53:06 UTC 2012
commit 4675d1432dbbc03753eb3859b2af0d79e735be0d
Author: gil <puntogil at libero.it>
Date: Tue May 8 12:55:31 2012 +0200
Initial import (rhbz#806680).
.gitignore | 1 +
bcpg-jdk16-1.46.pom | 34 ++++++
bouncycastle-pg-1.46-01-build.xml | 217 +++++++++++++++++++++++++++++++++++++
bouncycastle-pg-1.46-OSGi.bnd | 32 ++++++
bouncycastle-pg.spec | 118 ++++++++++++++++++++
sources | 1 +
6 files changed, 403 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..501ff44 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/bcpg-jdk15on-146.tar.gz
diff --git a/bcpg-jdk16-1.46.pom b/bcpg-jdk16-1.46.pom
new file mode 100644
index 0000000..e23ede4
--- /dev/null
+++ b/bcpg-jdk16-1.46.pom
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpg-jdk16</artifactId>
+ <packaging>jar</packaging>
+ <name>Bouncy Castle OpenPGP API</name>
+ <version>1.46</version>
+ <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.</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>http://www.bouncycastle.org/viewcvs/viewcvs.cgi/java</url>
+ </scm>
+ <dependencies>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk16</artifactId>
+ <version>1.46</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/bouncycastle-pg-1.46-01-build.xml b/bouncycastle-pg-1.46-01-build.xml
new file mode 100644
index 0000000..9192c8b
--- /dev/null
+++ b/bouncycastle-pg-1.46-01-build.xml
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- bcpg 1.46 by gil -->
+<!-- ====================================================================== -->
+
+<project name="build-bcpg" default="package" basedir=".">
+
+ <!-- ====================================================================== -->
+ <!-- Build environment properties -->
+ <!-- ====================================================================== -->
+
+
+ <property name="build.version" value="1.46"/>
+ <property name="jar.name" value="bcpg"/>
+ <property name="build.dir" value="build"/>
+ <property name="build.classes" value="${build.dir}/classes"/>
+ <property name="build.src" value="src/java"/>
+ <property name="build.test.classes" value="${build.dir}/test-classes"/>
+ <property name="build.test.src" value="src/test"/>
+ <property name="test.reports" value="${build.dir}/test-reports"/>
+ <property name="reporting.apis" value="${build.dir}/apidocs"/>
+
+ <property name="j2se.api" value="http://java.sun.com/j2se/1.4.2/docs/api/"/>
+
+ <!-- ====================================================================== -->
+ <!-- Defining classpaths -->
+ <!-- ====================================================================== -->
+
+ <path id="build.classpath">
+ <fileset dir="/usr/share/java">
+ <include name="bcprov.jar"/>
+ </fileset>
+ </path>
+ <path id="build.test.classpath">
+ <path refid="build.classpath"/>
+ <fileset dir="/usr/share/java">
+ <include name="junit.jar"/>
+ <include name="ant/ant-junit.jar"/>
+ </fileset>
+ </path>
+ <path id="javadoc.classpath">
+ <path refid="build.classpath"/>
+ <fileset dir="${build.dir}" includes="${jar.name}.jar"/>
+ </path>
+
+ <!-- ====================================================================== -->
+ <!-- Cleaning up target -->
+ <!-- ====================================================================== -->
+
+ <target name="clean" description="Clean the output directory">
+ <delete dir="${build.dir}"/>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- Compilation target -->
+ <!-- ====================================================================== -->
+
+ <target name="compile" description="Compile the code">
+ <mkdir dir="${build.classes}"/>
+ <javac destdir="${build.classes}"
+ nowarn="false"
+ debug="true"
+ optimize="false"
+ deprecation="true"
+ target="1.5"
+ verbose="false"
+ fork="false"
+ source="1.5">
+ <src>
+ <pathelement location="${build.src}"/>
+ </src>
+ <classpath refid="build.classpath"/>
+ </javac>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- Test-compilation target -->
+ <!-- ====================================================================== -->
+
+ <target name="compile-tests"
+ depends="compile"
+ description="Compile the test code"
+ unless="test.skip">
+ <mkdir dir="${build.test.classes}"/>
+ <javac destdir="${build.test.classes}"
+ nowarn="false"
+ debug="true"
+ optimize="false"
+ deprecation="true"
+ target="1.5"
+ verbose="false"
+ fork="false"
+ source="1.5">
+ <src>
+ <pathelement location="${build.test.src}"/>
+ </src>
+ <classpath>
+ <path refid="build.test.classpath"/>
+ <pathelement location="${build.classes}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- Run all tests -->
+ <!-- ====================================================================== -->
+
+ <target name="test"
+ depends="compile-tests, junit-missing"
+ unless="junit.skipped"
+ description="Run the test cases">
+ <mkdir dir="${test.reports}"/>
+ <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
+ <sysproperty key="basedir" value="."/>
+ <formatter type="xml"/>
+ <formatter type="plain" usefile="false"/>
+ <classpath>
+ <path refid="build.test.classpath"/>
+ <pathelement location="${build.classes}"/>
+ <pathelement location="${build.test.classes}"/>
+ </classpath>
+ <formatter type="brief" usefile="no"/>
+ <batchtest haltonfailure="yes">
+ <fileset dir="${build.test.src}">
+ <include name="**/AllTests.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="test-junit-present">
+ <available file="/usr/share/java/junit.jar" property="junit.present"/>
+ </target>
+
+ <target name="test-junit-status"
+ depends="test-junit-present">
+ <condition property="junit.missing">
+ <and>
+ <isfalse value="${junit.present}"/>
+ <isfalse value="${test.skip}"/>
+ </and>
+ </condition>
+ <condition property="junit.skipped">
+ <or>
+ <isfalse value="${junit.present}"/>
+ <istrue value="${test.skip}"/>
+ </or>
+ </condition>
+ </target>
+
+ <target name="junit-missing"
+ depends="test-junit-status"
+ if="junit.missing">
+ <echo>=================================== WARNING ===================================</echo>
+ <echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo>
+ <echo>===============================================================================</echo>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- Javadoc target -->
+ <!-- ====================================================================== -->
+
+ <target name="javadoc" description="Generates the Javadoc of the application">
+ <javadoc sourcepath="${build.src}"
+ packagenames="*"
+ destdir="${reporting.apis}"
+ access="protected"
+ old="false"
+ verbose="false"
+ version="true"
+ use="true"
+ author="true"
+ splitindex="false"
+ nodeprecated="false"
+ nodeprecatedlist="false"
+ notree="false"
+ noindex="false"
+ nohelp="false"
+ nonavbar="false"
+ serialwarn="false"
+ charset="ISO-8859-1"
+ source="1.4"
+ linksource="false"
+ breakiterator="false">
+ <classpath refid="javadoc.classpath"/>
+ <doctitle><![CDATA[<h1>Bouncy Castle Cryptography Library ${build.version} API</h1>]]></doctitle>
+ <link href="${j2se.api}"/>
+ </javadoc>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- Package target -->
+ <!-- ====================================================================== -->
+
+ <taskdef resource="aQute/bnd/ant/taskdef.properties" >
+ <classpath>
+ <fileset dir="/usr/share/java" includes="aqute-bnd.jar" />
+ </classpath>
+ </taskdef>
+
+ <target name="package" depends="compile,test" description="Package the application">
+ <bnd
+ classpath="${build.classes}"
+ failok="false"
+ exceptions="false"
+ files="bcpg.bnd"
+ output="${build.dir}/${jar.name}.jar"/>
+ </target>
+
+ <!-- ====================================================================== -->
+ <!-- A dummy target for the package named after the type it creates -->
+ <!-- ====================================================================== -->
+
+ <target name="jar" depends="package" description="Builds the jar for the application"/>
+
+</project>
diff --git a/bouncycastle-pg-1.46-OSGi.bnd b/bouncycastle-pg-1.46-OSGi.bnd
new file mode 100644
index 0000000..a0782d1
--- /dev/null
+++ b/bouncycastle-pg-1.46-OSGi.bnd
@@ -0,0 +1,32 @@
+# BND/OSGI Properties by gil
+Import-Package: \
+ javax.crypto;resolution:=optional, \
+ javax.crypto.spec;resolution:=optional, \
+ org.bouncycastle.asn1;resolution:=optional, \
+ org.bouncycastle.jce.interfaces;resolution:=optional, \
+ org.bouncycastle.jce.provider;resolution:=optional, \
+ org.bouncycastle.jce.spec;resolution:=optional, \
+ org.bouncycastle.util;resolution:=optional, \
+ org.bouncycastle.util.encoders;resolution:=optional, \
+ org.bouncycastle.util.io;resolution:=optional
+Export-Package: \
+ org.bouncycastle.apache.bzip2, \
+ org.bouncycastle.bcpg, \
+ org.bouncycastle.bcpg.attr, \
+ org.bouncycastle.bcpg.sig, \
+ org.bouncycastle.openpgp, \
+ org.bouncycastle.openpgp.examples
+Bundle-ManifestVersion: 2
+Bundle-Name: bcpg
+Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6, JavaSE-1.7
+Bundle-SymbolicName: bcpg
+Bundle-Version: 1.46
+Built-By: ${user.name}
+Extension-Name: org.bouncycastle.bcpg
+Implementation-Vendor: BouncyCastle.org
+Implementation-Vendor-Id: org.bouncycastle
+Implementation-Version: 1.46.0
+Originally-Created-By: ${java.version} (${java.vendor})
+Specification-Vendor: BouncyCastle.org
+Specification-Version: 1.1
+Trusted-Library: true
\ No newline at end of file
diff --git a/bouncycastle-pg.spec b/bouncycastle-pg.spec
new file mode 100644
index 0000000..b01eb27
--- /dev/null
+++ b/bouncycastle-pg.spec
@@ -0,0 +1,118 @@
+%global ver 146
+%global archivever jdk15on-%(echo %{ver}|sed 's|\\\.||')
+Name: bouncycastle-pg
+Version: 1.46
+Release: 6%{?dist}
+Summary: Bouncy Castle OpenPGP API
+Group: Development/Libraries
+License: MIT
+URL: http://www.bouncycastle.org/
+Source0: http://www.bouncycastle.org/download/bcpg-%{archivever}.tar.gz
+Source1: http://repo2.maven.org/maven2/org/bouncycastle/bcpg-jdk16/%{version}/bcpg-jdk16-%{version}.pom
+Source2: bouncycastle-pg-%{version}-01-build.xml
+Source3: bouncycastle-pg-%{version}-OSGi.bnd
+
+BuildRequires: java-devel
+BuildRequires: jpackage-utils
+
+BuildRequires: ant
+BuildRequires: ant-junit
+BuildRequires: aqute-bnd
+BuildRequires: junit
+
+BuildRequires: bouncycastle = %{version}
+
+Requires: bouncycastle = %{version}
+
+Requires: java
+Requires: jpackage-utils
+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
+Group: Documentation
+Summary: Javadoc for %{name}
+Requires: jpackage-utils
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n bcpg-%{archivever}
+# fixing incomplete source directory structure
+mkdir -p src/java src/test
+unzip -qq src.zip -d src/java
+
+mkdir -p src/test/org/bouncycastle/openpgp/test
+mv src/java/org/bouncycastle/openpgp/test/* \
+ src/test/org/bouncycastle/openpgp/test
+mkdir -p src/test/org/bouncycastle/openpgp/examples/test
+mv src/java/org/bouncycastle/openpgp/examples/test/* \
+ src/test/org/bouncycastle/openpgp/examples/test
+
+# Remove provided binaries and apidocs
+find . -type f -name "*.class" -exec rm -f {} \;
+find . -type f -name "*.jar" -exec rm -f {} \;
+rm -rf docs/*
+
+cp -p %{SOURCE2} build.xml
+cp -p %{SOURCE3} bcpg.bnd
+
+# this test fails: bc.test.data.home property not set
+rm src/test/org/bouncycastle/openpgp/test/DSA2Test.java
+sed -i "s|suite.addTestSuite(DSA2Test.class);|//suite.addTestSuite(DSA2Test.class);|" \
+ src/test/org/bouncycastle/openpgp/test/AllTests.java
+
+%build
+
+%ant jar javadoc
+
+%install
+
+mkdir -p %{buildroot}%{_javadir}
+install -pm 644 build/bcpg.jar %{buildroot}%{_javadir}/bcpg.jar
+
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr build/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-bcpg.pom
+%add_maven_depmap JPP-bcpg.pom bcpg.jar
+
+%files
+%{_javadir}/bcpg.jar
+%{_mavenpomdir}/JPP-bcpg.pom
+%{_mavendepmapfragdir}/%{name}
+%doc *.html
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc LICENSE.html
+
+%changelog
+* Tue May 08 2012 gil cattaneo <puntogil at 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 at libero.it> 1.46-5
+- fix BRs for fedora > f16
+- add BR ant-junit
+
+* Wed May 02 2012 gil cattaneo <puntogil at 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 at libero.it> 1.46-3
+- removed BR unzip
+
+* Tue Apr 10 2012 gil cattaneo <puntogil at libero.it> 1.46-2
+- add BR zip
+
+* Sun Mar 25 2012 gil cattaneo <puntogil at libero.it> 1.46-1
+- initial rpm
\ No newline at end of file
diff --git a/sources b/sources
index e69de29..c27f1a8 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f7189c81b3a0492acc5d21e5d342dba9 bcpg-jdk15on-146.tar.gz
More information about the scm-commits
mailing list