File sypper.spec of Package sypper
# Copyright (C) 2024 SUSE LLC
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, see <http://www.gnu.org/licenses/>.
Name: sypper
Version: 0.12
Release: 0
License: GPL-2.0-or-later
Summary: Simple perl utility emulating zypper download
Group: System/Packages
Url: https://github.com/andrii-suse/sypper
Source: %{name}-%{version}.tar.xz
%{perl_requires}
Requires: perl-base = %{perl_version}
Requires: perl-solv
Requires: perl-Mojolicious
Requires: perl-Config-IniFiles
Requires: perl-IO-Socket-SSL
Requires: sypplite
BuildRequires: make
BuildArch: noarch
%description
Investigate and benchmark various package download strategies
%package -n sypplite
Summary: Concurrent files download comman line tool
Group: Productivity/Networking/Web/Utilities
Requires: perl-Mojolicious
Requires: perl-Config-IniFiles
Requires: perl-IO-Socket-SSL
Requires: util-linux-systemd
BuildRequires: make
BuildArch: noarch
%description -n sypplite
The tool can concurently download multiple files based on a specification in
requests files which have special format.
Each file starts with a baseurl and then lines of files to grab from that url.
%prep
%setup -q
%build
%install
%make_install
mkdir -p %{buildroot}%{_bindir}
ln -s %{_datadir}/sypper/script/sypper %{buildroot}%{_bindir}/sypper
ln -s %{_datadir}/sypper/script/sypplite %{buildroot}%{_bindir}/sypplite
install -Dd -m 0750 %{buildroot}%{_prefix}/share/sypper/predownload
%{__install} predownload/sypplite.sh %{buildroot}%{_prefix}/share/sypper/predownload/sypplite.sh
%files
%{_bindir}/sypper
%files -n sypplite
%{_datadir}/sypper
%{_bindir}/sypplite
%{_prefix}/share/sypper/predownload
%changelog