%bcond check 1 Name: perl-Chemistry-File-Mopac Version: 0.15 Release: %autorelease Summary: MOPAC 6 input file reader/writer License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/dist/Chemistry-File-Mopac Source0: https://cpan.metacpan.org/authors/id/I/IT/ITUB/Chemistry-File-Mopac-%{version}.tar.gz BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) %if %{with check} BuildRequires: perl(Chemistry::InternalCoords) BuildRequires: perl(Chemistry::Mol) BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod) %endif BuildArch: noarch %description This module reads and writes MOPAC 6 input files. It can handle both internal coordinates and cartesian coordinates. It also extracts molecules from summary files, defined as those files that match /SUMMARY OF/ in the third line. Perhaps a future version will extract additional information such as the energy and dipole from the summary file. This module registers the mop format with Chemistry::Mol. For detection purposes, it assumes that filenames ending in .mop or .zt have the Mopac format, as well as files whose first line matches /am1|pm3|mndo|mdg|pdg/i (this may change in the future). %prep %autosetup -p1 -n Chemistry-File-Mopac-%{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/Mopac.pm %{_mandir}/man3/Chemistry::File::Mopac.3pm.* %changelog %autochangelog