2017-02-13 09:22:53 +00:00
|
|
|
#
|
|
|
|
# spec file for package urlscan
|
|
|
|
#
|
2023-06-02 13:55:23 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2017-02-13 09:22:53 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2020-03-13 07:39:09 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-02-13 09:22:53 +00:00
|
|
|
#
|
|
|
|
|
2017-03-13 07:13:18 +00:00
|
|
|
|
2021-05-17 07:11:54 +00:00
|
|
|
%define python_flavor python3
|
2017-02-13 09:22:53 +00:00
|
|
|
Name: urlscan
|
2023-06-02 13:55:23 +00:00
|
|
|
Version: 1.0.0
|
2017-02-13 09:22:53 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: An other URL extractor/viewer
|
2018-12-12 10:03:57 +00:00
|
|
|
License: GPL-2.0-or-later
|
2017-02-13 09:22:53 +00:00
|
|
|
Group: Productivity/Networking/Web/Browsers
|
2020-03-13 07:39:09 +00:00
|
|
|
URL: https://github.com/firecat53/urlscan
|
2017-02-13 09:22:53 +00:00
|
|
|
Source0: https://github.com/firecat53/urlscan/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
Source1: muttrc
|
2023-06-02 13:55:23 +00:00
|
|
|
BuildRequires: %{python_module base}
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module hatch_vcs}
|
|
|
|
BuildRequires: %{python_module hatchling}
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: %{python_module wheel}
|
2022-08-04 13:28:45 +00:00
|
|
|
BuildRequires: fdupes
|
2023-06-02 13:55:23 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2022-08-04 13:28:45 +00:00
|
|
|
BuildRequires: sed
|
2023-06-02 13:55:23 +00:00
|
|
|
Recommends: %{name}-doc = %{version}
|
|
|
|
Requires: %{python_module base}
|
|
|
|
Requires: %{python_module urwid >= 1.2.1}
|
2017-02-13 09:22:53 +00:00
|
|
|
BuildArch: noarch
|
2023-06-02 13:55:23 +00:00
|
|
|
%global myname %name
|
|
|
|
%python_subpackages
|
2017-02-13 09:22:53 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
The urlscan utility displays URLs found in an email message with
|
|
|
|
the respective context. Selecting an URL uses the Python webbrowser
|
|
|
|
module to determine which browser to open. It also supports
|
|
|
|
quoted-printable and base64 encoding.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2023-06-02 13:55:23 +00:00
|
|
|
install -m 0644 %{SOURCE1} muttrc
|
2017-02-13 09:22:53 +00:00
|
|
|
|
|
|
|
%build
|
2023-06-02 13:55:23 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION="%{version}"
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION
|
|
|
|
%pyproject_wheel
|
2017-02-13 09:22:53 +00:00
|
|
|
|
|
|
|
%install
|
2023-06-02 13:55:23 +00:00
|
|
|
%pyproject_install
|
|
|
|
%python_expand mkdir -p %{buildroot}%{_defaultdocdir}/%{$python_prefix}-%{myname}
|
|
|
|
if test -e %{buildroot}%{_datadir}/doc/%{myname}*
|
2022-08-04 13:28:45 +00:00
|
|
|
then
|
2023-06-02 13:55:23 +00:00
|
|
|
rm -f %{buildroot}%{_datadir}/doc/%{myname}*/LICENSE
|
2022-08-04 13:28:45 +00:00
|
|
|
fi
|
|
|
|
rm -rf %{buildroot}%{_datadir}/doc/%{name}*
|
2023-06-02 13:55:23 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/%{myname}
|
|
|
|
%python_clone -a %{buildroot}%{_mandir}/man1/%{myname}.1
|
|
|
|
%python_expand chmod 755 %{buildroot}%{$python_sitelib}/%{myname}/__main__*
|
|
|
|
%python_expand sed -ri '1 { s@(/usr/bin/)env *@\1@ }' %{buildroot}%{$python_sitelib}/%{myname}/__main__*
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2017-02-13 09:22:53 +00:00
|
|
|
|
2023-06-02 13:55:23 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative %{myname}
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative %{myname}
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%python_alternative %{_bindir}/%{myname}
|
|
|
|
%python_alternative %{_mandir}/man1/%{myname}.1%{?ext_man}
|
|
|
|
%{python_sitelib}/%{myname}
|
|
|
|
%{python_sitelib}/%{myname}-%{version}*-info
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md muttrc
|
2017-02-13 09:22:53 +00:00
|
|
|
|
|
|
|
%changelog
|