rpms/bouncycastle/devel bouncycastle.spec,1.19,1.20

Ville Skyttä scop at fedoraproject.org
Sun Sep 6 19:48:44 UTC 2009


Author: scop

Update of /cvs/pkgs/rpms/bouncycastle/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19779

Modified Files:
	bouncycastle.spec 
Log Message:
* Sun Sep  6 2009 Ville Skyttä <ville.skytta at iki.fi> - 1.43-6
- Include improvements from #521475:
- 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; drop
  dependency on junit4.



Index: bouncycastle.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bouncycastle/devel/bouncycastle.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- bouncycastle.spec	26 Aug 2009 21:48:21 -0000	1.19
+++ bouncycastle.spec	6 Sep 2009 19:48:44 -0000	1.20
@@ -5,7 +5,7 @@
 Summary:          Bouncy Castle Crypto Package for Java
 Name:             bouncycastle
 Version:          1.43
-Release:          5%{?dist}
+Release:          6%{?dist}
 Group:            System Environment/Libraries
 License:          MIT
 URL:              http://www.%{name}.org/
@@ -30,9 +30,8 @@ BuildArch:        noarch
 BuildRequires:    java-devel >= 1.7
 Requires:         java >= 1.7
 BuildRequires:    junit4
-Requires:         junit4
 
-Provides:         bcprov == %{version}-%{release}
+Provides:         bcprov = %{version}-%{release}
 
 %description
 The Bouncy Castle Crypto package is a Java implementation of cryptographic
@@ -62,13 +61,15 @@ unzip -qq src.zip -d src/
 %build
 pushd src
   export CLASSPATH=$(build-classpath junit4)
-  javac -g -target 1.5 `find . -type f -name "*.java"`
+  %javac -g -target 1.5 -encoding UTF-8 $(find . -type f -name "*.java")
   jarfile="../bcprov-%{version}.jar"
-  files="`find . -type f -name "*.class"`"
+  # Exclude all */test/* files except org.bouncycastle.util.test, cf. upstream
+  files="$(find . -type f \( -name '*.class' -o -name '*.properties' \) -not -path '*/test/*')"
+  files="$files $(find . -type f -path '*/org/bouncycastle/util/test/*.class')"
   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
+    || %jar cvf $jarfile $files
 popd
 
 %install
@@ -101,6 +102,17 @@ install -dm 755 $RPM_BUILD_ROOT%{_mavenp
 install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-bcprov.pom
 %add_to_maven_depmap org.bouncycastle bcprov-jdk16 %{version} JPP bcprov
 
+%check
+pushd src
+  export CLASSPATH=$PWD:$(build-classpath junit4)
+  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
 {
   # Rebuild the list of security providers in classpath.security
@@ -184,6 +196,15 @@ rm -rf $RPM_BUILD_ROOT
 %{_javadocdir}/%{name}/
 
 %changelog
+* Sun Sep  6 2009 Ville Skyttä <ville.skytta at iki.fi> - 1.43-6
+- Include improvements from #521475:
+- 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; drop
+  dependency on junit4.
+
 * Wed Aug 26 2009 Andrew Overholt <overholt at redhat.com> 1.43-5
 - Add maven POM
 




More information about the fedora-extras-commits mailing list