Files
miglayout/miglayout.spec

132 lines
4.4 KiB
RPMSpec

#
# spec file for package miglayout
#
# Copyright (c) 2025 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: miglayout
Version: 11.4.2
Release: 0
Summary: Official MiG Layout for Swing, SWT and JavaFX
License: BSD-1-Clause
Group: Development/Libraries/Java
URL: https://miglayout.com/
Source0: https://github.com/mikaelgrev/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.eclipse.swt:org.eclipse.swt)
BuildRequires: mvn(org.openjfx:javafx.controls)
BuildRequires: mvn(org.openjfx:javafx.graphics)
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
BuildArch: noarch
%description
Official MiG Layout for Swing, SWT and JavaFX.
For Java developers writing GUI layouts by hand that wants simplicity, power
and automatic per platform fidelity, that are dissatisfied with the current
layout managers in Swing, JavaFX and SWT, MigLayout solves your layout
problems. User interfaces created with MigLayout is easy to maintain, you will
understand how the layout will look like just by looking at the source code.
MigLayout is a superbly versatile JavaFX/SWT/Swing layout manager that makes
layout problems trivial. It is using String or API type-checked constraints to
format the layout. MigLayout can produce flowing, grid based, absolute (with
links), grouped and docking layouts. You will never have to switch to another
layout manager ever again! MigLayout is created to be to manually coded layouts
what Matisse/GroupLayout is to IDE supported visual layouts.
For documentation see http://miglayout.com
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q
chmod 0644 src/site/resources/docs/{,examples/}*.*
dos2unix README.md
%pom_disable_module demo
%pom_disable_module nbm
%pom_xpath_remove 'pom:plugin[pom:artifactId="maven-compiler-plugin"]//pom:arg[contains(.,"-Xplugin:ErrorProne")]'
%pom_xpath_remove 'pom:plugin[pom:artifactId="maven-compiler-plugin"]//pom:annotationProcessorPaths'
%define swt_module_name org.eclipse.swt
cat <<__MODULE_INFO__ >swt/src/main/java/module-info.java
module com.miglayout.swt
{
exports net.miginfocom.swt;
requires com.miglayout.core;
requires %{swt_module_name};
}
__MODULE_INFO__
cat <<__MODULE_INFO__ >examples/src/main/java/module-info.java
module com.miglayout.examples
{
requires com.miglayout.core;
requires com.miglayout.swt;
requires com.miglayout.swing;
requires java.desktop;
requires %{swt_module_name};
}
__MODULE_INFO__
%pom_xpath_remove pom:project/pom:profiles swt
%pom_add_dep org.eclipse.swt:org.eclipse.swt:4.3 swt
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin :maven-enforcer-plugin
%pom_remove_plugin :maven-javadoc-plugin
# Why org.openjfx:* artifacts use periods instead of hyphens in their Ids?
%pom_change_dep org.openjfx:javafx-base org.openjfx:javafx.base javafx
%pom_change_dep org.openjfx:javafx-controls org.openjfx:javafx.controls javafx
%pom_change_dep org.openjfx:javafx-fxml org.openjfx:javafx.fxml javafx
%pom_change_dep org.openjfx:javafx-graphics org.openjfx:javafx.graphics javafx
%pom_xpath_remove 'pom:reporting'
%build
%{mvn_build} -f
%install
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%license src/site/resources/docs/license.txt
%doc README.md
%doc src/site/resources/docs/cheatsheet.{html,pdf}
%doc src/site/resources/docs/whitepaper.html
%doc src/site/resources/docs/quickstart*.png
%doc src/site/resources/docs/QuickStart.pdf
%doc src/site/resources/docs/examples/
%doc src/site/resources/docs/MiGLayout.html
%files javadoc -f .mfiles-javadoc
%license src/site/resources/docs/license.txt
%changelog