%bcond check 1 Name: perl-Chemistry-File-PDB Version: 0.23 Release: %autorelease Summary: Protein Data Bank file format reader/writer License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/dist/Chemistry-File-PDB Source0: https://cpan.metacpan.org/authors/id/I/IT/ITUB/Chemistry-File-PDB-%{version}.tar.gz BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) %if %{with check} BuildRequires: perl(Chemistry::MacroMol) BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod) %endif BuildArch: noarch %description This module reads and writes PDB files. The PDB file format is commonly used to describe proteins, particularly those stored in the Protein Data Bank (http://www.rcsb.org/pdb/). The current version of this module only reads the following record types, ignoring everything else: ATOM HETATM ENDMDL END This module automatically registers the 'pdb' format with Chemistry::Mol, so that PDB files may be identified and read by Chemistry::Mol->read(). For autodetection purpuses, it assumes that files ending in .pdb or having a line matching /^(ATOM |HETATM)/ are PDB files. The PDB reader and writer is designed for dealing with Chemistry::MacroMol objects, but it can also create and use Chemistry::Mol objects by throwing some information away. %prep %autosetup -p1 -n Chemistry-File-PDB-%{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/PDB.pm %{_mandir}/man3/Chemistry::File::PDB.3pm.* %changelog %autochangelog