Name: subethasmtp
Version: 3.1.7
Release: 1%{?dist}
Summary: A SMTP mail server for Java
# BSD: src/main/java/org/subethamail/smtp/util/Base64.java
License: ASL 2.0 and BSD
URL: http://code.google.com/p/subethasmtp/
# svn export http://subethasmtp.googlecode.com/svn/tags/3.1.7/ subethasmtp-3.1.7
# find subethasmtp-3.1.7 -name "*.jar" -delete
# tar czf subethasmtp-3.1.7-src-svn.tar.gz subethasmtp-3.1.7
Source0: %{name}-%{version}-src-svn.tar.gz
BuildRequires: java-devel
BuildRequires: mvn(com.google.code.findbugs:jsr305)
BuildRequires: mvn(javax.mail:mail)
BuildRequires: mvn(org.slf4j:slf4j-api)
# test deps
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.slf4j:slf4j-simple)
%if 0
BuildRequires: mvn(mockit:jmockit) >= 0.999.11
%endif
BuildRequires: maven-local
BuildRequires: maven-surefire-provider-junit4
Requires: mvn(com.google.code.findbugs:jsr305)
Requires: mvn(javax.mail:mail)
Requires: mvn(org.slf4j:slf4j-api)
Requires: java
BuildArch: noarch
%description
SubEtha SMTP is an easy-to-use server-side SMTP library for Java.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q
sed -i "s|3.1.7-SNAPSHOT|%{version}|" pom.xml
%pom_remove_plugin :maven-gpg-plugin
%pom_xpath_inject "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration" "
org/subethamail/smtp/test/**
"
%pom_xpath_inject "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-javadoc-plugin']" "
false
true
true
false
http://download.oracle.com/javase/6/docs/api/
%{_javadocdir}/java
org.subethamail.smtp.test.*:**Test**
"
# use system jvm apis
%pom_remove_dep javax.activation:activation
# unavailable test dep
%pom_remove_dep mockit:jmockit
rm -r src/test/java/org/subethamail/smtp/MessageHandlerTest.java
# this test fails
# junit.framework.ComparisonFailure: expected:????[
# ]> but was:????[?]>
rm -r src/test/java/org/subethamail/smtp/TimeoutTest.java \
src/test/java/org/subethamail/smtp/WiserFailuresTest.java
%build
mvn-rpmbuild package javadoc:aggregate
%install
mkdir -p %{buildroot}%{_javadir}
install -pm 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
mkdir -p %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%doc LICENSE.txt README.html
%files javadoc
%{_javadocdir}/%{name}
%doc LICENSE.txt
%changelog
* Tue Jun 04 2013 gil cattaneo 3.1.7-1
- update to 3.1.7
* Wed Jun 06 2012 gil cattaneo 3.1.6-1
- initial rpm