File project.diff of Package bouncycastle-mail-1.47

--- bouncycastle-mail.spec.orig
+++ bouncycastle-mail.spec
@@ -1,20 +1,19 @@
-%define archive	bcmail-jdk16-146
-%define _mavenpomdir %{_datadir}/maven2/poms
+#
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
+
+%define	archive		bcmail-jdk15on-147
+%define	_mavenpomdir	%{_datadir}/maven2/poms
 
 Name:           bouncycastle-mail
-Version:        1.46
+Version:        1.47
 Release:        %mkrel
 License:        MIT
 Summary:        S/MIME and CMS libraries for Bouncy Castle
 Url:            http://www.bouncycastle.org/
 Group:          System Environment/Libraries
-# Original source http://www.bouncycastle.org/download/bcmail-%{archivever}.tar.gz
-# is modified to
-# bcmail-%{archivever}-FEDORA.tar.gz with references to patented algorithms removed.
-# Speciifically: IDEA algorithms got removed.
-# Source0:          bcmail-%{archivever}-FEDORA.tar.gz
-Source0:        %{archive}.tar.gz
-Source1:        http://repo2.maven.org/maven2/org/bouncycastle/bcmail-jdk16/%{version}/bcmail-jdk16-%{version}.pom
+Source0:        http://www.bouncycastle.org/download/%{archive}.tar.gz
+Source1:        http://www.bouncycastle.org/download/bctest-jdk15on-147.jar
 BuildRequires:  bouncycastle >= %{version}
 BuildRequires:  java-devel >= 1.6
 BuildRequires:  javamail
@@ -29,9 +28,7 @@ BuildRoot:      %{_tmppath}/%{name}-%{ve
 BuildArch:      noarch
 Requires(post):   jpackage-utils >= 1.7
 Requires(postun): jpackage-utils >= 1.7
-
 Provides:       bcmail = %{version}
-Provides:       %{archive}
 
 %description
 Bouncy Castle consists of a lightweight cryptography API and is a provider
@@ -50,71 +47,45 @@ BuildArch:      noarch
 API documentation for the %{name} package.
 
 %prep
-%setup -q -n %{archive}
-mkdir src
-unzip -qq src.zip -d src/
+%setup -q -n %{archive} 
+mkdir src 
+unzip -qq %{S:1} -d src/
+unzip -o -qq src.zip -d src/
 # Remove provided binaries
 find . -type f -name "*.class" -exec rm -f {} \;
 find . -type f -name "*.jar" -exec rm -f {} \;
 
-# Those are complaining with 'cannot find symbol' about classes out of BC since v1.40.
-find . -type f -name "*OCSPTest.java" -exec rm -f {} \;
-find . -type f -name "*CertTest.java" -exec rm -f {} \;
-find . -type f -name "*AllTests.java" -exec rm -f {} \;
-# They were just test classes anyway.
-
 %build
 pushd src
   export CLASSPATH=$(build-classpath junit4 bcprov javamail)
-  %javac -g -source 1.6 -target 1.6 -encoding UTF-8 $(find . -type f -name "*.java")
+  %javac -g $(find . -type f -name "*.java")
   jarfile="../bcmail-%{version}.jar"
-  # 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
+  files="$(find . -type f \( -name '*.class' -o -name '*.properties' \))"
+  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
 
 %install
-
 # install bouncy castle mail
 install -dm 755 %{buildroot}%{_javadir}
-install -pm 644 bcmail-%{version}.jar \
-  %{buildroot}%{_javadir}/bcmail-%{version}.jar
-pushd %{buildroot}%{_javadir}
-  ln -sf bcmail-%{version}.jar bcmail.jar
-popd
+install -pm 644 bcmail-%{version}.jar %{buildroot}%{_javadir}/bcmail-%{version}.jar
+ln -sf %{_javadir}/bcmail-%{version}.jar %{buildroot}%{_javadir}/bcmail.jar
 install -dm 755 %{buildroot}%{_javadir}/gcj-endorsed
-pushd %{buildroot}%{_javadir}/gcj-endorsed
-  ln -sf ../bcmail-%{version}.jar bcmail-%{version}.jar
-popd
+ln -sf %{_javadir}/bcmail-%{version}.jar %{buildroot}%{_javadir}/gcj-endorsed/bcmail-%{version}.jar
 
 # 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-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 || :
+    test=${test#./} ; test=${test%.class} ; test=${test//\//.} ;
+    %java -Dbc.test.data.home=../test org.junit.runner.JUnitCore $test
   done
 popd
 
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
 %clean
 rm -rf %{buildroot}
 
@@ -123,12 +94,8 @@ rm -rf %{buildroot}
 #%doc %{_javadocdir}/%{name}
 %{_javadir}/bcmail.jar
 %{_javadir}/bcmail-%{version}.jar
+%dir %{_javadir}/gcj-endorsed
 %{_javadir}/gcj-endorsed/bcmail-%{version}.jar
-%dir %{_datadir}/maven2
-%dir %{_mavenpomdir}
-%{_mavenpomdir}/JPP-bcmail.pom
-%dir %{_mavendepmapfragdir}
-%{_mavendepmapfragdir}/%{name}
 
 %files javadoc
 %defattr(-,root,root,-)
openSUSE Build Service is sponsored by