%global ver 1.50 %global archivever jdk15on-%(echo %{ver}|sed 's|\\\.||') Summary: S/MIME and CMS libraries for Bouncy Castle Name: bouncycastle-mail Version: %{ver} Release: %mkrel 4 License: MIT Group: Development/Java URL: http://www.bouncycastle.org/ Source0: http://www.bouncycastle.org/download/bcmail-%{archivever}.tar.gz Source1: http://repo2.maven.org/maven2/org/bouncycastle/bcmail-jdk15on/%{version}/bcmail-jdk15on-%{version}.pom BuildArch: noarch BuildRequires: bouncycastle = %{version} BuildRequires: bouncycastle-pkix = %{version} BuildRequires: java-devel >= 1.7 BuildRequires: javamail BuildRequires: javapackages-tools BuildRequires: junit Requires: bouncycastle = %{version} Requires: bouncycastle-pkix = %{version} Requires: java-headless >= 1.7 Requires: javamail Requires: javapackages-tools Provides: bcmail = %{version}-%{release} %description Bouncy Castle consists of a lightweight cryptography API and is a provider for the Java Cryptography Extension and the Java Cryptography Architecture. This library package offers additional classes, in particuar generators/processors for S/MIME and CMS, for Bouncy Castle. %package javadoc Summary: Javadoc for %{name} Requires: %{name} = %{version}-%{release} %description javadoc API documentation for the %{name} package. %prep %setup -q -n bcmail-%{archivever} mkdir src unzip -qq src.zip -d src/ find . -type f -name "*.class" -delete find . -type f -name "*.jar" -delete # too many "IOException: Stream closed" failures rm -f src/org/bouncycastle/mail/smime/test/AllTests.java # package org.bouncycastle.cms.test does not exist rm -f src/org/bouncycastle/mail/smime/test/NewSMIMEEnvelopedTest.java rm -f src/org/bouncycastle/mail/smime/test/NewSMIMESignedTest.java rm -f src/org/bouncycastle/mail/smime/test/SMIMECompressedTest.java rm -f src/org/bouncycastle/mail/smime/test/SMIMEMiscTest.java rm -f src/org/bouncycastle/mail/smime/test/SignedMailValidatorTest.java cp %{SOURCE1} pom.xml %build pushd src export CLASSPATH=$(build-classpath junit bcprov bcpkix javamail) %javac -g -source 1.6 -target 1.6 -encoding UTF-8 $(find . -type f -name "*.java") jarfile="../bcmail.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 popd %install # install bouncy castle mail install -dm 755 $RPM_BUILD_ROOT%{_javadir} install -pm 644 bcmail.jar \ $RPM_BUILD_ROOT%{_javadir}/bcmail.jar # javadoc mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -pr docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} # maven pom install -dm 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-bcmail.pom %add_maven_depmap -a "org.bouncycastle:bcmail-jdk16" JPP-bcmail.pom bcmail.jar %check pushd src export CLASSPATH=$PWD:$(build-classpath junit javamail bcprov bcpkix) for test in $(find . -name AllTests.class) ; do test=${test#./} ; test=${test%.class} ; test=${test//\//.} %java org.junit.runner.JUnitCore $test done popd %files -f .mfiles %doc *.html %{_javadir}/bcmail.jar %{_mavenpomdir}/JPP-bcmail.pom %files javadoc %{_javadocdir}/%{name} %changelog * Wed Oct 15 2014 umeabot <umeabot> 1.50-4.mga5 + Revision: 745188 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 1.50-3.mga5 + Revision: 678210 - Mageia 5 Mass Rebuild * Thu Aug 14 2014 pterjan <pterjan> 1.50-2.mga5 + Revision: 662397 - Restore dependencies now that bouncycastle-pkix was built + tv <tv> - relax even more BR & req in order to fix LO build - relax BR & req in order to fix LO build + dmorgan <dmorgan> - New version 1.50 * Wed Dec 18 2013 dmorgan <dmorgan> 1.46-9.mga4 + Revision: 558478 - Fix build + umeabot <umeabot> - Mageia 4 Mass Rebuild * Fri Jan 11 2013 umeabot <umeabot> 1.46-7.mga3 + Revision: 347150 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Jan 04 2013 dmorgan <dmorgan> 1.46-6.mga3 + Revision: 338615 - Use official tarball * Thu Jan 26 2012 gil <gil> 1.46-1.mga2 + Revision: 201899 - fix javac target - update to 1.46 * Sat Sep 17 2011 gil <gil> 1.45-4.mga2 + Revision: 144447 - rebuilt with new m2 macro * Wed Jan 26 2011 dmorgan <dmorgan> 1.45-3.mga1 + Revision: 39904 - Adapt for Mageia - imported package bouncycastle-mail * Thu Feb 11 2010 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.45-1 - Import Bouncy Castle 1.45. * Sat Nov 14 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.44-1 - Import Bouncy Castle 1.44. * 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@redhat.com> 1.43-4 - Add maven POM * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@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. * Mon Apr 20 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.43-1 - Import Bouncy Castle 1.43. * Sat Apr 18 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.42-4 - Rebuild * Sat Apr 18 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.42-3 - Don't build AOT bits. The package needs java1.6 * Thu Apr 09 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.42-2 - Add missing Requires: javamail - Remove redundant BR: junit4 * Tue Mar 17 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.42-1 - Import Bouncy Castle 1.42. - Add javadoc subpackage. * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.41-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Mon Oct 6 2008 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.41-3 - Added "Provides: bcmail == %%{version}-%%{release}" - Added "Requires: bouncycastle == %%{version}" * Sun Oct 5 2008 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.41-2 - Some minor fixes/improvements in the spec file - Improved Summary/Description - License is MIT * Thu Oct 2 2008 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.41-1 - Initial Release - Spec file stolen from bouncycastle-1.41-1 and modified for bcmail