Blob Blame History Raw
Name:           apache-mime4j
Version:        0.6.1
Release:        1%{?dist}
Summary:        Apache JAMES Mime4j

Group:          Development/Libraries
License:        ASL 2.0
URL:            http://james.apache.org/mime4j
Source0:        http://apache.skknet.net//james/mime4j/apache-mime4j-0.6.1-src.tar.gz
BuildArch: noarch

BuildRequires: apache-commons-logging
BuildRequires: log4j
BuildRequires: junit
BuildRequires: apache-commons-io
BuildRequires: apache-james-project
BuildRequires: javacc-maven-plugin
Requires: apache-commons-logging
Requires: log4j
Requires: apache-commons-io
Requires(post): jpackage-utils
Requires(postun): jpackage-utils

%description
Java stream based MIME message parser

%package javadoc
Group:          Documentation
Summary:        Javadoc for %{name}
Requires:       jpackage-utils

%description javadoc
API documentation for %{name}.


%prep
%setup -q 
rm -fr stage

%build
mvn-rpmbuild install 

%install
# jars
install -d -m 0755 %{buildroot}%{_javadir}
install -m 644 target/%{name}-%{version}.jar   %{buildroot}%{_javadir}/%{name}.jar

%add_to_maven_depmap org.apache.james apache-mime4j %{version} JPP apache-mime4j

# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml \
    %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom

# javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
rm -rf target/site/api*

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt RELEASE_NOTES.txt
%{_javadir}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*

%files javadoc
%defattr(-,root,root,-)
%doc LICENSE.txt
%{_javadocdir}/%{name}

%changelog
* Wed Feb 23 2011 Alexander Kurtakov <akurtako@redhat.com> 0.6.1-1
- Initial package.