RT notifier: parse templates without header correctly
[openxpki.git] / trunk / package / suse / external-dependencies / Text-Iconv.spec
blobab825a709d9844e7422490ccb5137c8e1f2dd685
2 # - Text::Iconv -
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}
12 %define maketest 1
14 name: perl-Text-Iconv
15 summary: Text-Iconv - Perl interface to iconv() codeset conversion function
16 version: 1.4
17 release: 1
18 vendor: Michael Piotrowski
19 packager: Arix International <cpan2rpm@arix.com>
20 license: Artistic
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
27 %description
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
32 result.
34 Settings of *fromcode* and *tocode* and their permitted combinations
35 are implementation-dependent. Valid values are specified in the
36 system documentation
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/
60 %prep
61 %setup -q -n %{pkgname}-%{version}
62 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
64 %build
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]/ '`
70 %{__make}
71 %if %maketest
72 %{__make} test
73 %endif
75 %install
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
82 [ -x $cmd ] && $cmd
84 # SuSE Linux
85 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
86 then
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" \
96 -o -name "*.bs" \
97 |xargs -i rm -f {}
99 # no empty directories
100 find %{buildroot}%{_prefix} \
101 -type d -depth \
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;
112 sub wanted {
113 return if /auto$/;
115 local $_ = $File::Find::name;
116 my $f = $_; s|^\Q%{buildroot}\E||;
117 return unless length;
118 return $files[@files] = $_ if -f $f;
120 $d = $_;
121 /\Q$d\E/ && return for reverse sort @INC;
122 $d =~ /\Q$_\E/ && return
123 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
125 $dirs[@dirs] = $_;
128 sub indirs {
129 my $x = shift;
130 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
132 ' > %filelist
134 [ -z %filelist ] && {
135 echo "ERROR: empty %files listing"
136 exit -1
139 %clean
140 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
142 %files -f %filelist
143 %defattr(-,root,root)
145 %changelog
146 * Fri Nov 24 2006 root@dca02
147 - Initial build.