3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=1.4 '--author=Michael Piotrowski' Text-Iconv-1.4.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Text
-Iconv
10 %define filelist
%{pkgname}-%{version}-filelist
11 %define NVR
%{pkgname}-%{version}-%{release}
15 summary
: Text
-Iconv
- Perl interface to iconv
() codeset conversion
function
18 vendor
: Michael Piotrowski
19 packager
: Arix International
<cpan2rpm@arix.com
>
21 group
: Applications
/CPAN
22 url
: http
://www.cpan.org
23 buildroot
: %{_tmppath}/%{name}-%{version}-%
(id
-u
-n
)
24 prefix
: %
(echo %{_prefix})
25 source: Text
-Iconv
-1.4.tar.gz
28 The Text
::Iconv module provides a Perl interface to the iconv
()
29 function as defined by the Single UNIX Specification. The convert
()
30 method converts the encoding of characters
in the input string from
31 the
*fromcode
* codeset to the
*tocode
* codeset
, and returns the
34 Settings of
*fromcode
* and
*tocode
* and their permitted combinations
35 are implementation
-dependent. Valid values are specified
in the
38 As an experimental feature
, this version of Text
::Iconv objects
39 provide the retval
() method
:
41 $result
= $converter
->convert
("lorem ipsum dolor sit amet"
);
42 $retval
= $converter
->retval
;
44 This method can be called after calling convert
(). It returns the
45 return value of the underlying iconv
() function for the last
46 conversion
; according to the Single UNIX Specification
, this value
47 indicates "the number of non
-identical conversions performed." Note
,
48 however
, that iconv implementations vary widely
in the interpretation
49 of this specification.
51 When called before the first call to convert
(), or
if an error occured
52 during the conversion
, retval
() returns undef.
55 # This package was generated automatically with the cpan2rpm
56 # utility. To get this software or for more information
57 # please visit: http://perl.arix.com/
61 %setup -q
-n
%{pkgname}-%{version}
62 chmod
-R u
+w
%{_builddir}/%{pkgname}-%{version}
65 grep
-rsl '^
#!.*perl' . |
66 grep
-v '.bak$' |xargs
--no
-run
-if-empty \
67 %__perl -MExtUtils
::MakeMaker
-e 'MY
->fixin
(@ARGV
)'
68 CFLAGS
="$RPM_OPT_FLAGS"
69 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}|
if \$ExtUtils
::MakeMaker
::VERSION
=~
/5\
.9[1-6]|
6\
.0[0-5]/ '`
76 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
78 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
80 cmd
=/usr
/share
/spec
-helper
/compress_files
81 [ -x $cmd
] || cmd
=/usr
/lib
/rpm
/brp
-compress
85 if [ -e
/etc
/SuSE
-release
-o
-e
/etc
/UnitedLinux
-release
]
87 %{__mkdir_p} %{buildroot}/var
/adm
/perl
-modules
88 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
89 |
%{__sed} -e s+%{buildroot}++g \
90 > %{buildroot}/var/adm/perl-modules/%{name}
93 # remove special files
94 find
%{buildroot} -name "perllocal.pod" \
95 -o
-name ".packlist" \
99 # no empty directories
100 find
%{buildroot}%{_prefix} \
102 -exec rmdir {} \
; 2>/dev
/null
104 %{__perl} -MFile
::Find
-le '
105 find
({ wanted
=> \
&wanted
, no_chdir
=> 1}, "
%{buildroot}"
);
106 print "
%doc Changes README"
;
107 for my $x
(sort @
dirs, @files
) {
108 push @ret
, $x unless indirs
($x
);
110 print join "\n"
, sort @ret
;
115 local $_
= $File
::Find
::name
;
116 my $f
= $_
; s|^\Q
%{buildroot}\E||
;
117 return unless length
;
118 return $files
[@files
] = $_
if -f $f
;
121 /\Q$d\E
/ && return for reverse sort @INC
;
122 $d
=~
/\Q$_\E
/ && return
123 for qw|
/etc
%_prefix/man
%_prefix/bin
%_prefix/share|
;
130 $x
=~
/^\Q$_\E\
// && $x ne $_
&& return 1 for @
dirs;
134 [ -z
%filelist ] && {
135 echo "ERROR
: empty
%files listing"
140 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
143 %defattr(-,root
,root
)
146 * Fri Nov
24 2006 root@dca02