6
0
forked from pool/unit-api

Accepting request 781458 from home:fstrba:maven

new package

OBS-URL: https://build.opensuse.org/request/show/781458
OBS-URL: https://build.opensuse.org/package/show/Java:packages/unit-api?expand=0&rev=1
This commit is contained in:
2020-03-04 14:06:56 +00:00
committed by Git OBS Bridge
commit 39f41cd13e
5 changed files with 157 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
unit-api-1.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7e0b5fdeae11ca15d273f529828b130e9fce63b60dfd8772f9b698a18263e3af
size 79769

4
unit-api.changes Normal file
View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Wed Mar 4 11:04:58 UTC 2020 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of unit-api 1.0

126
unit-api.spec Normal file
View File

@@ -0,0 +1,126 @@
#
# spec file for package unit-api
#
# Copyright (c) 2020 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: unit-api
Version: 1.0
Release: 0
Summary: JSR 363 - Units of Measurement API
# JSR-363 has been approved as an official JCP standard (https://jcp.org/en/jsr/results?id=5877)
License: BSD-3-Clause
Group: Development/Libraries/Java
URL: https://unitsofmeasurement.github.io/
Source0: https://github.com/unitsofmeasurement/unit-api/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: java-devel >= 8
BuildRequires: maven-local
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
BuildArch: noarch
%description
The Unit of Measurement library provides a set of
Java language programming interfaces for handling
units and quantities. The interfaces provide a layer
which separates client code, which would call the
API, from library code, which implements the API.
The specification contains Interfaces and abstract
classes with methods for unit operations:
* Checking of unit compatibility
* Expression of a quantity in various units
* Arithmetic operations on units
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q
find . -name "*.class" -print -delete
find . -name "*.jar" -print -delete
# Not available plugins
%pom_remove_plugin :coveralls-maven-plugin
%pom_remove_plugin :findbugs-maven-plugin
%pom_remove_plugin :formatter-maven-plugin
# Useless tasks
%pom_remove_plugin :jacoco-maven-plugin
%pom_remove_plugin :license-maven-plugin
%pom_remove_plugin :maven-checkstyle-plugin
%pom_remove_plugin :maven-javadoc-plugin
%pom_remove_plugin :maven-pmd-plugin
%pom_remove_plugin :maven-site-plugin
%pom_remove_plugin :maven-source-plugin
# Remove duplicate pom entry
%pom_remove_plugin :maven-jar-plugin
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin:'${maven.jar.version}' . "
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>"
# Fix pom entries
%pom_remove_plugin :maven-bundle-plugin
%pom_add_plugin org.apache.felix:maven-bundle-plugin:'${felix.version}' . "
<extensions>true</extensions>
<configuration>
<instructions>
<Specification-Title>\${project.name}</Specification-Title>
<Specification-Version>\${project.version}</Specification-Version>
<Specification-Vendor>\${project.organization.name}</Specification-Vendor>
<Implementation-Vendor>Unit-API contributors</Implementation-Vendor>
<Implementation-URL>\${project.organization.url}</Implementation-URL>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>"
%{mvn_file} : %{name}
%{mvn_file} :%{name}:tests: %{name}-tests
%{mvn_package} :%{name}:tests: %{name}
%build
%{mvn_build} -f -- -Dsource=8
%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%doc README.md
%license LICENSE.txt
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%changelog