Add jansi package version 2.4.0 (#4617)
* jansi: Add package version 2.4.0 - Use javapackages-local-bootstrap to avoid build cycle. - Convert the 'Release' tag to the '[number].[distribution]' format. * jansi: cgmanifest add package entry * jansi: licenses add package entry * jansi: cgmanifest fix lexical position of package entry
This commit is contained in:
Родитель
994bd71e52
Коммит
715b00ddc1
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="jansi" default="package" basedir=".">
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Build environment properties -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<property name="project.version" value="2.4.0"/>
|
||||
<property name="project.groupId" value="org.fusesource.jansi"/>
|
||||
<property name="project.artifactId" value="jansi"/>
|
||||
|
||||
<property name="spec.version" value="2.4"/>
|
||||
|
||||
<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"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- 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}"/>
|
||||
<javac destdir="${build.outputDir}"
|
||||
encoding="UTF-8"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
target="${compiler.target}"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
source="${compiler.source}">
|
||||
<src>
|
||||
<pathelement location="${build.srcDir}"/>
|
||||
</src>
|
||||
</javac>
|
||||
<copy todir="${build.outputDir}">
|
||||
<fileset dir="${build.resourceDir}"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Javadoc target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="javadoc" description="Generates the Javadoc of the application">
|
||||
<javadoc sourcepath="${build.srcDir}"
|
||||
packagenames="*"
|
||||
destdir="${reporting.outputDirectory}/apidocs"
|
||||
access="protected"
|
||||
source="${compiler.source}"
|
||||
verbose="false"
|
||||
version="true"
|
||||
use="true"
|
||||
author="true"
|
||||
splitindex="false"
|
||||
nodeprecated="false"
|
||||
nodeprecatedlist="false"
|
||||
notree="false"
|
||||
noindex="false"
|
||||
nohelp="false"
|
||||
nonavbar="false"
|
||||
serialwarn="false"
|
||||
encoding="UTF-8"
|
||||
docencoding="UTF-8"
|
||||
linksource="false"
|
||||
breakiterator="false"/>
|
||||
</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="Automatic-Module-Name" value="${project.groupId}"/>
|
||||
<attribute name="Bundle-Description" value="Jansi is a java library for generating and interpreting ANSI escape sequences."/>
|
||||
<attribute name="Bundle-DocURL" value="http://fusesource.com/"/>
|
||||
<attribute name="Bundle-License" value="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
|
||||
<attribute name="Bundle-ManifestVersion" value="2"/>
|
||||
<attribute name="Bundle-Name" value="${project.artifactId}"/>
|
||||
<attribute name="Bundle-SymbolicName" value="${project.groupId}"/>
|
||||
<attribute name="Bundle-Vendor" value="FuseSource, Corp."/>
|
||||
<attribute name="Bundle-Version" value="${project.version}"/>
|
||||
<attribute name="Export-Package" value="org.fusesource.jansi.internal;version="${project.version}",org.fusesource.jansi.io;version="${project.version}";uses:="org.fusesource.jansi",org.fusesource.jansi;version="${project.version}";uses:="org.fusesource.jansi.io""/>
|
||||
<attribute name="Implementation-Title" value="${project.artifactId}"/>
|
||||
<attribute name="Implementation-Vendor" value="FuseSource, Corp."/>
|
||||
<attribute name="Implementation-Version" value="${project.version}"/>
|
||||
<attribute name="Main-Class" value="org.fusesource.jansi.AnsiMain"/>
|
||||
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
||||
<attribute name="Specification-Title" value="${project.artifactId}"/>
|
||||
<attribute name="Specification-Vendor" value="FuseSource, Corp."/>
|
||||
<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>
|
|
@ -0,0 +1,14 @@
|
|||
--- a/src/main/java/org/fusesource/jansi/internal/JansiLoader.java 2020-12-15 03:03:00.000000000 -0700
|
||||
+++ b/src/main/java/org/fusesource/jansi/internal/JansiLoader.java 2020-12-15 07:57:30.238720226 -0700
|
||||
@@ -295,6 +295,11 @@ public class JansiLoader {
|
||||
} else {
|
||||
triedPaths.add(jansiNativeLibraryPath);
|
||||
}
|
||||
+ } else {
|
||||
+ if (loadNativeLibrary(new File("@LIBDIR@/jansi", jansiNativeLibraryName))) {
|
||||
+ loaded = true;
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
|
||||
// Load the os-dependent library from the jar file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Signatures": {
|
||||
"jansi-2.4.0.tar.gz": "ba18c50770eebb0b6f472254ada8608138e70045a564efa43626a09691dcf553",
|
||||
"jansi-build.xml": "e41ac6e2e130acb3a8e7b0839c3b23b9aee58ea5a6c45531ef0ece3f4a488030"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,147 @@
|
|||
Summary: Java library for generating and interpreting ANSI escape sequences
|
||||
Name: jansi
|
||||
Version: 2.4.0
|
||||
Release: 1%{?dist}
|
||||
License: Apache-2.0
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Mariner
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://fusesource.github.io/jansi/
|
||||
Source0: https://github.com/fusesource/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz
|
||||
Source1: %{name}-build.xml
|
||||
Patch0: %{name}-jni.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc
|
||||
BuildRequires: javapackages-local-bootstrap
|
||||
|
||||
%description
|
||||
Jansi is a java library that allows you to use ANSI escape sequences
|
||||
in your Java console applications. It implements ANSI support on platforms
|
||||
which don't support it, like Windows, and provides graceful degradation for
|
||||
when output is being sent to output devices which cannot support ANSI sequences.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadocs for %{name}
|
||||
Group: Documentation/HTML
|
||||
BuildArch: noarch
|
||||
|
||||
%description javadoc
|
||||
This package contains the API documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{name}-%{version}
|
||||
cp %{SOURCE1} build.xml
|
||||
|
||||
%pom_remove_parent
|
||||
|
||||
# We don't need the Fuse JXR skin
|
||||
%pom_xpath_remove "pom:build/pom:extensions"
|
||||
|
||||
# Plugins not needed for an RPM build
|
||||
%pom_remove_plugin :maven-gpg-plugin
|
||||
%pom_remove_plugin :maven-javadoc-plugin
|
||||
%pom_remove_plugin :nexus-staging-maven-plugin
|
||||
|
||||
# We don't want GraalVM support in Fedora
|
||||
%pom_remove_plugin :exec-maven-plugin
|
||||
%pom_remove_dep :picocli-codegen
|
||||
|
||||
# Build for JDK 1.8 at a minimum
|
||||
%pom_xpath_set "//pom:properties/pom:jdkTarget" 1.8
|
||||
|
||||
# Remove prebuilt shared objects
|
||||
rm -fr src/main/resources/org/fusesource/jansi/internal
|
||||
|
||||
# Unbundle the JNI headers
|
||||
rm src/main/native/inc_linux/*.h
|
||||
ln -s %{java_home}/include/jni.h src/main/native/inc_linux
|
||||
ln -s %{java_home}/include/linux/jni_md.h src/main/native/inc_linux
|
||||
|
||||
# Set the JNI path
|
||||
sed -i 's,@LIBDIR@,%{_libdir},' \
|
||||
src/main/java/org/fusesource/jansi/internal/JansiLoader.java
|
||||
# Filtering complicated with ant
|
||||
sed -i 's,\${project.version},%{version},' \
|
||||
src/main/resources/org/fusesource/jansi/jansi.properties
|
||||
|
||||
%build
|
||||
%set_build_flags
|
||||
CC="${CC:-gcc}"
|
||||
# Build the native artifact
|
||||
CFLAGS="$CFLAGS -I. -I%{java_home}/include -I%{java_home}/include/linux -fPIC -fvisibility=hidden"
|
||||
pushd src/main/native
|
||||
$CC $CFLAGS -c jansi.c
|
||||
$CC $CFLAGS -c jansi_isatty.c
|
||||
$CC $CFLAGS -c jansi_structs.c
|
||||
$CC $CFLAGS -c jansi_ttyname.c
|
||||
$CC $CFLAGS $LDFLAGS -shared -o libjansi.so *.o -lutil
|
||||
popd
|
||||
|
||||
# Build the Java artifacts
|
||||
%{ant} jar javadoc
|
||||
|
||||
%install
|
||||
# Install the native artifact
|
||||
install -dm 0755 %{buildroot}%{_libdir}/%{name}
|
||||
install -pm 0755 src/main/native/libjansi.so %{buildroot}%{_libdir}/%{name}
|
||||
|
||||
# jar
|
||||
install -dm 0755 %{buildroot}%{_jnidir}/%{name}
|
||||
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_jnidir}/%{name}/%{name}.jar
|
||||
# pom
|
||||
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
|
||||
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
|
||||
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
|
||||
# javadoc
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
# javadoc
|
||||
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%files -f .mfiles
|
||||
%license license.txt
|
||||
%doc readme.md changelog.md
|
||||
%{_libdir}/%{name}
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Tue Jan 17 2023 Sumedh Sharma <sumsharma@microsoft.com> - 2.4.0-1
|
||||
- Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
|
||||
- Use javapackages-local-bootstrap to avoid build cycle.
|
||||
- Converting the 'Release' tag to the '[number].[distribution]' format.
|
||||
- License verified
|
||||
|
||||
* Mon May 16 2022 Fridrich Strba <fstrba@suse.com>
|
||||
- Upgrade the latest upstream release 2.4.0
|
||||
Integrates jansi-native libraries
|
||||
Does not depend on jansi-native and hawtjni-runtime
|
||||
- Make the jansi package archful since it installs a native
|
||||
library and jni jar
|
||||
- Added patch:
|
||||
jansi-jni.patch Give a possibility to load the native libjansi.so from
|
||||
system
|
||||
|
||||
* Wed Mar 23 2022 Fridrich Strba <fstrba@suse.com>
|
||||
- Build with java source and target levels 8
|
||||
|
||||
* Thu Jun 27 2019 Fridrich Strba <fstrba@suse.com>
|
||||
- Remove the reference to jansi-project parent from jansi pom
|
||||
- Resolve manually jansi-native-version variable so that ivy
|
||||
understands it
|
||||
|
||||
* Tue Apr 9 2019 Fridrich Strba <fstrba@suse.com>
|
||||
- Remove reference to the parent pom since we are not building
|
||||
using Maven.
|
||||
- Make tests conditional and switched off by default
|
||||
|
||||
* Thu Feb 7 2019 Jan Engelhardt <jengelh@inai.de>
|
||||
- Fix double-shipping of documentation
|
||||
- Avoid name repetition in summary (potential rpmlint warning
|
||||
|
||||
* Mon Feb 4 2019 Fridrich Strba <fstrba@suse.com>
|
||||
- Initial package of jansi 1.17.1
|
||||
- Add build.xml file for building with ant
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -2378,6 +2378,7 @@
|
|||
"influxdb",
|
||||
"isorelax",
|
||||
"jakarta-taglibs-standard",
|
||||
"jansi",
|
||||
"jansi-native",
|
||||
"jarjar",
|
||||
"java-cup",
|
||||
|
|
|
@ -7266,6 +7266,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
"type": "other",
|
||||
"other": {
|
||||
"name": "jansi",
|
||||
"version": "2.4.0",
|
||||
"downloadUrl": "https://github.com/fusesource/jansi/archive/refs/tags/jansi-2.4.0.tar.gz"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
"type": "other",
|
||||
|
|
Загрузка…
Ссылка в новой задаче