From 358083f88054ebf12c839abaa77cf2d850bcdec8 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Tue, 17 Nov 2020 11:11:14 -0800 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/jakarta-mail#61bf0514269c9b7f32c1e333bcf8bb27f80e3e47 --- .gitignore | 4 +++ jakarta-mail.spec | 88 +++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 93 insertions(+) create mode 100644 jakarta-mail.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..95bc5af 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,4 @@ +/results_*/ +/*.src.rpm + +/mail-1.6.5.tar.gz diff --git a/jakarta-mail.spec b/jakarta-mail.spec new file mode 100644 index 0000000..b5caba0 --- /dev/null +++ b/jakarta-mail.spec @@ -0,0 +1,88 @@ +%global srcname mail + +Name: jakarta-mail +Version: 1.6.5 +Release: 1%{?dist} +Summary: Jakarta Mail API +License: EPL-2.0 or GPLv2 with exceptions + +URL: https://github.com/eclipse-ee4j/mail +Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: maven-local +BuildRequires: mvn(com.sun.activation:jakarta.activation) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) +BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) + +# package renamed in fedora 34, remove in fedora 36+ +Provides: javamail = %{version}-%{release} +Obsoletes: javamail < 1.5.2-16 + +# javadoc package is currently not built +Obsoletes: javamail-javadoc < 1.5.2-16 + +%description +The Jakarta Mail API provides a platform-independent and +protocol-independent framework to build mail and messaging applications. + + +%prep +%autosetup -n %{srcname}-%{version} -p1 + +# remove unnecessary dependency on parent POM +%pom_remove_parent + +# disable unnecessary maven plugins +%pom_remove_plugin :maven-enforcer-plugin +%pom_remove_plugin :osgiversion-maven-plugin + +# disable android-specific code +%pom_disable_module android + +# remove profiles that only add unnecessary things +%pom_xpath_remove "pom:project/pom:profiles" + +# inject OSGi bundle versions manually instead of using osgiversion-maven-plugin +sed -i "s/\${mail\.osgiversion}/%{version}/g" mail/pom.xml +sed -i "s/\${mail\.osgiversion}/%{version}/g" mailapi/pom.xml + +# add aliases for old maven artifact coordinates +%mvn_alias com.sun.mail:mailapi \ + javax.mail:mailapi +%mvn_alias com.sun.mail:jakarta.mail \ + com.sun.mail:javax.mail \ + javax.mail:mail \ + org.eclipse.jetty.orbit:javax.mail.glassfish +%mvn_alias jakarta.mail:jakarta.mail-api \ + javax.mail:javax.mail-api + +# add symlinks for compatibilty with old classpaths +%mvn_file com.sun.mail:jakarta.mail \ + %{name}/jakarta.mail \ + javamail/mail \ + javamail/javax.mail \ + javax.mail/javax.mail + + +%build +# skip javadoc build due to https://github.com/fedora-java/xmvn/issues/58 +%mvn_build -j + + +%install +%mvn_install + + +%files -f .mfiles +%license LICENSE.md NOTICE.md +%doc README.md + + +%changelog +* Sat Sep 19 2020 Fabio Valentini - 1.6.5-1 +- Initial package renamed from javamail. + diff --git a/sources b/sources new file mode 100644 index 0000000..8ada68f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (mail-1.6.5.tar.gz) = 6ddf2b17a2948edf78cd343d7261145d402c285c6430d157fb88013ed59a6012a0b6913f194b7532ccd59d64c3272fef8e6d88cb68316d8b8d7b210ca17e3b0f