%bcond check 1 Name: perl-Chemistry-Reaction Version: 0.02 Release: %autorelease Summary: Explicit chemical reactions License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/dist/Chemistry-Reaction Source0: https://cpan.metacpan.org/authors/id/I/IT/ITUB/Chemistry-Reaction-%{version}.tar.gz # convert to utf8 and fix compilation # https://rt.cpan.org/Public/Bug/Display.html?id=86700 Patch0: %{name}-utf8.patch BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) %if %{with check} BuildRequires: perl(Chemistry::File::SMILES) BuildRequires: perl(Chemistry::Pattern) BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod) %endif BuildArch: noarch %description This package, along with Chemistry::Pattern, provides an implementation of explicit chemical reactions. An explicit chemical reaction is a representation of the transformation that takes place in a given chemical reaction. In an explicit chemical reaction, a substrate molecule is transformed into a product molecule by breaking existing bonds and creating new bonds between atoms. %prep %autosetup -p1 -n Chemistry-Reaction-%{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 %{perl_vendorlib}/Chemistry/Reaction.pm %{_mandir}/man3/Chemistry::Reaction.3pm.* %changelog %autochangelog