File element-call.spec of Package element-call

#
# 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/
#

%define element_basedir    %{_datadir}/%{name}/
#define pkg_version        0.16.0-rc.0
%define pkg_version        0.15.0

Name:           element-call
Version:        %(echo %{pkg_version} | perl -p -e 's|\A(\d+\.\d+\.\d+)-rc\.?(\d+)|$1~rc$2|g')
Release:        0
Summary:        Group calls powered by Matrix
License:        AGPL-3.0
Url:            https://element.io/
Source:         https://github.com/element-hq/element-call/releases/download/v%{pkg_version}/element-call-%{pkg_version}.tar.gz
Source1:        https://raw.githubusercontent.com/element-hq/element-call/refs/heads/livekit/LICENSE-COMMERCIAL
Source2:        https://raw.githubusercontent.com/element-hq/element-call/refs/heads/livekit/README.md
Source3:        https://raw.githubusercontent.com/element-hq/element-call/refs/heads/livekit/LICENSE-AGPL-3.0
Source4:        README.SUSE
BuildRequires:  rsync
BuildArch:      noarch
%description
The world's first 🌐 decentralized and 🤝 federated video conferencing solution powered by the Matrix protocol.

%prep
%autosetup -p1

%build

%install
install -D -d -m 0755 %{buildroot}%{element_basedir}
rsync -av $PWD/       %{buildroot}%{element_basedir}/
cp ${S:1} %{S:2} %{S:3} %{S:4} .

%files
%license LICENSE*
%doc README.SUSE README.md
%dir %{element_basedir}
%{element_basedir}/assets/
%{element_basedir}/index.html
%{element_basedir}/favicon.png

%changelog
openSUSE Build Service is sponsored by