# # spec file for package perl-Finance-Quote # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # Name: perl-Finance-Quote Version: 1.47 Release: 2.6 #Upstream: GPL-1.0+ %define cpan_name Finance-Quote Summary: Get stock and mutual fund quotes from various exchanges License: GPL-3.0-or-later Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Finance-Quote/ Source0: http://www.cpan.org/authors/id/E/EC/ECOCODE/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml Patch2: perl-Finance-Quote-66235-Cdnfundlibrary-row.patch Patch3: perl-Finance-Quote-debian-03_whatis.patch Patch5: perl-Finance-Quote-debian-06_seb.patch Patch6: perl-Finance-Quote-debian-10_whatis.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(CGI) BuildRequires: perl(DateTime) BuildRequires: perl(HTML::Parser) BuildRequires: perl(HTML::TableExtract) BuildRequires: perl(HTML::TokeParser) BuildRequires: perl(HTML::TreeBuilder) BuildRequires: perl(HTTP::Cookies) BuildRequires: perl(HTTP::Headers) BuildRequires: perl(HTTP::Request::Common) BuildRequires: perl(HTTP::Status) BuildRequires: perl(JSON) BuildRequires: perl(LWP::Protocol::https) BuildRequires: perl(LWP::Simple) BuildRequires: perl(LWP::UserAgent) BuildRequires: perl(Time::Piece) BuildRequires: perl(URI) BuildRequires: perl(URI::Escape) BuildRequires: perl(URI::QueryParam) Requires: perl(CGI) Requires: perl(DateTime) Requires: perl(HTML::Parser) Requires: perl(HTML::TableExtract) Requires: perl(HTML::TokeParser) Requires: perl(HTML::TreeBuilder) Requires: perl(HTTP::Cookies) Requires: perl(HTTP::Headers) Requires: perl(HTTP::Request::Common) Requires: perl(HTTP::Status) Requires: perl(JSON) Requires: perl(LWP::Protocol::https) Requires: perl(LWP::Simple) Requires: perl(LWP::UserAgent) Requires: perl(Time::Piece) Requires: perl(URI) Requires: perl(URI::Escape) Requires: perl(URI::QueryParam) %{perl_requires} %description This module gets stock quotes from various internet sources, including Yahoo! Finance, Fidelity Investments, and the Australian Stock Exchange. There are two methods of using this module -- a functional interface that is deprecated, and an object-orientated method that provides greater flexibility and stability. With the exception of straight currency exchange rates, all information is returned as a two-dimensional hash (or a reference to such a hash, if called in a scalar context). For example: %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 %setup -q -n %{cpan_name}-%{version} find . -type f -print0 | xargs -0 chmod 644 %patch2 -p1 %patch3 %patch5 %patch6 %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} %check %{__make} test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc ChangeLog.1 Changes LICENSE README %changelog * 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 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).