File oshi.spec of Package oshi
#
# spec file for package oshi
#
# 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: oshi
Version: 6.6.3
Release: 0
Summary: Native Operating System and Hardware Information
License: MIT
Group: Development/Libraries/Java
URL: https://oshi.ooo/
Source0: https://github.com/%{name}/%{name}/archive/refs/tags/%{name}-parent-%{version}.tar.gz
Patch0: %{name}-manifest.patch
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: mvn(biz.aQute.bnd:bnd-maven-plugin)
BuildRequires: mvn(net.java.dev.jna:jna)
BuildRequires: mvn(net.java.dev.jna:jna-platform)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildArch: noarch
%description
OSHI is a free JNA-based (native) Operating System and Hardware Information
library for Java. It does not require the installation of any additional native
libraries and aims to provide a cross-platform implementation to retrieve
system information, such as OS version, processes, memory and CPU usage, disks
and partitions, devices, sensors, etc.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n %{name}-%{name}-parent-%{version}
%patch -P 0 -p1
%pom_disable_module %{name}-demo
%pom_disable_module %%{name}-dist
%pom_remove_plugin :maven-assembly-plugin
%pom_remove_plugin :maven-enforcer-plugin
%pom_remove_plugin de.sormuras.junit:junit-platform-maven-plugin
%pom_remove_plugin io.github.git-commit-id:git-commit-id-maven-plugin
%pom_remove_plugin org.jacoco:jacoco-maven-plugin
%pom_remove_plugin de.thetaphi:forbiddenapis
rm -rf .mvn
%build
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)
%install
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%license LICENSE
%doc {CHANGELOG,README}.md
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog