File newsboat.spec of Package newsboat

# spec file for package newsboat
# Copyright (c) 2021 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

Name:           newsboat
Version:        2.23
Release:        0
Summary:        RSS/Atom Feed Reader for Text Terminals
License:        MIT
Group:          Productivity/Networking/Web/Browsers
Source3:        vendor.tar.xz
# pbleser: introduce OPTFLAGS make variable, instead of hard-coded -ggdb
Patch0:         newsbeuter-makefile.patch
BuildRequires:  cargo
BuildRequires:  gcc-c++
BuildRequires:  gettext-devel
BuildRequires:  glibc-devel
BuildRequires:  libcurl-devel >= 7.18.0
BuildRequires:  libjson-c-devel >= 0.11
BuildRequires:  libopenssl-devel
BuildRequires:  libstdc++-devel
BuildRequires:  libstfl-devel >= 0.21
BuildRequires:  libxml2-devel
BuildRequires:  pkgconfig
BuildRequires:  rust >= 1.25.0
BuildRequires:  sqlite3-devel >= 3.5
BuildRequires:  zlib-devel
BuildRequires:  rubygem(asciidoctor)
Recommends:     %{name}-lang
Recommends:     web_browser
Provides:       newsbeuter = %{version}
Obsoletes:      newsbeuter <= 2.9

Newsboat is an RSS/Atom feedreader. RSS and Atom are a number of
widely-used XML formats to transmit, publish and syndicate articles,
for example news or blog articles. Newsboat is designed to be used on
text terminals.


%setup -qa3
%patch0 -p1
mkdir cargo-home
cat >cargo-home/config <<EOF
registry = ''
replace-with = 'vendored-sources'
directory = './vendor'
sed -i 's/#!\/usr\/bin\/env perl/#!\/usr\/bin\/perl/' ./contrib/
sed -i 's/#!\/usr\/bin\/env python3/#!\/usr\/bin\/python3/' ./doc/examples/
sed -i 's/#!\/usr\/bin\/env python3/#!\/usr\/bin\/python3/' ./contrib/
sed -i 's/#!\/usr\/bin\/env bash/#!\/usr\/bin\/bash/' ./contrib/image-preview/nbrun
sed -i 's/#!\/usr\/bin\/env bash/#!\/usr\/bin\/bash/' ./contrib/image-preview/vifmimg

export CARGO_HOME=`pwd`/cargo-home/

%make_build \

export CARGO_HOME=`pwd`/cargo-home/
%make_install prefix="%{_prefix}" docdir=%{_docdir}/%{name}

for l in zh; do
    rm -rf "%{buildroot}%{_datadir}/locale/${l}"

%find_lang %{name}

%license LICENSE
%dir %{_docdir}/%{name}/examples
%dir %{_datadir}/icons/hicolor/
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by