File jcodings.spec of Package jcodings

#
# spec file for package jcodings
#
# Copyright (c) 2022 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/
#


%global commit_hash d50ee0e
%global tag_hash d50ee0e
Name:           jcodings
Version:        1.0.9
Release:        0
Summary:        Java-based codings helper classes for Joni and JRuby
License:        MIT
URL:            https://github.com/jruby/%{name}
Source0:        https://github.com/jruby/jcodings/tarball/%{version}/jruby-%{name}-%{version}-0-g%{commit_hash}.tar.gz
BuildRequires:  java-devel >= 1.8
BuildRequires:  maven-local
BuildRequires:  mvn(org.apache.maven.plugins:maven-source-plugin)
BuildArch:      noarch

%description
Java-based codings helper classes for Joni and JRuby.

%prep
%setup -q -n jruby-%{name}-%{tag_hash}

find -name '*.class' -delete
find -name '*.jar' -delete

%{mvn_file} : %{name}

%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:source" 1.8
%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:target" 1.8

%pom_xpath_remove "pom:build/pom:extensions"

%pom_remove_plugin :maven-javadoc-plugin

%build
echo "See %{url} for more info about the %{name} project." > README.txt
%{mvn_build} -fj

%install
%mvn_install

%files -f .mfiles
%doc README.txt

%changelog
openSUSE Build Service is sponsored by