rpms/bouncycastle-mail/F-11 bcmail-jdk16-1.43.pom, NONE, 1.1 bouncycastle-mail.spec, 1.8, 1.9

Orcan Ogetbil oget at fedoraproject.org
Thu Sep 17 07:19:58 UTC 2009


Author: oget

Update of /cvs/pkgs/rpms/bouncycastle-mail/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27953

Modified Files:
	bouncycastle-mail.spec 
Added Files:
	bcmail-jdk16-1.43.pom 
Log Message:
* Thu Sep 17 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.43-5
- Similar fixes proposed in RHBZ#521475, namely:
- Include missing properties files in jar.
- Build with javac -encoding UTF-8.
- Use %%javac and %%jar macros.
- Run test suite during build (ignoring failures for now).
- Follow upstream in excluding various test suite classes from jar.
- Add BR: junit4

* Wed Aug 26 2009 Andrew Overholt <overholt at redhat.com> 1.43-4
- Add maven POM



--- NEW FILE bcmail-jdk16-1.43.pom ---
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.bouncycastle</groupId>
  <artifactId>bcmail-jdk16</artifactId>
  <packaging>jar</packaging>
  <name>Bouncy Castle CMS and S/MIME API</name>
  <version>1.43</version>
  <description>The Bouncy Castle Java CMS and S/MIME APIs for handling the CMS and S/MIME protocols. This jar contains CMS and S/MIME APIs 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. If the S/MIME API is used, 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>http://www.bouncycastle.org/viewcvs/viewcvs.cgi/java</url>
  </scm>
  <dependencies>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk16</artifactId>
      <version>1.43</version>
      <type>jar</type>
    </dependency>
  </dependencies>
</project>

Index: bouncycastle-mail.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bouncycastle-mail/F-11/bouncycastle-mail.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- bouncycastle-mail.spec	14 Jul 2009 22:37:19 -0000	1.8
+++ bouncycastle-mail.spec	17 Sep 2009 07:19:56 -0000	1.9
@@ -4,7 +4,7 @@
 Summary:          S/MIME and CMS libraries for Bouncy Castle
 Name:             bouncycastle-mail
 Version:          1.43
-Release:          2%{?dist}
+Release:          5%{?dist}
 Group:            System Environment/Libraries
 License:          MIT
 URL:              http://www.bouncycastle.org/
@@ -12,10 +12,13 @@ URL:              http://www.bouncycastl
 # is modified to
 # bcmail-%{archivever}-FEDORA.tar.gz with references to patented algorithms removed.
 Source0:          bcmail-%{archivever}-FEDORA.tar.gz
+Source1:          http://repo2.maven.org/maven2/org/bouncycastle/bcmail-jdk16/1.43/bcmail-jdk16-1.43.pom
 BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires:         bouncycastle == %{version}
 BuildRequires:    jpackage-utils >= 1.5
 Requires:         jpackage-utils >= 1.5
+Requires(post):   jpackage-utils >= 1.7
+Requires(postun): jpackage-utils >= 1.7
 %if %{with_gcj}
 Requires:         java-1.5.0-gcj
 Requires(post):   java-gcj-compat
@@ -29,8 +32,9 @@ BuildRequires:    java-devel >= 1.7
 Requires:         java >= 1.7
 BuildRequires:    javamail
 Requires:         javamail
+BuildRequires:    junit4
 
-Provides:         bcmail == %{version}-%{release}
+Provides:         bcmail = %{version}-%{release}
 
 %description
 Bouncy Castle consists of a lightweight cryptography API and is a provider 
@@ -58,13 +62,14 @@ find . -type f -name "*.jar" -exec rm -f
 %build
 pushd src
   export CLASSPATH=$(build-classpath junit4 bcprov javamail)
-  javac -target 1.5 `find . -type f -name "*.java"`
+  %javac -g -target 1.5 -encoding UTF-8 $(find . -type f -name "*.java")
   jarfile="../bcmail-%{version}.jar"
-  files="`find . -type f -name "*.class"`"
+  # Exclude all */test/* , cf. upstream
+  files="$(find . -type f \( -name '*.class' -o -name '*.properties' \) -not -path '*/test/*')"
   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
+  test -n "$mf" && %jar cvfm $jarfile $mf $files \
+    || %jar cvf $jarfile $files
 popd
 
 %install
@@ -89,15 +94,32 @@ popd
 mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
 cp -pr docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
 
-%if %{with_gcj}
+# maven pom
+install -dm 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-bcmail.pom
+%add_to_maven_depmap org.bouncycastle bcmail-jdk16 %{version} JPP bcmail
+
+%check
+pushd src
+  export CLASSPATH=$PWD:$(build-classpath junit4 javamail bcprov)
+  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
+
 %post
+%update_maven_depmap
+%if %{with_gcj}
   if [ -x %{_bindir}/rebuild-gcj-db ]; then
     %{_bindir}/rebuild-gcj-db
   fi
 %endif
 
-%if %{with_gcj}
 %postun
+%update_maven_depmap
+%if %{with_gcj}
   if [ -x %{_bindir}/rebuild-gcj-db ]; then
     %{_bindir}/rebuild-gcj-db
   fi
@@ -112,6 +134,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_javadir}/bcmail.jar
 %{_javadir}/bcmail-%{version}.jar
 %{_javadir}/gcj-endorsed/bcmail-%{version}.jar
+%{_mavenpomdir}/JPP-bcmail.pom
+%{_mavendepmapfragdir}/%{name}
 %if %{with_gcj}
   %{_libdir}/gcj/%{name}/
 %endif
@@ -121,6 +145,21 @@ rm -rf $RPM_BUILD_ROOT
 %{_javadocdir}/%{name}
 
 %changelog
+* Thu Sep 17 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.43-5
+- Similar fixes proposed in RHBZ#521475, namely:
+- Include missing properties files in jar.
+- Build with javac -encoding UTF-8.
+- Use %%javac and %%jar macros.
+- Run test suite during build (ignoring failures for now).
+- Follow upstream in excluding various test suite classes from jar.
+- Add BR: junit4
+
+* Wed Aug 26 2009 Andrew Overholt <overholt at redhat.com> 1.43-4
+- Add maven POM
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.43-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
 * Tue Jul 13 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.43-2
 - Re-enable AOT bits thanks to Andrew Haley.
 




More information about the fedora-extras-commits mailing list