- Update to v3.1.3 * No changelog provided by upstream OBS-URL: https://build.opensuse.org/request/show/1237952 OBS-URL: https://build.opensuse.org/package/show/Java:packages/lanterna?expand=0&rev=3
102 lines
3.8 KiB
RPMSpec
102 lines
3.8 KiB
RPMSpec
#
|
||
# spec file for package lanterna
|
||
#
|
||
# Copyright (c) 2024 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/
|
||
#
|
||
|
||
|
||
Name: lanterna
|
||
Version: 3.1.3
|
||
Release: 0
|
||
Summary: Java library for creating text-based GUIs
|
||
License: LGPL-3.0
|
||
Group: Development/Libraries/Java
|
||
URL: https://github.com/mabe02/%{name}
|
||
Source0: %{url}/archive/refs/tags/%{name}-%{version}.tar.gz
|
||
BuildRequires: fdupes
|
||
BuildRequires: maven-local
|
||
BuildRequires: mvn(net.java.dev.jna:jna-platform)
|
||
#BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
|
||
BuildArch: noarch
|
||
|
||
%description
|
||
Lanterna is a Java library allowing you to write easy semi-graphical user
|
||
interfaces in a text-only environment, very similar to the C library curses but
|
||
with more functionality. Lanterna is supporting xterm compatible terminals and
|
||
terminal emulators such as konsole, gnome-terminal, putty, xterm and many more.
|
||
One of the main benefits of lanterna is that it’s not dependent on any native
|
||
library but runs 100% in pure Java.
|
||
|
||
Also, when running Lanterna on computers with a graphical environment (such as
|
||
Windows or Xorg), a bundled terminal emulator written in Swing will be used
|
||
rather than standard output. This way, you can develop as usual from your IDE
|
||
(most of them doesn’t support ANSI control characters in their output window)
|
||
and then deploy to your headless server without changing any code.
|
||
|
||
Lanterna is structured into three layers, each built on top of the other and
|
||
you can easily choose which one fits your needs best.
|
||
|
||
• The first is a low level terminal interface which gives you the most basic
|
||
control of the terminal text area. You can move around the cursor and enable
|
||
special modifiers for characters put to the screen. You will find these classes
|
||
in package com.googlecode.lanterna.terminal.
|
||
|
||
• The second level is a full screen buffer, the whole text screen in memory and
|
||
allowing you to write to this before flushing the changes to the actual
|
||
terminal. This makes writing to the terminal screen similar to modifying a
|
||
bitmap. You will find these classes in package com.googlecode.lanterna.screen.
|
||
|
||
• The third level is a full GUI toolkit with windows, buttons, labels and some
|
||
other components. It’s using a very simple window management system (basically
|
||
all windows are modal) that is quick and easy to use. You will find these
|
||
classes in package com.googlecode.lanterna.gui2.
|
||
|
||
%package javadoc
|
||
Summary: API documentation for %{name}
|
||
Group: Documentation/HTML
|
||
|
||
%description javadoc
|
||
API documentation for %{name}.
|
||
|
||
%prep
|
||
%setup -q -n %{name}-%{name}-%{version}
|
||
|
||
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
|
||
%pom_remove_plugin org.jacoco:jacoco-maven-plugin
|
||
%pom_remove_plugin :maven-enforcer-plugin
|
||
|
||
%pom_xpath_remove 'pom:execution[pom:id/text()="java9"]'
|
||
|
||
mv src/main/java9/module-info.java src/main/java
|
||
|
||
%{mvn_file} : %{name}
|
||
|
||
%build
|
||
%{mvn_build} -f -- \
|
||
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
|
||
-Dmaven.compiler.{source,target}=11
|
||
|
||
%install
|
||
%mvn_install
|
||
%fdupes %{buildroot}%{_javadocdir}/%{name}
|
||
|
||
%files -f .mfiles
|
||
%license License.txt
|
||
%doc CHANGELOG.md README.md docs/*
|
||
|
||
%files javadoc -f .mfiles-javadoc
|
||
%license License.txt
|
||
|
||
%changelog
|