Blame SPECS/jakarta-mail.spec

8600b0
Name:           jakarta-mail
8600b0
Version:        1.6.5
8600b0
Release:        5%{?dist}
8600b0
Summary:        Jakarta Mail API
8600b0
License:        EPL-2.0 or GPLv2 with exceptions
8600b0
URL:            https://github.com/eclipse-ee4j/mail
8600b0
BuildArch:      noarch
8600b0
8600b0
Source0:        https://github.com/eclipse-ee4j/mail/archive/%{version}/mail-%{version}.tar.gz
8600b0
8600b0
BuildRequires:  maven-local
8600b0
BuildRequires:  mvn(com.sun.activation:jakarta.activation)
8600b0
BuildRequires:  mvn(junit:junit)
8600b0
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
8600b0
BuildRequires:  mvn(org.apache.maven.plugins:maven-dependency-plugin)
8600b0
BuildRequires:  mvn(org.apache.maven.plugins:maven-source-plugin)
8600b0
BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)
8600b0
8600b0
# package renamed in fedora 34, remove in fedora 36+
8600b0
Provides:       javamail = %{version}-%{release}
8600b0
Obsoletes:      javamail < 1.5.2-16
8600b0
8600b0
# javadoc package is currently not built
8600b0
Obsoletes:      javamail-javadoc  < 1.5.2-16
8600b0
8600b0
%description
8600b0
The Jakarta Mail API provides a platform-independent and
8600b0
protocol-independent framework to build mail and messaging applications.
8600b0
8600b0
%prep
8600b0
%setup -n mail-%{version}
8600b0
8600b0
# remove unnecessary dependency on parent POM
8600b0
%pom_remove_parent
8600b0
8600b0
# disable unnecessary maven plugins
8600b0
%pom_remove_plugin :maven-enforcer-plugin
8600b0
%pom_remove_plugin :osgiversion-maven-plugin
8600b0
8600b0
# disable android-specific code
8600b0
%pom_disable_module android
8600b0
8600b0
# remove profiles that only add unnecessary things
8600b0
%pom_xpath_remove "pom:project/pom:profiles"
8600b0
8600b0
# inject OSGi bundle versions manually instead of using osgiversion-maven-plugin
8600b0
sed -i "s/\${mail\.osgiversion}/%{version}/g" mail/pom.xml
8600b0
sed -i "s/\${mail\.osgiversion}/%{version}/g" mailapi/pom.xml
8600b0
8600b0
# add aliases for old maven artifact coordinates
8600b0
%mvn_alias com.sun.mail:mailapi \
8600b0
    javax.mail:mailapi
8600b0
%mvn_alias com.sun.mail:jakarta.mail \
8600b0
    com.sun.mail:javax.mail \
8600b0
    javax.mail:mail \
8600b0
    org.eclipse.jetty.orbit:javax.mail.glassfish
8600b0
%mvn_alias jakarta.mail:jakarta.mail-api \
8600b0
    javax.mail:javax.mail-api
8600b0
8600b0
# add symlinks for compatibilty with old classpaths
8600b0
%mvn_file com.sun.mail:jakarta.mail \
8600b0
    %{name}/jakarta.mail \
8600b0
    javamail/mail \
8600b0
    javamail/javax.mail \
8600b0
    javax.mail/javax.mail
8600b0
8600b0
%build
8600b0
# skip javadoc build due to https://github.com/fedora-java/xmvn/issues/58
8600b0
%mvn_build -j
8600b0
8600b0
%install
8600b0
%mvn_install
8600b0
8600b0
%files -f .mfiles
8600b0
%license LICENSE.md NOTICE.md
8600b0
%doc README.md
8600b0
8600b0
%changelog
8600b0
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.5-5
8600b0
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
8600b0
  Related: rhbz#1991688
8600b0
8600b0
* Mon Jun 28 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.6.5-4
8600b0
- Add build-dependency on junit
8600b0
- Resolves: rhbz#1976998
8600b0
8600b0
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.5-3
8600b0
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
8600b0
8600b0
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.5-2
8600b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
8600b0
8600b0
* Sat Sep 19 2020 Fabio Valentini <decathorpe@gmail.com> - 1.6.5-1
8600b0
- Initial package renamed from javamail.
8600b0