%bcond check 1 Name: perl-Chemistry-FormulaPattern Version: 0.10 Release: %autorelease Summary: Match molecule by formula License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/dist/Chemistry-FormulaPattern Source0: https://cpan.metacpan.org/authors/id/I/IT/ITUB/Chemistry-FormulaPattern-%{version}.tar.gz BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) %if %{with check} BuildRequires: perl(Chemistry::Mol) BuildRequires: perl(Chemistry::Pattern) BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod) %endif BuildArch: noarch %description This module implements a simple language for describing a range of molecular formulas and allows one to find out whether a molecule matches the formula specification. It can be used for searching for molecules by formula, in a way similar to the NIST WebBook formula search (http://webbook.nist.gov/chemistry/form-ser.html). Note however that the language used by this module is different from the one used by the WebBook! Chemistry::FormulaPattern shares the same interface as Chemistry::Pattern. %prep %autosetup -p1 -n Chemistry-FormulaPattern-%{version} %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" \ NO_PACKLIST=1 NO_PERLLOCAL=1 %make_build %install %make_install find %{buildroot} -type f -name '*.bs' -empty -delete %{_fixperms} '%{buildroot}'/* %if %{with check} %check make test %endif %files %doc README %dir %{perl_vendorlib}/Chemistry %dir %{perl_vendorlib}/Chemistry/File %{perl_vendorlib}/Chemistry/File/FormulaPattern.pm %{perl_vendorlib}/Chemistry/FormulaPattern.pm %{_mandir}/man3/Chemistry::File::FormulaPattern.3pm.* %{_mandir}/man3/Chemistry::FormulaPattern.3pm.* %changelog %autochangelog