150b6c
Name:           javamail
150b6c
Version:        1.5.2
150b6c
Release:        7%{?dist}
150b6c
Summary:        Java Mail API
150b6c
License:        CDDL-1.0 or GPLv2 with exceptions
150b6c
URL:            http://www.oracle.com/technetwork/java/javamail
150b6c
BuildArch:      noarch
150b6c
150b6c
Source:        https://java.net/projects/javamail/downloads/download/source/javamail-%{version}-src.zip
150b6c
150b6c
BuildRequires:  maven-local
150b6c
BuildRequires:  mvn(junit:junit)
150b6c
BuildRequires:  mvn(net.java:jvnet-parent:pom:)
150b6c
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
150b6c
BuildRequires:  mvn(org.apache.maven.plugins:maven-dependency-plugin)
150b6c
BuildRequires:  mvn(org.apache.maven.plugins:maven-enforcer-plugin)
150b6c
BuildRequires:  mvn(org.apache.maven.plugins:maven-source-plugin)
150b6c
BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)
150b6c
150b6c
# Adapted from the classpathx-mail (and JPackage glassfish-javamail) Provides.
150b6c
Provides:       javamail-monolithic = %{version}-%{release}
150b6c
150b6c
Provides:       javax.mail
150b6c
150b6c
%description
150b6c
The JavaMail API provides a platform-independent and protocol-independent
150b6c
framework to build mail and messaging applications.
150b6c
150b6c
150b6c
%package javadoc
150b6c
Summary:        Javadoc for %{name}
150b6c
150b6c
%description javadoc
150b6c
%{summary}.
150b6c
150b6c
150b6c
%prep
150b6c
%setup -q -c
150b6c
150b6c
add_dep() {
150b6c
    %pom_xpath_inject pom:project "<dependencies/>" ${2}
150b6c
    %pom_add_dep com.sun.mail:${1}:%{version}:provided ${2}
150b6c
}
150b6c
150b6c
add_dep smtp mailapi
150b6c
add_dep javax.mail smtp
150b6c
add_dep javax.mail pop3
150b6c
add_dep javax.mail imap
150b6c
add_dep javax.mail mailapijar
150b6c
150b6c
# Remove profiles containing demos and other stuff that is not
150b6c
# supposed to be deployable.
150b6c
%pom_xpath_remove /pom:project/pom:profiles
150b6c
150b6c
# osgiversion-maven-plugin is used to set ${mail.osgiversion} property
150b6c
# based on ${project.version}. We don't have osgiversion plugin in
150b6c
# Fedora so we'll set ${mail.osgiversion} explicitly.
150b6c
%pom_remove_plugin org.glassfish.hk2:osgiversion-maven-plugin
150b6c
%pom_remove_dep javax.activation:activation
150b6c
%pom_xpath_inject /pom:project/pom:properties "<mail.osgiversion>%{version}</mail.osgiversion>"
150b6c
%pom_xpath_inject /pom:project/pom:build/pom:plugins/pom:plugin/pom:configuration/pom:instructions "<_nouses>true</_nouses>"
150b6c
150b6c
# Alternative names for super JAR containing API and implementation.
150b6c
%mvn_alias com.sun.mail:mailapi javax.mail:mailapi
150b6c
%mvn_alias com.sun.mail:javax.mail javax.mail:mail \
150b6c
           org.eclipse.jetty.orbit:javax.mail.glassfish
150b6c
%mvn_file "com.sun.mail:{javax.mail}" %{name}/@1 %{name}/mail
150b6c
150b6c
%build
150b6c
# Some tests fail on Koji due to networking limitations
150b6c
%mvn_build -- -Dmaven.test.failure.ignore=true
150b6c
150b6c
%install
150b6c
%mvn_install
150b6c
150b6c
install -d -m 755 %{buildroot}%{_javadir}/javax.mail/
150b6c
ln -sf ../%{name}/javax.mail.jar %{buildroot}%{_javadir}/javax.mail/
150b6c
150b6c
%files -f .mfiles
150b6c
%doc mail/src/main/java/overview.html
150b6c
%doc mail/src/main/resources/META-INF/LICENSE.txt
150b6c
%{_javadir}/javax.mail/
150b6c
150b6c
%files javadoc -f .mfiles-javadoc
150b6c
%doc mail/src/main/resources/META-INF/LICENSE.txt
150b6c
150b6c
%changelog
150b6c
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-7
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
150b6c
150b6c
* Thu Nov 09 2017 Michael Simacek <msimacek@redhat.com> - 1.5.2-6
150b6c
- Specify CDDL license version
150b6c
150b6c
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-5
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
150b6c
150b6c
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-4
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
150b6c
150b6c
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-3
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
150b6c
150b6c
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-2
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
150b6c
150b6c
* Fri Mar 6 2015 Alexander Kurtakov <akurtako@redhat.com> 1.5.2-1
150b6c
- Update to upstream 1.5.2 using upstream tarball.
150b6c
150b6c
* Fri Mar 6 2015 Alexander Kurtakov <akurtako@redhat.com> 1.5.1-5
150b6c
- Remove javax.activation:activation dependency.
150b6c
150b6c
* Mon Aug  4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.1-4
150b6c
- Fix build-requires on jvnet-parent
150b6c
150b6c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-3
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
150b6c
150b6c
* Mon Mar 31 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.1-2
150b6c
- Regenerate build-requires
150b6c
150b6c
* Mon Mar 31 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.1-1
150b6c
- Update to upstream version 1.5.1
150b6c
150b6c
* Mon Mar 31 2014 Alexander Kurtakov <akurtako@redhat.com> 1.5.0-8
150b6c
- Do not generate uses clauses for osgi -too strict linking.
150b6c
150b6c
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.5.0-7
150b6c
- Use Requires: java-headless rebuild (#1067528)
150b6c
150b6c
* Mon Aug 12 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.5.0-6
150b6c
- Add forgotten provides
150b6c
150b6c
* Mon Aug 12 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.5.0-5
150b6c
- Add javax.mail provides and directory
150b6c
150b6c
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-4
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
150b6c
150b6c
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-3
150b6c
- Add compat symlink for javax.mail:mail
150b6c
150b6c
* Mon Jun 24 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-2
150b6c
- Add Maven alias for javax.mail:mail
150b6c
150b6c
* Mon Jun 24 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-1
150b6c
- Update to upstream version 1.5.0
150b6c
150b6c
* Thu Mar  7 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4.6-1
150b6c
- Update to upstream version 1.4.6
150b6c
150b6c
* Mon Mar  4 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4.3-16
150b6c
- Add depmap for org.eclipse.jetty.orbit
150b6c
- Resolves: rhbz#917624
150b6c
150b6c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-15
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
150b6c
150b6c
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.4.3-14
150b6c
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
150b6c
- Replace maven BuildRequires with maven-local
150b6c
150b6c
* Thu Oct 11 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4.3-13
150b6c
- Fix URL
150b6c
150b6c
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-12
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
150b6c
150b6c
* Mon Jun 11 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4.3-11
150b6c
- Update OSGi manifest patch
150b6c
150b6c
* Tue May 29 2012 Gerard Ryan <galileo@fedoraproject.org> - 1.4.3-10
150b6c
- Add extra information to OSGi manifest
150b6c
- Fix rpmlint error about mavendepmapfragdir
150b6c
150b6c
* Wed Mar 21 2012 Alexander Kurtakov <akurtako@redhat.com> 1.4.3-9
150b6c
- Drop tomcat6-jsp-api requires - it's dependency management not dependency, hence not needed.
150b6c
150b6c
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-8
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
150b6c
150b6c
* Tue Nov 29 2011 Alexander Kurtakov <akurtako@redhat.com> 1.4.3-7
150b6c
- Build with maven3.
150b6c
- Adapt to current guidelines.
150b6c
150b6c
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-6
150b6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
150b6c
150b6c
* Wed Dec  8 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.4.3-5
150b6c
- Fix pom filenames (#655806)
150b6c
- Versionless jars/javadocs (new guidelines)
150b6c
- Migrate to tomcat6 (#652004)
150b6c
- Other cleanups
150b6c
150b6c
* Wed Sep 8 2010 Alexander Kurtakov <akurtako@redhat.com> 1.4.3-4
150b6c
- Add surefire provider BR.
150b6c
150b6c
* Wed Sep 8 2010 Alexander Kurtakov <akurtako@redhat.com> 1.4.3-3
150b6c
- Drop gcj_support.
150b6c
- Use javadoc:aggregate.
150b6c
150b6c
* Fri Jan  8 2010 Mary Ellen Foster <mefoster at gmail.com> 1.4.3-2
150b6c
- Remove unnecessary (build)requirement tomcat5-servlet-2.4-api
150b6c
- Move jar files into subdirectory
150b6c
150b6c
* Wed Dec  2 2009 Mary Ellen Foster <mefoster at gmail.com> 1.4.3-1
150b6c
- Initial package