File get_iplayer.spec of Package get_iplayer

#
# spec file for package get_iplayer
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2021 Tejas Guruswamy <tejas.guruswamy@opensuse.org>
#
# 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:           get_iplayer
Version:        3.36
Release:        0
Summary:        Lists, Records and Streams BBC iPlayer TV and Radio programmes
License:        GPL-3.0-or-later
Group:          Productivity/Multimedia/Other
URL:            https://github.com/get-iplayer/get_iplayer
Source0:        https://github.com/%{name}/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz
BuildRequires:  perl(LWP)
BuildRequires:  perl(LWP::Protocol::https)
BuildRequires:  perl(XML::LibXML)
Requires:       perl(CGI)
Requires:       perl(JSON::PP)
Requires:       perl(LWP)
Requires:       perl(LWP::Protocol::https)
Requires:       perl(Mojolicious)
Requires:       perl(XML::LibXML)
Recommends:     AtomicParsley
Suggests:       ffmpeg
BuildArch:      noarch

%description
get_iplayer is a tool for listing, recording and streaming BBC iPlayer TV
programmes, and other programmes via 3rd-party plugins.

%prep
%setup -q

%build
./get_iplayer --manpage get_iplayer.1
gzip get_iplayer.1

%install
install -p -D -m0755 get_iplayer %{buildroot}%{_bindir}/get_iplayer
mkdir -p %{buildroot}%{_datadir}/get_iplayer
install -p -D -m0755 get_iplayer.cgi %{buildroot}%{_datadir}/get_iplayer
install -p -D -m0644 get_iplayer.1.gz %{buildroot}%{_mandir}/man1/get_iplayer.1.gz

sed -i 's#/usr/bin/env perl#/usr/bin/perl#' %{buildroot}%{_bindir}/get_iplayer %{buildroot}%{_datadir}/get_iplayer/get_iplayer.cgi

%files
%license LICENSE.txt
%doc CHANGELOG.md CONTRIBUTORS README.md
%{_bindir}/get_iplayer
%dir %{_datadir}/get_iplayer
%{_datadir}/get_iplayer/get_iplayer.cgi
%{_mandir}/man1/get_iplayer.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by