86 lines
3.3 KiB
RPMSpec
86 lines
3.3 KiB
RPMSpec
#
|
|
# spec file for package perl-Statistics-ChiSquare
|
|
#
|
|
# 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 Statistics-ChiSquare
|
|
Name: perl-Statistics-ChiSquare
|
|
Version: 1.0.0
|
|
Release: 0
|
|
# 1.0000 -> normalize -> 1.0.0
|
|
%define cpan_version 1.0000
|
|
#Upstream: Jon Orwant, Readable Publications, Inc; orwant@oreilly.com Maintained and updated since October 2003 by David Cantrell, david@cantrell.org.uk This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: How well-distributed is your data?
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/D/DC/DCANTRELL/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(Test::More) >= 0.88
|
|
Requires: perl(Test::More) >= 0.88
|
|
Provides: perl(Statistics::ChiSquare) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
Suppose you flip a coin 100 times, and it turns up heads 70 times. _Is the
|
|
coin fair?_
|
|
|
|
Suppose you roll a die 100 times, and it shows 30 sixes. _Is the die
|
|
loaded?_
|
|
|
|
In statistics, the *chi-square* test calculates how well a series of
|
|
numbers fits a distribution. In this module, we only test for whether
|
|
results fit an even distribution. It doesn't simply say "yes" or "no".
|
|
Instead, it gives you a _confidence interval_, which sets upper and lower
|
|
bounds on the likelihood that the variation in your data is due to chance.
|
|
See the examples below.
|
|
|
|
If you've ever studied elementary genetics, you've probably heard about
|
|
Gregor Mendel. He was a wacky Austrian botanist who discovered (in 1865)
|
|
that traits could be inherited in a predictable fashion. He did lots of
|
|
experiments with cross breeding peas: green peas, yellow peas, smooth peas,
|
|
wrinkled peas. A veritable Brave New World of legumes.
|
|
|
|
But Mendel faked his data. A statistician by the name of R. A. Fisher used
|
|
the chi-square test to prove it.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
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 CHANGELOG README
|
|
%license ARTISTIC.txt GPL2.txt
|
|
|
|
%changelog
|