File perl-Text-WrapI18N.spec of Package perl-Text-WrapI18N
#
# spec file for package perl-Text-WrapI18N
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-Text-WrapI18N
Version: 0.06
Release: 0
%define cpan_name Text-WrapI18N
Summary: Line wrapping module with support for multibyte, fullwidth,
License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Text-WrapI18N/
Source0: https://cpan.metacpan.org/authors/id/K/KU/KUBOTA/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Text::CharWidth) >= 0.02
Requires: perl(Text::CharWidth) >= 0.02
%{perl_requires}
%description
This module intends to be a better Text::Wrap module. This module is needed
to support multibyte character encodings such as UTF-8, EUC-JP, EUC-KR,
GB2312, and Big5. This module also supports characters with irregular
widths, such as combining characters (which occupy zero columns on
terminal, like diacritical marks in UTF-8) and fullwidth characters (which
occupy two columns on terminal, like most of east Asian characters). Also,
minimal handling of languages which doesn't use whitespaces between words
(like Chinese and Japanese) is supported.
Like Text::Wrap, hyphenation and "kinsoku" processing are not supported, to
keep simplicity.
_wrap(firstheader, nextheader, texts)_ is the main subroutine of
Text::WrapI18N module to execute the line wrapping. Input parameters and
output data emulate Text::Wrap. The texts have to be written in locale
encoding.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README
%changelog