rpms/bouncycastle-mail/devel bouncycastle-mail.spec,1.10,1.11

Orcan Ogetbil oget at fedoraproject.org
Thu Sep 17 06:58:01 UTC 2009


Author: oget

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

Modified Files:
	bouncycastle-mail.spec 
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



Index: bouncycastle-mail.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bouncycastle-mail/devel/bouncycastle-mail.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- bouncycastle-mail.spec	26 Aug 2009 22:09:10 -0000	1.10
+++ bouncycastle-mail.spec	17 Sep 2009 06:58:01 -0000	1.11
@@ -4,7 +4,7 @@
 Summary:          S/MIME and CMS libraries for Bouncy Castle
 Name:             bouncycastle-mail
 Version:          1.43
-Release:          4%{?dist}
+Release:          5%{?dist}
 Group:            System Environment/Libraries
 License:          MIT
 URL:              http://www.bouncycastle.org/
@@ -32,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 
@@ -61,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
@@ -97,6 +99,16 @@ install -dm 755 $RPM_BUILD_ROOT%{_mavenp
 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}
@@ -133,6 +145,15 @@ 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
 




More information about the fedora-extras-commits mailing list