# # spec file for package perl-Finance-Quote # # Copyright (c) 2023 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 Finance-Quote Name: perl-Finance-Quote Version: 1.54 Release: 1.3 #Upstream: GPL-1.0-or-later License: GPL-2.0-or-later Summary: Get stock and mutual fund quotes from various exchanges URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml # PATCH-FIX-UPSTREAM https://github.com/finance-quote/finance-quote/commit/504fcc1ae35fd9c1e59949281e2939bda6a971a5 Patch0: https://github.com/finance-quote/finance-quote/commit/504fcc1ae35f.patch#/Fix-FTFunds-regex.patch # PATCH-FIX-UPSTREAM https://rt.cpan.org/Public/Bug/Display.html?id=66235 Patch1: perl-Finance-Quote-66235-Cdnfundlibrary-row.patch BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Date::Manip) BuildRequires: perl(Date::Range) BuildRequires: perl(Date::Simple) BuildRequires: perl(DateTime) BuildRequires: perl(DateTime::Duration) BuildRequires: perl(DateTime::Format::ISO8601) BuildRequires: perl(DateTime::Format::Strptime) BuildRequires: perl(HTML::Entities) BuildRequires: perl(HTML::TableExtract) BuildRequires: perl(HTML::TokeParser) BuildRequires: perl(HTML::TokeParser::Simple) BuildRequires: perl(HTML::TreeBuilder) BuildRequires: perl(HTML::TreeBuilder::XPath) BuildRequires: perl(HTTP::Cookies) BuildRequires: perl(HTTP::Headers) BuildRequires: perl(HTTP::Request) BuildRequires: perl(HTTP::Request::Common) BuildRequires: perl(HTTP::Status) BuildRequires: perl(IO::Uncompress::Unzip) BuildRequires: perl(JSON) BuildRequires: perl(LWP::Protocol::https) BuildRequires: perl(LWP::Simple) BuildRequires: perl(LWP::UserAgent) >= 6.48 BuildRequires: perl(Module::Load) BuildRequires: perl(Mozilla::CA) BuildRequires: perl(Readonly) BuildRequires: perl(Spreadsheet::XLSX) BuildRequires: perl(String::Util) BuildRequires: perl(Test::Kwalitee) BuildRequires: perl(Test::Perl::Critic) BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod::Coverage) >= 1.00 BuildRequires: perl(Text::Template) BuildRequires: perl(Time::Piece) BuildRequires: perl(Time::Seconds) BuildRequires: perl(Try::Tiny) BuildRequires: perl(Web::Scraper) BuildRequires: perl(XML::LibXML) BuildRequires: perl(feature) Requires: perl(DateTime) Requires: perl(DateTime::Format::Strptime) Requires: perl(HTML::Entities) Requires: perl(HTML::TableExtract) Requires: perl(HTML::TokeParser) Requires: perl(HTML::TokeParser::Simple) Requires: perl(HTML::TreeBuilder) Requires: perl(HTML::TreeBuilder::XPath) Requires: perl(HTTP::Cookies) Requires: perl(HTTP::Headers) Requires: perl(HTTP::Request) Requires: perl(HTTP::Request::Common) Requires: perl(HTTP::Status) Requires: perl(IO::Uncompress::Unzip) Requires: perl(JSON) Requires: perl(LWP::Protocol::https) Requires: perl(LWP::Simple) Requires: perl(LWP::UserAgent) >= 6.48 Requires: perl(Module::Load) Requires: perl(Mozilla::CA) Requires: perl(Readonly) Requires: perl(Spreadsheet::XLSX) Requires: perl(String::Util) Requires: perl(Text::Template) Requires: perl(Time::Piece) Requires: perl(Time::Seconds) Requires: perl(Try::Tiny) Requires: perl(Web::Scraper) Requires: perl(XML::LibXML) %{perl_requires} %description This module gets stock quotes from various internet sources all over the world. Quotes are obtained by constructing a quoter object and using the fetch method to gather data, which is returned as a two-dimensional hash (or a reference to such a hash, if called in a scalar context). For example: $q = Finance::Quote->new; %info = $q->fetch("australia", "CML"); print "The price of CML is ".$info{"CML", "price"}; The first part of the hash (eg, "CML") is referred to as the stock. The second part (in this case, "price") is referred to as the label. %prep %autosetup -n %{cpan_name}-%{version} -p1 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644 %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 README.md %license LICENSE %changelog * Thu May 11 2023 Dirk Stoecker - Update cpanspec.yml and regenerate spec file * Thu May 4 2023 Stefan BrĂ¼ns - updated to 1.54 * See /usr/share/doc/packages/perl-Finance-Quote/Changes - Add upstream Fix-FTFunds-regex.patch * Wed Aug 25 2021 Dirk Stoecker - updated to 1.51 see /usr/share/doc/packages/perl-Finance-Quote/Changes - Rebase perl-Finance-Quote-66235-Cdnfundlibrary-row.patch - Delete perl-Finance-Quote-debian-10_whatis.patch (patched file no longer exists) - Delete perl-Finance-Quote-debian-03_whatis.patch (fixed upstream) - Delete perl-Finance-Quote-debian-06_seb.patch (fixed upstream) * Tue Aug 27 2019 Pedro Monreal Gonzalez - Use metacpan for URL and sources file * Tue Aug 6 2019 sbrabec@suse.com - Update to version 1.49: * Alphavantage: Removed Time::HiRes dependency due to mswin32 not supporting clock_gettime calls. * Alphavantage: Add a waiting mechanism to comply to alphavantage use terms * Alphavantage: Added several stock exchange support and currency * Updated modules: Union, Deka, Indiamutual, ASX, Yahoojson, TSP, AEX, Fool * New modules: IEXTrading, MorningstarAU, MorningstarCH, IEXCloud * Yahoo: removed modules referring to yahoo API, which yahoo stopped * BUGFIX: 'use of uninitialized value' returned by perl could make gnucash fail when more than 15 quotes where requested * BUGFIX: MS Windows does not support %%T in strftime call * Added new documentation files: Release.txt, Hackers-Guide, Modules-README.yml * We started moving known failing tests into TODO blocks * This release is the result of hard work by Bruce Schuck, Vincent Lucarelli, Pieter-Jan Vandormael, Manuel Friedli, Jalon Avens, Chris Good, Mark J. Cox, Eelco Dolstra, Henrik Ahlgren, Vinay Shastry, Mike Alexander, Erik Colson. * Special thanks go to Bruce Schuck and Vincent Lucarelli which joined the maintainers team! - Use Sourceforge as home and download site. * Tue Jul 24 2018 sbrabec@suse.com - Fix dependencies. Require perl(CGI) (boo#1077300). * Tue Jun 12 2018 astieger@suse.com - Change package license to GPL-3.0-or-later: MorningstarJP.pm carries this license * Fri Apr 6 2018 sbrabec@suse.com - Change license to GPL-3.0-or-later (MorningstarJP.pm). - Clean spec file by spec-cleaner. * Fri Mar 23 2018 sbrabec@suse.com - Update to version 1.47 (boo#1077300): * Yahoojson: module adapted to new URL and returned json * Added currencies for .SA (Brazil) and .TO (Canada/Toronto) markets * Added currency for .DE market * BUGFIX in currency determination regex * BUG resolved: removed time from $last_refresh when markets are open * added AlphaVantage module (Matthew Patterson) * some other module changes: yahoojson, Morningstar, Bourso, TSX (not working) * Use AlphaVantage for currency quotes instead of Yahoo - Drop perl-Finance-Quote-debian-04_deka.patch (module rewritten). * Fri Aug 4 2017 jcnengel@gmail.com - Update to 1.38 * module updates: tiaacref, yahooJSON, FTfunds, MStaruk, USFedBonds, GoldMoney * new modules: fidelityfixed (Peter Ratzlaff), yahooYQL * removed modules: MTGox * more tests: yahoo_speed.t, tiaacref.t - Drop perl-Finance-Quote-64897-0001-adopted-to-site-changes.patch, perl-Finance-Quote-64897-0002-support-palladium-lookup.patch, perl-Finance-Quote-goldmoney-decimal-point.patch * Tue Sep 1 2015 dimstar@opensuse.org - Add perl(CGI) BuildRequires: needed to be able to pass the test suite with Perl 5.22. * Sun Apr 19 2015 coolo@suse.com - updated to 1.37 bnc#955055 see /usr/share/doc/packages/perl-Finance-Quote/ChangeLog.1 * Mon Jul 28 2014 coolo@suse.com - ignore Mozilla:CA * Mon Jul 28 2014 coolo@suse.com - update to 1.35: * BUGFIX: VWD - currency returned. 1.34 2014-06-15 21:30:03+02:00 Europe/Brussels * VWD adapted to recent website change. 1.33 2014-06-01 11:24:24+02:00 Europe/Brussels * BUGFIX: yahoo_json never returns currency. so don't set a default. yahoo_json returned current timestamp instead of quote date. 1.32 2014-05-18 21:55:12+02:00 Europe/Brussels * return "symbol" for yahoo_json module * allow to retrieve ISIN codes with VWD module 1.31 2014-05-04 22:56:45+02:00 Europe/Brussels * Case mismatch in ZA_UnitTrusts pod 1.30 2014-05-04 21:56:34+02:00 Europe/Brussels * Bourso.pm works on current website changes. Thanks to Guillaume * New module CSE.pm by Hiranya Samarasekera. Covers Colombo Stock Exchange (CSE) in Sri Lanka. 1.29 2014-04-08 08:28:25+02:00 Europe/Brussels * New module za_unittrusts. kudos to Rolf Endres. * Indiamutual patched to current website. kudos to Vinay S Shastry. 1.28 2014-03-16 12:05:19+01:00 Europe/Brussels * Removed some unnecessary dependencies 1.27 2014-03-05 15:04:22+01:00 Europe/Brussels * New module YahooJSON added (Abhijit Kshirsagar) * mtgox.t should not create errors when ONLINE_TEST is not defined - remove all patches no longer applying (as maintainer didn't care for 18 months and this module is important to be half way fresh): perl-Finance-Quote-57401-financecanada.patch perl-Finance-Quote-61750-comdirect.patch perl-Finance-Quote-62619-vwd.patch perl-Finance-Quote-64474-stooq.patch perl-Finance-Quote-65269-ftfunds.patch perl-Finance-Quote-70690-IndiaMutual-temp-del.patch perl-Finance-Quote-70690-IndiaMutual-temp.patch perl-Finance-Quote-LeRevenu.patch perl-Finance-Quote-debian-08_deka.patch perl-Finance-Quote-fsf-address.patch perl-Finance-Quote-goldmoney-decimal-point.patch - reworked spec file to look a bit more like a standard perl package * Fri Jan 25 2013 sbrabec@suse.cz - Update to version 1.18 (bnc#800797): * many updates for server changes * new modules * code cleanup - Drop perl-Finance-Quote-fedora-tiaa-cref.patch: New code is a different implementation and it supports institutional funds as well. - Update Requires. * Mon Jan 16 2012 sbrabec@suse.cz - Updated to the current upstream GIT snapshot (many updates for server changes). - Added fixes from upstream bug tracker: * Fix GoldMoney server changes, add palladium (CPAN#64897). * Rewrite Finance Canada after server changes (CPAN#57401). * Partial rewrite ov VWD due to server changes (CPAN#62619). * Fix Cdnfundlibrary to retrieve newest NAV (CPAN#66235). * Fix use of /tmp file in IndiaMutual (CPAN#70690). * New modules: * Comdirect (CPAN#61750) * Stooq (CPAN#64474) * FTFunds (CPAN#65269) - Added Fedora fix: * Fix TIAA-CREF (Redhat#668935). - Added all Debian fixes. - Yahoo fixes ported to the upstream GIT. * Fri Nov 18 2011 coolo@suse.com - use original .tar.gz * Wed Dec 1 2010 coolo@novell.com - switch to perl_requires macro * Mon Nov 29 2010 coolo@novell.com - remove /var/adm/perl-modules * Tue Oct 19 2010 coolo@novell.com - add perl as explicit buildrequire * Mon Jun 21 2010 sbrabec@suse.cz - Fix of LeRevenu module crash due to a change on lerevenu.com web site (bnc#555687). * Sun Jan 10 2010 jengelh@medozas.de - enable parallel build * Mon Oct 19 2009 sbrabec@suse.cz - Updated to version 1.17 (bnc498310#c4): * Site layout updates: Cominvest, Yahoo (currencies adapted to yahoo denomination), ASX. * Fixes for: Yahoo Europe, Goldmoney, IndiaMutual, GBp, possible wrong year range in Yahoo. * New support for: Hungarian stocks, Goldmoney Platinum. * Removed: Broken futures support for AEX. * Thu Apr 23 2009 sbrabec@suse.cz - Updated to version 1.16: * Fixed or updated site layout parsing of: Bourso, Morningstar, AEX, ITE is now RZR, ZA, Goldmoney, Ashwin, Finanzpartner. * New currency lookup support. * Fixed 12:XXpm formatted time handling. - Require all needed perl modules (bnc#496738). * Mon Oct 27 2008 sbrabec@suse.cz - Updated to version 1.15: * IndiaMutual: Fix symbol not set it module. * isoTime - make sure $hours and $mins are treated as numbers, use sprintf * Wed Oct 15 2008 sbrabec@suse.cz - Updated to version 1.14: * Added support for Finanzpartner, Cominvest, TSX. * Fixed or updated site layout parsing of TIAA CREF, Stockhouse Canada, DWS, VWD, AEX, Yahoo Brasil, SEB, Association of Mutual Funds in India. * Fixes. * Reorganization of test cases. * Thu Aug 23 2007 sbrabec@suse.cz - New SuSE package, version 1.13 (#242504).