File java-monasca-common.spec of Package java-monasca-common
#
# spec file for package java-monasca-common
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
# The source tarball contains both a Python and a Java implementation of this
# library and uses the Python implementation's version for its version. The
# Java implementation's does not align with it, so we need to define it here.
%define version_unconverted 2.11.1.dev4
Name: java-monasca-common
# Note: this is the version of the monasca-common library's Java implementation.
Version: 2.11.1~a0~dev4
Release: 0
Summary: OpenStack Monasca: common Java classes
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://github.com/openstack/monasca-common
Source0: https://tarballs.openstack.org/monasca-common/monasca-common-stable-rocky.tar.gz
Source1: build.sh
Source2: %{name}-rpmlintrc
Source3: README
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: java-devel
# Note: depending on whether a new version of this package added new dependencies, you may
# have to rebuild java-monasca-common-kit when updating this package.
BuildRequires: java-monasca-common-kit
BuildRequires: xz
BuildArch: noarch
Provides: mvn(monasca:monasca-common) == %{version}
Requires: java
BuildRequires: fdupes
%description
Common classes used by OpenStack Monasca's Java based components
%package devel
Summary: OpenStack Monasca: common Java class sources
Group: Development/Libraries/Java
%description devel
This package contains the complete source tree as it looks after a build. Use
these sources to `mvn install` this library into the local maven repository
when building packages that require it as a build dependency.
%prep
%setup -q -n monasca-common-%{version_unconverted}
cp -f %{SOURCE1} .
cp %{SOURCE3} .
cp -Rf %{_datadir}/tetra ../kit
%build
sh build.sh
%install
mkdir -p %{buildroot}%{_javadir}
cp -a ../kit/m2/monasca-common %{buildroot}%{_javadir}/monasca-common/
%files
%defattr(-,root,root)
%doc README LICENSE
%{_javadir}/monasca-common/
%changelog