Sync from SUSE:SLFO:Main jakarta-mail revision c2fd7a56ac7d8ba7a02b8c4d71e12e16

This commit is contained in:
Adrian Schröter 2024-05-03 13:53:29 +02:00
commit 2c0b3c7267
5 changed files with 280 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

163
jakarta-mail-build.xml Normal file
View File

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jakarta.mail-api" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property name="project.groupId" value="jakarta.mail"/>
<property name="project.artifactId" value="jakarta.mail-api"/>
<property name="project.version" value="2.1.0"/>
<property name="spec.version" value="2.1"/>
<property name="mail.version" value="${project.version}"/>
<property name="compiler.source" value="1.8"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<property name="build.outputDir" value="${build.dir}/classes"/>
<property name="build.srcDir" value="src/main/java"/>
<property name="build.resourceDir" value="src/main/resources"/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<fileset dir="lib">
<include name="**/*"/>
</fileset>
</path>
<path id="build.test.classpath">
<fileset dir="lib">
<include name="**/*"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<copy todir="${build.srcDir}">
<fileset dir="${build.resourceDir}"/>
</copy>
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<exclude name="**/module-info.java"/>
<classpath refid="build.classpath"/>
</javac>
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
target="9"
verbose="false"
fork="false"
source="9">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<include name="**/module-info.java"/>
<classpath refid="build.classpath"/>
<modulepath refid="build.classpath"/>
</javac>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDir}"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
verbose="false"
encoding="UTF-8"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
charset="UTF-8"
linksource="false"
breakiterator="false"
source="${compiler.source}">
<classpath refid="build.classpath"/>
<header>&lt;![CDATA[&lt;a href=&quot;https://reload4j.qos.ch&quot;&gt;
&lt;img src=&quot;https://reload4j.qos.ch/images/logos/reload4j.jpg&quot; height=&quot;40&quot;/&gt;&lt;/a&gt;]]&gt;</header>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Bundle-Description" value="Jakarta Mail API 2.1 Specification API"/>
<attribute name="Bundle-DocURL" value="https://www.eclipse.org"/>
<attribute name="Bundle-License" value="http://www.eclipse.org/legal/epl-2.0,http://www.eclipse.org/org/documents/edl-v10.php,https://www.gnu.org/software/classpath/license.html"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="Jakarta Mail API"/>
<attribute name="Bundle-SymbolicName" value="jakarta.mail-api"/>
<attribute name="Bundle-Vendor" value="Eclipse Foundation"/>
<attribute name="Bundle-Version" value="${project.version}"/>
<attribute name="Export-Package" value="jakarta.mail.event;version=&quot;${project.version}&quot;;uses:=&quot;jakarta.mail&quot;,jakarta.mail.internet;version=&quot;${project.version}&quot;;uses:=&quot;jakarta.activation,jakarta.mail&quot;,jakarta.mail.search;version=&quot;${project.version}&quot;;uses:=&quot;jakarta.mail&quot;,jakarta.mail.util;version=&quot;${project.version}&quot;;uses:=&quot;jakarta.activation,jakarta.mail.internet&quot;,jakarta.mail;version=&quot;${project.version}&quot;;uses:=&quot;jakarta.activation,jakarta.mail.event,jakarta.mail.search,jakarta.mail.util&quot;"/>
<attribute name="Extension-Name" value="jakarta.mail"/>
<attribute name="Implementation-Build-Id" value="false"/>
<attribute name="Implementation-Title" value="Jakarta Mail API"/>
<attribute name="Implementation-Vendor" value="Eclipse Foundation"/>
<attribute name="Import-Package" value="jakarta.activation;version=&quot;[2.1,3)&quot;,jakarta.mail.event;version=&quot;[2.1,3)&quot;,jakarta.mail.internet;version=&quot;[2.1,3)&quot;,jakarta.mail.search;version=&quot;[2.1,3)&quot;,jakarta.mail.util;version=&quot;[2.1,3)&quot;,jakarta.mail;version=&quot;[2.1,3)&quot;"/>
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=1.8))&quot;"/>
<attribute name="Specification-Title" value="Jakarta Mail Specification"/>
<attribute name="Specification-Vendor" value="Eclipse Foundation"/>
<attribute name="Specification-Version" value="${spec.version}"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
</project>

4
jakarta-mail.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Thu Mar 3 14:16:52 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of jakarta-mail 2.1.0

87
jakarta-mail.spec Normal file
View File

@ -0,0 +1,87 @@
#
# spec file for package jakarta-mail
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global artifact_name jakarta.mail-api
Name: jakarta-mail
Version: 2.1.0
Release: 0
Summary: Jakarta Mail API
License: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
URL: https://eclipse-ee4j.github.io/mail/
Source0: https://github.com/eclipse-ee4j/mail/archive/%{version}/mail-%{version}.tar.gz
Source1: %{name}-build.xml
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: jakarta-activation
BuildRequires: java-devel >= 9
BuildRequires: javapackages-local
Requires: mvn(jakarta.activation:jakarta.activation-api)
BuildArch: noarch
%description
Jakarta Activation lets you take advantage of standard services to:
determine the type of an arbitrary piece of data; encapsulate access to
it; discover the operations available on it; and instantiate the
appropriate bean to perform the operation(s).
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n mail-%{version}
cp %{SOURCE1} api/build.xml
mkdir -p api/lib
%pom_remove_parent api
%build
pushd api
build-jar-repository -s lib jakarta-activation
%{ant} package javadoc
popd
%install
pushd api
# jars
mkdir -p %{buildroot}%{_javadir}/%{name}
cp -a target/%{artifact_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{artifact_name}.jar
#pom
install -d -m 755 %{buildroot}%{_mavenpomdir}/%{name}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{artifact_name}.pom
%add_maven_depmap %{name}/%{artifact_name}.pom %{name}/%{artifact_name}.jar
# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -a target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
popd
%fdupes -s %{buildroot}%{_javadocdir}
%files -f api/.mfiles
%doc README.md
%license LICENSE.md NOTICE.md
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE.md NOTICE.md
%changelog

BIN
mail-2.1.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.