# # spec file for package perl-Finance-Quote # # Copyright (c) 2025 SUSE LLC and contributors # # 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.680.0 Release: 1.1 # 1.68 -> normalize -> 1.680.0 %define cpan_version 1.68 #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}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Compress::Zlib) BuildRequires: perl(Date::Manip) BuildRequires: perl(Date::Parse) 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(Devel::Trace) >= 0.120 BuildRequires: perl(HTML::Entities) BuildRequires: perl(HTML::TableExtract) BuildRequires: perl(HTML::TokeParser) BuildRequires: perl(HTML::TreeBuilder) BuildRequires: perl(HTML::TreeBuilder::XPath) BuildRequires: perl(HTTP::CookieJar::LWP) >= 0.14 BuildRequires: perl(HTTP::Cookies) BuildRequires: perl(HTTP::Headers) BuildRequires: perl(HTTP::Request) BuildRequires: perl(HTTP::Request::Common) BuildRequires: perl(HTTP::Status) BuildRequires: perl(IO::String) BuildRequires: perl(IO::Uncompress::Unzip) BuildRequires: perl(JSON) BuildRequires: perl(LWP::Protocol::http) BuildRequires: perl(LWP::Protocol::https) BuildRequires: perl(LWP::Simple) BuildRequires: perl(LWP::UserAgent) >= 6.480 BuildRequires: perl(Module::CPANTS::Analyse) BuildRequires: perl(Module::Load) >= 0.36 BuildRequires: perl(Mozilla::CA) BuildRequires: perl(Net::SSLeay) >= 1.920 BuildRequires: perl(Readonly) BuildRequires: perl(Smart::Comments) >= 1.0.5 BuildRequires: perl(String::Util) BuildRequires: perl(Test2) >= 1.302167 BuildRequires: perl(Test::Kwalitee) BuildRequires: perl(Test::Perl::Critic) BuildRequires: perl(Text::Template) BuildRequires: perl(Time::Piece) BuildRequires: perl(URI::Escape) >= 3.310 BuildRequires: perl(Web::Scraper) BuildRequires: perl(XML::LibXML) BuildRequires: perl(YAML::PP::Perl) BuildRequires: perl(feature) Requires: perl(Compress::Zlib) Requires: perl(Date::Parse) Requires: perl(Date::Range) Requires: perl(Date::Simple) Requires: perl(DateTime::Format::ISO8601) Requires: perl(DateTime::Format::Strptime) Requires: perl(Devel::Trace) >= 0.120 Requires: perl(HTML::Entities) Requires: perl(HTML::TableExtract) Requires: perl(HTML::TokeParser) Requires: perl(HTML::TreeBuilder) Requires: perl(HTML::TreeBuilder::XPath) Requires: perl(HTTP::CookieJar::LWP) >= 0.14 Requires: perl(HTTP::Cookies) Requires: perl(HTTP::Headers) Requires: perl(HTTP::Request) Requires: perl(HTTP::Request::Common) Requires: perl(HTTP::Status) Requires: perl(IO::String) Requires: perl(IO::Uncompress::Unzip) Requires: perl(JSON) Requires: perl(LWP::Protocol::http) Requires: perl(LWP::Protocol::https) Requires: perl(LWP::Simple) Requires: perl(LWP::UserAgent) >= 6.480 Requires: perl(Module::Load) >= 0.36 Requires: perl(Mozilla::CA) Requires: perl(Net::SSLeay) >= 1.920 Requires: perl(Readonly) Requires: perl(Smart::Comments) >= 1.0.5 Requires: perl(String::Util) Requires: perl(Test2) >= 1.302167 Requires: perl(Text::Template) Requires: perl(Time::Piece) Requires: perl(URI::Escape) >= 3.310 Requires: perl(Web::Scraper) Requires: perl(XML::LibXML) Requires: perl(YAML::PP::Perl) Provides: perl(Finance::Quote) = %{version} Provides: perl(Finance::Quote::AEX) = %{version} Provides: perl(Finance::Quote::ASEGR) = %{version} Provides: perl(Finance::Quote::ASX) = %{version} Provides: perl(Finance::Quote::AlphaVantage) = %{version} Provides: perl(Finance::Quote::BSEIndia) = %{version} Provides: perl(Finance::Quote::BVB) = %{version} Provides: perl(Finance::Quote::BorsaItaliana) = %{version} Provides: perl(Finance::Quote::Bourso) = %{version} Provides: perl(Finance::Quote::CSE) = %{version} Provides: perl(Finance::Quote::Comdirect) = %{version} Provides: perl(Finance::Quote::Consorsbank) = %{version} Provides: perl(Finance::Quote::Currencies) = %{version} Provides: perl(Finance::Quote::CurrencyRates::AlphaVantage) = %{version} Provides: perl(Finance::Quote::CurrencyRates::CurrencyFreaks) = %{version} Provides: perl(Finance::Quote::CurrencyRates::ECB) = %{version} Provides: perl(Finance::Quote::CurrencyRates::FinanceAPI) = %{version} Provides: perl(Finance::Quote::CurrencyRates::Fixer) = %{version} Provides: perl(Finance::Quote::CurrencyRates::OpenExchange) = %{version} Provides: perl(Finance::Quote::CurrencyRates::YahooJSON) = %{version} Provides: perl(Finance::Quote::Deka) = %{version} Provides: perl(Finance::Quote::FTfunds) = %{version} Provides: perl(Finance::Quote::FinanceAPI) = %{version} Provides: perl(Finance::Quote::Finanzpartner) = %{version} Provides: perl(Finance::Quote::Fondsweb) = %{version} Provides: perl(Finance::Quote::Fool) = %{version} Provides: perl(Finance::Quote::GoldMoney) = %{version} Provides: perl(Finance::Quote::GoogleWeb) = %{version} Provides: perl(Finance::Quote::IndiaMutual) = %{version} Provides: perl(Finance::Quote::MarketWatch) = %{version} Provides: perl(Finance::Quote::MorningstarCH) = %{version} Provides: perl(Finance::Quote::MorningstarJP) = %{version} Provides: perl(Finance::Quote::MorningstarUK) = %{version} Provides: perl(Finance::Quote::NSEIndia) = %{version} Provides: perl(Finance::Quote::NZX) = %{version} Provides: perl(Finance::Quote::OnVista) = %{version} Provides: perl(Finance::Quote::SIX) = %{version} Provides: perl(Finance::Quote::Sinvestor) = %{version} Provides: perl(Finance::Quote::StockData) = %{version} Provides: perl(Finance::Quote::Stooq) = %{version} Provides: perl(Finance::Quote::SwissFundData) = %{version} Provides: perl(Finance::Quote::TMX) = %{version} Provides: perl(Finance::Quote::TSP) = %{version} Provides: perl(Finance::Quote::TesouroDireto) = %{version} Provides: perl(Finance::Quote::Tradegate) = %{version} Provides: perl(Finance::Quote::TreasuryDirect) = %{version} Provides: perl(Finance::Quote::TwelveData) = %{version} Provides: perl(Finance::Quote::USBonds) = %{version} Provides: perl(Finance::Quote::Union) = %{version} Provides: perl(Finance::Quote::UserAgent) = %{version} Provides: perl(Finance::Quote::XETRA) = %{version} Provides: perl(Finance::Quote::YahooJSON) = %{version} Provides: perl(Finance::Quote::YahooWeb) = %{version} Provides: perl(Finance::Quote::ZA) = %{version} %undefine __perllib_provides %{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}-%{cpan_version} -p1 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -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 CONTRIBUTING.md README %license LICENSE %changelog * Mon Dec 22 2025 Tina Müller - updated to 1.680.0 (1.68) see /usr/share/doc/packages/perl-Finance-Quote/Changes 1.68 2025-12-21 11:40:59-08:00 America/Los_Angeles * Changes to AlphaVantage.pm and CurrencyRates/AlphaVantage.pm to throttle queries - Issue #546 * YahooJSON.pm - Add additional fields/labels - PR #544 * New Module, USBonds.pm * MarketWatch.pm - Added headers to fix 401 code - Issue #542 * Modified AEX.pm to return no data available is currency indicator is '%%' (bonds return percentage of par/facevalue) - Issue #539 * Fixed YahooWeb.pm - Issue #533 - PR #538 * Removed CMBChina.pm - no longer working - Issue #534 * Rewrote Union.pm for URL that returns JSON - Issue #516 * Modified parsing in BVB.pm - Issue #513 * Mon Oct 20 2025 Tina Müller - updated to 1.670.0 (1.67) see /usr/share/doc/packages/perl-Finance-Quote/Changes 1.67 2025-10-18 11:29:58-07:00 America/Los_Angeles * Fixed ASEGR.pm. Web site redesigned, URL used for data was no longer workingy - Issue #509 * Handle no trade date in BorsaItaliana.pm - Issue #528 * Fixed TesouroDireto.pm using Tesouro Transparente as datasource - PR #527 * Added a new module to fetch data from SwissFundData - PR #515 * Fixed MorningstarCH.pm * Fixed MorningstarUK.pm * Added methodinfo() to MarketWatch.pm and BorsaItaliana.pm * Sun Jul 6 2025 Tina Müller - updated to 1.660.0 (1.66) see /usr/share/doc/packages/perl-Finance-Quote/Changes 1.66 2025-07-05 11:34:42-07:00 America/Los_Angeles * Modified CurrencyRates/CurrencyFreaks.pm to return from and to values instead of calculated rate. * Removed Bloomberg.pm, Tiaacref.pm, Troweprice.pm * AlphaVantage - return 'symbol not found' when no price data is returned. * ASX - Changed error message when symbol isn't found - Issue #497 * Added a new module to fetch the fund nav from CMBChina - PR #494 * Added Cookie Jar to Comdirect user agent - Issue #491 * Removed HU.pm, Oslobors.pm, and SEB.pm - Issue #490 * Sun May 25 2025 Tina Müller - updated to 1.650.0 (1.65) see /usr/share/doc/packages/perl-Finance-Quote/Changes 1.65 2025-04-26 18:17:38-07:00 America/Los_Angeles * Added EXCHANGE feature to Sinvestor.pm and some fixes - PR #481 * Added EXCHANGE feature to OnVista.pm - PR #480 * Added EXCHANGE feature to Consorsbank.pm and some fixes - PR #479 * Enabled usage count in Quote.pm. Removed DWS.pm. Improved check that divident is a number in YahooJSON.pm by adding regex anchors. * Added ssl_opts to user agent in Union.pm to account for bad certificate chain - Issue #482 * Added ETFs search, more labels and EXCHANGE feature to Comdirect.pm - PR #478 * GoogleWeb - Add support for Hong Kong Exchange - PR #476 * YahooJSON - Adjust other currency fields when data is returned in GBp, ZAc, or ILA. * Added label wkn, ìsin, close, ask, bid, p_change, time to OnVista.pm * Modified OnVista.pm to enable search by ISIN and WKN and search for ETFs * Added methodinfo hash to Tradegate.pm - PR #465 * Added label isin, open, ask, bid, time to Tradegate.pm - PR #465 * Fixed Tradegate.pm - Search for ETFs - PR #465 * Removed MorningstarAU - Issue #405 * Fixed malformed character in YahooWeb.pm - Issue #468 * Changed useragent in YahooJSON.pm - Issue #467 * Added methodinfo hash to AEX.pm - PR #466 * Added label exchange, close, time to AEX.pm - PR #466 * Fixed XETRA.pm - Issue #460 * Added methodinfo hash to Fool.pm * Fixed MorningstarJP.pm - Issue #443 - PR #451 * Thu Dec 12 2024 Tina Müller - updated to 1.640.0 (1.64) see /usr/share/doc/packages/perl-Finance-Quote/Changes 1.64 2024-11-27 18:11:09-08:00 America/Los_Angeles * Update AlphaVantage.pm - Issue #447 * Fix to Stooq.pm - Issue #445 * Updated ASX.pm - Issue #404 * Added more fields to CSE.pm and exposed all labels. * Changed parsing in Comdirect.pm - Issue #413 * Complete rewrite of OnVista.pm - Issue #414 * Minor fix to FinanceAPI decoding JSON - Issue #434 * Modified YahooJSON to deal with "nan" as dividend yield in JSON. * New CurrencyRates module, CurrencyRates/FinanceAPI - Issue #427 * Fixed Bourso.pm - Issue #417 * Allowed Currency Rates modules Fixer.pm and OpenExchange.pm to read their API keys from environment variables - Issue #426 1.63 2024-09-21 12:47:39-07:00 America/Los_Angeles * Fixed TesouroDireto.pm - Using different source URL - PR #424 * Added FinanceAPI.pm - Requires API key from https://financeapi.net/. US and other exchange data available. * Fixed BVB.pm - Issue #409 * Fixed BSEIndia.pm - Issue #410 and removed Unzip as quotes file is now a CSV file * Fixed NSEIndia.pm - Issue #410 * Fixed NZX.pm - Issue #401 * Mon Jun 10 2024 Stanislav Brabec - updated to 1.62 see /usr/share/doc/packages/perl-Finance-Quote/Changes - Explicitly set license to GPL-2.0-or-later in cpanspec.yml. * Fri Apr 5 2024 Stanislav Brabec - updated to 1.59 see /usr/share/doc/packages/perl-Finance-Quote/Changes - Drop patch Fix-FTFunds-regex.patch. Now in the upstream. - Drop patch perl-Finance-Quote-66235-Cdnfundlibrary-row.patch. It is fixed in the upstream for years, the openSUSE one was incorrectly ported and breaks the module. * 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).