File java-monasca-common.spec of Package java-monasca-common

#
# spec file for package java-monasca-common
#
# Copyright (c) 2017 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 http://bugs.opensuse.org/
#


# The jar files' version usually has a "SNAPSHOT" appended.
%define jar_version %{version}-SNAPSHOT

# 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 tarball_version 1.5.0

Name:           java-monasca-common
# Note: this is the version of the monasca-common library's Java implementation.
Version:        1.2.1
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-%{tarball_version}.tar.gz
Source1:        build.sh
Source2:        %{name}-rpmlintrc
Source3:        README
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  java-devel
BuildRequires:  java-monasca-common-kit == %{version}
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 -c -n src
cp -f %{SOURCE1} .
cp %{SOURCE3} .
cp -Rf %{_datadir}/tetra ../kit

%build
cp -p monasca-common*/LICENSE .
cd ..
sh src/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
openSUSE Build Service is sponsored by