2010-04-29 14:44:44 +00:00
#
2011-11-18 11:34:45 +00:00
# spec file for package perl-Perl-Tidy
2010-04-29 14:44:44 +00:00
#
2018-01-22 21:15:55 +00:00
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
2010-04-29 14:44:44 +00:00
#
# 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.
2010-10-13 23:13:00 +00:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2010-12-19 13:07:54 +00:00
2010-10-13 23:13:00 +00:00
Name : perl-Perl-Tidy
2018-02-24 07:00:10 +00:00
Version : 20180220
2013-07-27 12:44:22 +00:00
Release : 0
2015-08-27 09:51:47 +00:00
#Upstream: This package is free software; you can redistribute it and/or modify it under the terms of the "GNU General Public License". Please refer to the file "COPYING" for details.
2010-10-13 23:13:00 +00:00
%define cpan_name Perl-Tidy
Summary : Parses and beautifies perl source
2018-02-19 07:21:38 +00:00
License : GPL-2.0-or-later
2010-10-13 23:13:00 +00:00
Group : Development/Libraries/Perl
Url : http://search.cpan.org/dist/Perl-Tidy/
2017-05-25 14:59:16 +00:00
Source0 : https://cpan.metacpan.org/authors/id/S/SH/SHANCOCK/%{cpan_name} -%{version} .tar.gz
2015-08-23 14:13:26 +00:00
Source1 : cpanspec.yml
2010-10-13 23:13:00 +00:00
BuildArch : noarch
BuildRoot : %{_tmppath} /%{name} -%{version} -build
BuildRequires : perl
BuildRequires : perl-macros
2013-07-27 12:44:22 +00:00
%{perl_requires}
2010-04-29 14:44:44 +00:00
%description
2010-10-13 23:13:00 +00:00
This module makes the functionality of the perltidy utility available to
perl scripts. Any or all of the input parameters may be omitted, in which
case the @ARGV array will be used to provide input parameters as described
in the perltidy(1) man page.
2010-04-29 14:44:44 +00:00
2013-07-27 12:44:22 +00:00
For example, the perltidy script is basically just this:
use Perl::Tidy;
Perl::Tidy::perltidy();
The call to *perltidy* returns a scalar *$error_flag* which is TRUE if an
error caused premature termination, and FALSE if the process ran to normal
2016-03-09 06:33:32 +00:00
completion. Additional discuss of errors is contained below in the ERROR
HANDLING section.
2013-07-27 12:44:22 +00:00
2010-04-29 14:44:44 +00:00
%prep
2010-10-13 23:13:00 +00:00
%setup -q -n %{cpan_name} -%{version}
2018-01-22 21:15:55 +00:00
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
2010-04-29 14:44:44 +00:00
%build
2010-10-13 23:13:00 +00:00
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
2010-04-29 14:44:44 +00:00
%check
2010-10-13 23:13:00 +00:00
%{__make} test
2010-04-29 14:44:44 +00:00
%install
%perl_make_install
2013-07-27 12:44:22 +00:00
%perl_process_packlist
2010-04-29 14:44:44 +00:00
%perl_gen_filelist
%files -f %{name}.files
2013-07-27 12:44:22 +00:00
%defattr (-,root,root,755)
2017-05-25 14:59:16 +00:00
%doc BUGS CHANGES docs examples Makefile.npm pm2pl README TODO
%license COPYING
2010-04-29 14:44:44 +00:00
%changelog