Files
perl-URI-Title/perl-URI-Title.spec
2025-08-12 18:18:23 +02:00

99 lines
3.0 KiB
RPMSpec

#
# spec file for package perl-URI-Title
#
# Copyright (c) 2024 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 cpan_name URI-Title
Name: perl-URI-Title
Version: 1.904.0
Release: 0
# 1.904 -> normalize -> 1.904.0
%define cpan_version 1.904
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Get the titles of things on the web in a sensible way
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/B/BO/BOOK/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(File::Type) >= 0.22
BuildRequires: perl(HTML::Entities)
BuildRequires: perl(HTML::Parser) >= 3.45
BuildRequires: perl(HTTP::Request)
BuildRequires: perl(HTTP::Response)
BuildRequires: perl(Image::Size)
BuildRequires: perl(LWP::UserAgent)
BuildRequires: perl(MP3::Info)
BuildRequires: perl(Module::Pluggable) >= 1.2
Requires: perl(File::Type) >= 0.22
Requires: perl(HTML::Entities)
Requires: perl(HTML::Parser) >= 3.45
Requires: perl(HTTP::Request)
Requires: perl(HTTP::Response)
Requires: perl(Image::Size)
Requires: perl(LWP::UserAgent)
Requires: perl(MP3::Info)
Requires: perl(Module::Pluggable) >= 1.2
Provides: perl(URI::Title) = %{version}
Provides: perl(URI::Title::HTML) = %{version}
Provides: perl(URI::Title::Image) = %{version}
Provides: perl(URI::Title::MP3) = %{version}
Provides: perl(URI::Title::PDF) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
I keep having to find the title of things on the web. This seems like a
really simple request, just get() the object, parse for a title tag, you're
done. Ha, I wish. There are several problems with this approach:
* What if the resource is on a very slow server? Do we wait for ever or
what?
* What if the resource is a 900 gig file? You don't want to download that.
* What if the page title isn't in a title tag, but is buried in the HTML
somewhere?
* What if the resource is an MP3 file, or a word document or something?
* ...
So, let's solve these issues once.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes README
%license LICENSE
%changelog