Files
jbox2d/jbox2d.spec

76 lines
2.2 KiB
RPMSpec

#
# spec file for package jbox2d
#
# 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: jbox2d
Version: 2.2.1.1
Release: 0
Summary: A 2d Java physics engine
License: BSD-2-Clause
Group: Development/Libraries/Java
URL: https://www.jbox2d.org/
Source0: https://github.com/%{name}/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: protobuf-devel
BuildRequires: mvn(com.google.protobuf:protobuf-java)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.slf4j:slf4j-log4j12)
BuildArch: noarch
%description
JBox2d is a Java port of the C++ physics engines LiquidFun and Box2d.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n %{name}-%{name}-%{version}
dos2unix README.txt
%pom_disable_module jbox2d-testbed-jogl
%pom_xpath_remove 'pom:plugin[pom:artifactId="maven-compiler-plugin"]/pom:configuration'
%pom_remove_plugin :maven-javadoc-plugin
%pom_remove_plugin :maven-source-plugin
%build
protoc jbox2d-serialization/src/main/resources/proto/box2d.proto \
--java_out=jbox2d-serialization/src/generated
%{mvn_build} -f -- -Dsource=8
%install
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%license LICENSE
%doc README.*
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog