2019-04-12 16:53:42 +02:00
|
|
|
#
|
|
|
|
# spec file for package maven-native
|
|
|
|
#
|
2024-02-21 11:50:39 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2019-04-12 16:53:42 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2019-06-03 21:20:00 +02:00
|
|
|
|
2020-10-07 16:29:01 +02:00
|
|
|
%global namedversion 1.0-alpha-11
|
2019-04-12 16:53:42 +02:00
|
|
|
Name: maven-native
|
2020-10-07 16:29:01 +02:00
|
|
|
Version: 1.0~alpha11
|
2019-04-12 16:53:42 +02:00
|
|
|
Release: 0
|
2019-06-03 21:20:00 +02:00
|
|
|
Summary: Maven plugin to compile C and C++ source
|
2019-04-12 16:53:42 +02:00
|
|
|
License: Apache-2.0 AND MIT
|
|
|
|
Group: Development/Libraries/Java
|
2020-10-07 16:29:01 +02:00
|
|
|
URL: https://www.mojohaus.org/plugins.html
|
2019-04-12 16:53:42 +02:00
|
|
|
# Source code available @ https://github.com/mojohaus/maven-native
|
2020-10-07 16:29:01 +02:00
|
|
|
Source0: https://repo1.maven.org/maven2/org/codehaus/mojo/natives/%{name}/%{namedversion}/%{name}-%{namedversion}-source-release.zip
|
2022-03-25 08:59:48 +01:00
|
|
|
Source1: plexus_components-bcc.xml
|
|
|
|
Source2: plexus_components-generic-c.xml
|
|
|
|
Source3: plexus_components-manager.xml
|
|
|
|
Source4: plexus_components-msvc.xml
|
2022-05-22 21:20:30 +02:00
|
|
|
Patch0: 0001-Require-Java-8.patch
|
2019-04-12 16:53:42 +02:00
|
|
|
BuildRequires: fdupes
|
2022-03-25 08:59:48 +01:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2019-04-12 16:53:42 +02:00
|
|
|
BuildRequires: maven-local
|
2021-06-07 14:51:57 +02:00
|
|
|
BuildRequires: mojo-parent
|
2019-06-03 21:20:00 +02:00
|
|
|
BuildRequires: unzip
|
2020-10-07 16:29:01 +02:00
|
|
|
BuildRequires: mvn(org.apache.bcel:bcel)
|
|
|
|
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
|
2019-04-12 16:53:42 +02:00
|
|
|
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
|
2020-10-07 16:29:01 +02:00
|
|
|
BuildRequires: mvn(org.apache.maven:maven-aether-provider)
|
2019-04-12 16:53:42 +02:00
|
|
|
BuildRequires: mvn(org.apache.maven:maven-artifact)
|
|
|
|
BuildRequires: mvn(org.apache.maven:maven-compat)
|
|
|
|
BuildRequires: mvn(org.apache.maven:maven-core)
|
|
|
|
BuildRequires: mvn(org.apache.maven:maven-model)
|
|
|
|
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
|
2020-10-07 16:29:01 +02:00
|
|
|
BuildRequires: mvn(org.codehaus.mojo:mojo-parent:pom:)
|
2019-04-12 16:53:42 +02:00
|
|
|
BuildRequires: mvn(org.codehaus.plexus:plexus-archiver)
|
2020-10-07 16:29:01 +02:00
|
|
|
BuildRequires: mvn(org.codehaus.plexus:plexus-component-annotations)
|
|
|
|
BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata)
|
2019-04-12 16:53:42 +02:00
|
|
|
BuildRequires: mvn(org.codehaus.plexus:plexus-container-default)
|
|
|
|
BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
Maven Native - compile C and C++ source under Maven
|
|
|
|
with compilers such as GCC, MSVC, GCJ etc ...
|
|
|
|
|
|
|
|
%package components
|
|
|
|
Summary: Maven Native Components
|
2019-06-03 21:20:00 +02:00
|
|
|
Group: Development/Libraries/Java
|
2019-04-12 16:53:42 +02:00
|
|
|
|
|
|
|
%description components
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
%package -n native-maven-plugin
|
|
|
|
Summary: Native Maven Plugin
|
2019-06-03 21:20:00 +02:00
|
|
|
Group: Development/Libraries/Java
|
2019-04-12 16:53:42 +02:00
|
|
|
|
|
|
|
%description -n native-maven-plugin
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
2019-06-03 21:20:00 +02:00
|
|
|
Group: Documentation/HTML
|
2019-04-12 16:53:42 +02:00
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
This package contains javadoc for %{name}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{namedversion}
|
2024-02-21 11:50:39 +01:00
|
|
|
%patch -P 0 -p1
|
2019-04-12 16:53:42 +02:00
|
|
|
|
|
|
|
for d in LICENSE ; do
|
|
|
|
iconv -f iso8859-1 -t utf-8 $d.txt > $d.txt.conv && mv -f $d.txt.conv $d.txt
|
|
|
|
sed -i 's/\r//' $d.txt
|
|
|
|
done
|
|
|
|
|
2020-10-07 16:29:01 +02:00
|
|
|
%pom_remove_plugin -r :sortpom-maven-plugin
|
2019-04-12 16:53:42 +02:00
|
|
|
|
|
|
|
# missing test deps
|
|
|
|
%pom_add_dep aopalliance:aopalliance::test native-maven-plugin
|
|
|
|
%pom_add_dep net.sf.cglib:cglib::test native-maven-plugin
|
|
|
|
|
|
|
|
%{mvn_package} ":%{name}" %{name}
|
|
|
|
%{mvn_package} ":%{name}-api" %{name}
|
|
|
|
%{mvn_package} ":%{name}-components" components
|
|
|
|
%{mvn_package} ":%{name}-bcc" components
|
|
|
|
%{mvn_package} ":%{name}-generic-c" components
|
|
|
|
%{mvn_package} ":%{name}-javah" components
|
|
|
|
%{mvn_package} ":%{name}-manager" components
|
|
|
|
%{mvn_package} ":%{name}-msvc" components
|
2020-10-07 16:29:01 +02:00
|
|
|
%{mvn_package} ":%{name}-mingw" components
|
2019-04-12 16:53:42 +02:00
|
|
|
%{mvn_package} ":native-maven-plugin" native-maven-plugin
|
|
|
|
|
2022-03-25 08:59:48 +01:00
|
|
|
mkdir -p maven-native-components/maven-native-{bcc,generic-c,manager,msvc}/src/main/resources/META-INF/plexus/
|
|
|
|
cp -a %{SOURCE1} maven-native-components/maven-native-bcc/src/main/resources/META-INF/plexus/components.xml
|
|
|
|
cp -a %{SOURCE2} maven-native-components/maven-native-generic-c/src/main/resources/META-INF/plexus/components.xml
|
|
|
|
cp -a %{SOURCE3} maven-native-components/maven-native-manager/src/main/resources/META-INF/plexus/components.xml
|
|
|
|
cp -a %{SOURCE4} maven-native-components/maven-native-msvc/src/main/resources/META-INF/plexus/components.xml
|
|
|
|
|
2019-04-12 16:53:42 +02:00
|
|
|
%build
|
|
|
|
|
2022-03-25 08:59:48 +01:00
|
|
|
%{mvn_build} -f -s -- -Dmojo.java.target=1.8 -Dmaven.test.failure.ignore=true -Dsource=8
|
2019-04-12 16:53:42 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%mvn_install
|
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
|
|
|
|
%files -f .mfiles-%{name}
|
|
|
|
%dir %{_javadir}/%{name}
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
|
|
|
%files components -f .mfiles-components
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
|
|
|
%files -n native-maven-plugin -f .mfiles-native-maven-plugin
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
|
|
|
%changelog
|