Files
perl-Flickr-API2/perl-Flickr-API2.spec

116 lines
3.6 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package perl-Flickr-API2
#
# 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 Flickr-API2
Name: perl-Flickr-API2
Version: 2.500.0
Release: 0
# 2.50 -> normalize -> 2.500.0
%define cpan_version 2.50
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Perl bindings to Flickr API
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/T/TJ/TJC/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
2025-08-12 18:14:15 +02:00
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Compress::Zlib)
BuildRequires: perl(Encode::Base58)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.59
BuildRequires: perl(HTTP::Message) >= 1.56
BuildRequires: perl(HTTP::Request)
BuildRequires: perl(HTTP::Response)
BuildRequires: perl(JSON)
BuildRequires: perl(LWP::Online)
BuildRequires: perl(LWP::Protocol::https)
BuildRequires: perl(LWP::UserAgent)
BuildRequires: perl(Moo)
BuildRequires: perl(Retry)
BuildRequires: perl(Test::Exception)
BuildRequires: perl(URI) >= 1.18
BuildRequires: perl(parent)
Requires: perl(Compress::Zlib)
Requires: perl(Encode::Base58)
Requires: perl(HTTP::Message) >= 1.56
Requires: perl(HTTP::Request)
Requires: perl(HTTP::Response)
Requires: perl(JSON)
Requires: perl(LWP::Protocol::https)
Requires: perl(LWP::UserAgent)
Requires: perl(Moo)
Requires: perl(Retry)
Requires: perl(URI) >= 1.18
Requires: perl(parent)
Provides: perl(Flickr::API2) = %{version}
Provides: perl(Flickr::API2::Base)
Provides: perl(Flickr::API2::Interestingness)
Provides: perl(Flickr::API2::People)
Provides: perl(Flickr::API2::Photo)
Provides: perl(Flickr::API2::Photos)
Provides: perl(Flickr::API2::Raw)
Provides: perl(Flickr::API2::Request) = 2.0.0
Provides: perl(Flickr::API2::Test)
Provides: perl(Flickr::API2::User)
%undefine __perllib_provides
Recommends: perl(JSON::XS)
%{perl_requires}
%description
A simple interface for using the Flickr API.
The API calls are made via Perl helper methods, and the data returned is
converted into Perl objects that can have further methods called upon them.
So for instance, you can fetch a user by username, by:
my $user = $api->people->findByUsername('wintrmute')
You can then ask for photos by that user, by calling:
my @photos = $user->getPublicPhotos;
And from there, you can query titles, URLs, etc of the photos with methods
such as:
$photos[0]->title
So far only a few helper methods have been written, but more are coming.
Patches adding functionality will be greatly appreciated!
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
PERL_USE_UNSAFE_INC=1 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
%changelog