add loongarch64 support for os-maven-plugin
This commit is contained in:
parent
2f60a2c47c
commit
09d0b7cb1c
39
0001-add-loongarch64-support-for-os-maven-plugin.patch
Normal file
39
0001-add-loongarch64-support-for-os-maven-plugin.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 82024c1b0006e2851713a3b0e78bf25aa81d64dd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||||
|
Date: Thu, 9 Mar 2023 09:06:32 +0000
|
||||||
|
Subject: [PATCH] add loongarch64 support for os-maven-plugin
|
||||||
|
|
||||||
|
---
|
||||||
|
README.md | 1 +
|
||||||
|
src/main/java/kr/motd/maven/os/Detector.java | 3 +++
|
||||||
|
2 files changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/README.md b/README.md
|
||||||
|
index f05e7d2..14b1e6f 100644
|
||||||
|
--- a/README.md
|
||||||
|
+++ b/README.md
|
||||||
|
@@ -30,6 +30,7 @@
|
||||||
|
* `aarch_64`
|
||||||
|
* `ppc_32`
|
||||||
|
* `ppc_64`
|
||||||
|
+ * `loongarch_64`
|
||||||
|
|
||||||
|
You can also use the `${os.detected.classifier}` property, which is a shortcut of `${os.detected.name}-${os.detected.arch}`.
|
||||||
|
|
||||||
|
diff --git a/src/main/java/kr/motd/maven/os/Detector.java b/src/main/java/kr/motd/maven/os/Detector.java
|
||||||
|
index 9dd6688..202652f 100644
|
||||||
|
--- a/src/main/java/kr/motd/maven/os/Detector.java
|
||||||
|
+++ b/src/main/java/kr/motd/maven/os/Detector.java
|
||||||
|
@@ -133,6 +133,9 @@ public abstract class Detector {
|
||||||
|
if (value.equals("ppc64")) {
|
||||||
|
return "ppc_64";
|
||||||
|
}
|
||||||
|
+ if (value.equals("loongarch64")) {
|
||||||
|
+ return "loongarch_64";
|
||||||
|
+ }
|
||||||
|
|
||||||
|
return UNKNOWN;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: os-maven-plugin
|
Name: os-maven-plugin
|
||||||
Version: 1.2.3
|
Version: 1.2.3
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Maven plugin for generating platform-dependent properties
|
Summary: Maven plugin for generating platform-dependent properties
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://github.com/trustin/os-maven-plugin/
|
URL: https://github.com/trustin/os-maven-plugin/
|
||||||
@ -10,6 +10,7 @@ BuildArch: noarch
|
|||||||
Source0: https://github.com/trustin/%{name}/archive/%{name}-%{version}.Final.tar.gz
|
Source0: https://github.com/trustin/%{name}/archive/%{name}-%{version}.Final.tar.gz
|
||||||
|
|
||||||
Patch0: 0001-Port-to-current-plexus-utils.patch
|
Patch0: 0001-Port-to-current-plexus-utils.patch
|
||||||
|
Patch1: 0001-add-loongarch64-support-for-os-maven-plugin.patch
|
||||||
|
|
||||||
BuildRequires: maven-local mvn(junit:junit) mvn(org.apache.maven:maven-core)
|
BuildRequires: maven-local mvn(junit:junit) mvn(org.apache.maven:maven-core)
|
||||||
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
|
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
|
||||||
@ -36,7 +37,13 @@ Summary: API documentation for %{name}
|
|||||||
This package provides %{summary}.
|
This package provides %{summary}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{name}-%{version}.%{vertag} -p1
|
%setup -n %{name}-%{name}-%{version}.%{vertag}
|
||||||
|
%patch0 -p1
|
||||||
|
%if 0%(test `uname -m` == "loongarch64" && echo 1)
|
||||||
|
%patch1 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Remove Eclipse plugin (not needed in Fedora)
|
# Remove Eclipse plugin (not needed in Fedora)
|
||||||
%pom_remove_dep org.eclipse:ui
|
%pom_remove_dep org.eclipse:ui
|
||||||
@ -59,5 +66,8 @@ find -name plugin.xml -delete
|
|||||||
%doc LICENSE.txt
|
%doc LICENSE.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Mar 9 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 1.2.3-2
|
||||||
|
- add loongarch64 support for os-maven-plugin
|
||||||
|
|
||||||
* Wed Jul 29 2020 wangxiao <wangxiao65@huawei.com> - 1.2.3-1
|
* Wed Jul 29 2020 wangxiao <wangxiao65@huawei.com> - 1.2.3-1
|
||||||
- package init
|
- package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user