File groovy.spec of Package groovy

#
# spec file for package groovy
#
# 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/
#


Name:           groovy
Version:        4.0.20
Release:        0
Summary:        Dynamic language for the Java Platform
License:        Apache-2.0 AND BSD-3-Clause AND EPL-1.0 AND SUSE-Public-Domain AND CC-BY-2.5
Group:          Development/Libraries/Java
URL:            https://groovy-lang.org
Source0:        https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/apache-%{name}-binary-%{version}.zip
Source1:        groovy.desktop
Source2:        groovy.png
BuildRequires:  desktop-file-utils
BuildRequires:  java-devel >= 1.8
BuildRequires:  unzip
# optional in pom.xml, but present in upstream binary tarball
Requires:       xpp3-minimal
BuildArch:      noarch

%description
Groovy is an agile and dynamic language for the Java Virtual Machine,
built upon Java with features inspired by languages like Python, Ruby and
Smalltalk.  It seamlessly integrates with all existing Java objects and
libraries and compiles straight to Java bytecode so you can use it anywhere
you can use Java.

%prep
%setup -q -n %{name}-%{version}

%build
# Nothing to do here...

%install
install -d %{buildroot}/%{_datadir}/%{name}
install -d %{buildroot}/%{_bindir}
install -d %{buildroot}/%{_datadir}/bash-completion/completions
cp -r lib conf %{buildroot}/%{_datadir}/%{name}
cp bin/* %{buildroot}/%{_bindir}/
rm %{buildroot}/%{_bindir}/*completion
rm %{buildroot}/%{_bindir}/*.bat
install -Dm644 bin/*completion %{buildroot}/%{_datadir}/bash-completion/completions
install -Dm644 LICENSE -t %{buildroot}/%{_datadir}/licenses/%{name}

# Desktop icon
install -d %{buildroot}/%{_datadir}/pixmaps
install -d %{buildroot}/%{_datadir}/applications
install -p -m644 %{SOURCE2} %{buildroot}/%{_datadir}/pixmaps/
desktop-file-install --dir %{buildroot}/%{_datadir}/applications %{SOURCE1}

%files
%{_datadir}/%{name}
%{_bindir}/*
%{_datadir}/pixmaps/*
%{_datadir}/applications/*
%{_datadir}/bash-completion/completions/*
%dir %{_datadir}/licenses/groovy 
%{_datadir}/licenses/groovy/LICENSE

%changelog
openSUSE Build Service is sponsored by