File crystal.spec of Package crystal

#
# spec file for package crystal
#
# Copyright (c) 2023 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 version_suffix 1.17
%global version_current 1.17.0
%global version_previous 1.16.0

%define obsolete_crystal_versioned() \
Obsoletes:      %{1}1.16%{?2:-%{2}} \
Obsoletes:      %{1}1.15%{?2:-%{2}} \
Obsoletes:      %{1}1.14%{?2:-%{2}} \
Obsoletes:      %{1}1.13%{?2:-%{2}} \
Obsoletes:      %{1}1.12%{?2:-%{2}} \
Obsoletes:      %{1}1.11%{?2:-%{2}} \
Obsoletes:      %{1}1.10%{?2:-%{2}} \
Obsoletes:      %{1}1.9%{?2:-%{2}} \
Obsoletes:      %{1}1.8%{?2:-%{2}} \
Obsoletes:      %{1}1.7%{?2:-%{2}} \
Obsoletes:      %{1}1.6%{?2:-%{2}} \
Obsoletes:      %{1}1.5%{?2:-%{2}} \
Obsoletes:      %{1}1.4%{?2:-%{2}} \
Obsoletes:      %{1}1.3%{?2:-%{2}} \
Obsoletes:      %{1}1.2%{?2:-%{2}}

Name:           crystal
Version:        %{version_current}
Release:        0
License:        Apache-2.0
Summary:        A programming language for humans and computers
URL:            https://github.com/crystal-lang/crystal
Source0:        README
Requires:       crystal%{version_suffix}
%if ! 0%{?rhel}
Recommends:     shards
%endif
%obsolete_crystal_versioned crystal

%description
Crystal is a general-purpose, object-oriented programming language.
With syntax inspired by Ruby, it is a compiled language with static type-checking,
serving both, humans and computers

%prep

%build

%install
install -D -m 0644 %{S:0} %{buildroot}%{_datadir}/doc/packages/crystal/README

%files
%defattr(-,root,root,-)
%doc %{_datadir}/doc/packages/crystal

%changelog
openSUSE Build Service is sponsored by