File osgi-resource.spec of Package osgi-resource

#
# spec file for package osgi-resource
#
# 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:           osgi-resource
Version:        1.0.1
Release:        0
Summary:        OSGi Resource
License:        Apache-2.0
Group:          Development/Libraries/Java
URL:            https://www.osgi.org
Source0:        https://repo1.maven.org/maven2/org/osgi/org.osgi.resource/%{version}/org.osgi.resource-%{version}-sources.jar
Source1:        https://repo1.maven.org/maven2/org/osgi/org.osgi.resource/%{version}/org.osgi.resource-%{version}.pom
Source2:        https://www.apache.org/licenses/LICENSE-2.0.txt
BuildRequires:  fdupes
BuildRequires:  maven-local
BuildRequires:  mvn(org.osgi:org.osgi.dto)
BuildRequires:  mvn(org.osgi:osgi.annotation)
BuildRequires:  unzip
BuildArch:      noarch

%description
OSGi Companion Code for org.osgi.resource.

%package javadoc
Summary:        API documentation for %{name}
Group:          Documentation/HTML

%description javadoc
API documentation for %{name}.

%prep
%setup -q -c

mkdir -p src/main/java
mv org src/main/java/
cp -p %{SOURCE1} pom.xml
cp -p %{SOURCE2} LICENSE-2.0.txt

%pom_add_dep org.osgi:org.osgi.dto

%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-2.0.txt

%files javadoc -f .mfiles-javadoc
%license LICENSE-2.0.txt

%changelog
openSUSE Build Service is sponsored by